{@render children?.()} {#snippet muteSetting()} {#if customUi?.settingsPanel?.metadata?.disableMute !== true} {/if} {/snippet} (lastOpening = diffDrawer?.beginOpening())} bind:deployedValue currentValue={script} /> t.draftConfig)} on:canceled={() => { draftTriggersModalOpen = false }} on:confirmed={handleDraftTriggersConfirmed} /> confirmPerpetualRunsCallback()} onCanceled={() => (perpetualRunsToConfirm = undefined)} /> {#if editRights.roleCanAuthor('script')} (metadataOpen = false)} aiId="script-builder-settings" aiDescription="Script builder settings" > {#snippet titleExtra()} {#if customUi?.settingsPanel?.disableRuntime !== true} {/if} {/snippet}
{#if customUi?.settingsPanel?.disableMetadata !== true} {/if} {#if customUi?.settingsPanel?.disableRuntime !== true} {#snippet extra()} {/snippet} {#snippet extra()} {/snippet} {/if} {#if customUi?.settingsPanel?.disableGeneratedUi !== true && !isDbt} {#snippet extra()} The arguments are synced with the main signature but you may refine the parts that cannot be inferred from the type directly. {/snippet} {/if} {#if customUi?.settingsPanel?.disableTriggers !== true} {#snippet extra()} Configure how this script will be triggered. {/snippet} {/if} {#snippet content()}
{#if script.schema && !disableAi && !customUi?.settingsPanel?.metadata?.disableAiFilling} {/if}
{#if !customUi?.settingsPanel?.metadata?.languages || customUi?.settingsPanel?.metadata?.languages?.length > 1}
{#snippet action()} {/snippet} {#if lockedLanguage}
As a forked script, the language '{script.language}' cannot be modified.
{/if}
{#each langs as [label, lang] (lang)} {@const isPicked = (lang == script.language && template != 'bunnative' && template != 'docker' && template != 'claudesandbox' && template != 'pisandbox') || (template == 'bunnative' && lang == 'bunnative') || (template == 'docker' && lang == 'docker') || ((template == 'claudesandbox' || template == 'pisandbox') && lang == 'bun')} {#snippet text()} {label} is only available with an enterprise license {/snippet} {/each}
Template
{/if} {#if customUi?.settingsPanel?.metadata?.disableScriptKind !== true && !isDbt}
{#snippet header()} Tag this script's purpose within flows such that it is available as the corresponding action. {/snippet} script.kind ?? 'script', (kind) => { // Load-bearing: any write to script.kind echoes back through the // group, and initContent replaces the editor content outright. if (kind === (script.kind ?? 'script')) return template = 'script' script.kind = kind as Script['kind'] initContent(script.language, script.kind, template) } } > {#snippet children({ item })} {#each scriptKindOptions as { value, title, desc, documentationLink, Icon }} {/each} {/snippet}
{/if} {#if customUi?.settingsPanel?.disableRuntime}
{@render muteSetting()} {/if}
{@render muteSetting()}
{#if !isDbt} {/if} { captureTable?.loadCaptures(true) }} currentPath={script.path} {initialPath} {fakeInitialPath} noEditor={true} newItem={initialPath == ''} isFlow={false} {hasPreprocessor} canHavePreprocessor={canHavePreprocessor(script.language)} args={hasPreprocessor && selectedInputTab !== 'preprocessor' ? {} : args} isDeployed={savedScript && savedScript?.no_deployed !== true} schema={script.schema} runnableVersion={deployedScriptHash} onDeployTrigger={handleDeployTrigger} />
{/snippet}
{#if ownsPageHeader} {:else}
{@render languageButton(condensedHeader ? 18 : 24)} {#if customUi?.topBar?.path != false}
onNavigate?.(item)} />
{/if} {@render autosaveIndicator()} {#if !condensedHeader} {@render settingsBadges()} {/if}
{#if $enterpriseLicense && initialPath != '' && !inSessionPane} {/if}
{@render rightButtons()}
{/if} {#snippet scriptSummary()} {#if script}
{#snippet summaryText()} {emptyString(script.summary) ? 'Add a summary...' : script.summary} {/snippet} {#if customUi?.topBar?.editablePath != false || customUi?.topBar?.editableSummary != false} {:else} {@render summaryText()} {/if}
{/if} {/snippet} {#snippet scriptPathTrigger(pathLabel: Snippet, triggerClass: string)} {#if script} {:else} {@render pathLabel()} {/if} {/snippet} {#snippet scriptMarks()} {#if script} {@render settingsBadges('pl-1.5')} {/if} {/snippet} {#snippet scriptHeaderActions()} {#if script} {@render autosaveIndicator()} {#if $enterpriseLicense && initialPath != '' && !inSessionPane} {/if} {@render rightButtons()} {/if} {/snippet} {#snippet languageButton(size: number)} {/snippet} {#snippet autosaveIndicator()} {#if opWorkspace} {/if} {/snippet} {#snippet settingsBadges(className?: string)} {@const canOpenRuntime = customUi?.topBar?.settings != false && customUi?.settingsPanel?.disableRuntime !== true} { selectedTab = 'runtime' metadataOpen = true } : undefined} /> {/snippet} {#snippet rightButtons()} {#snippet settingsButton()} {#if customUi?.topBar?.settings != false} {/if} {/snippet} {#snippet diffButton()} {#if customUi?.topBar?.diff != false} {@const isDraftOnly = savedScript?.no_deployed === true} {@const diffDisabled = !savedScript || !diffDrawer || isDraftOnly} {@const diffTitle = isDraftOnly ? 'Deploy this script once to compare against the deployed version' : 'Diff'}
{/if} {/snippet} {#if compactTopbar} {#snippet buttonReplacement()}
{/if} {#if isDbt} saveDraft()} on:saveDraft={() => saveDraft()} bind:editor bind:this={scriptEditor} bind:schema={script.schema} path={script.path} bind:code={script.content} timeout={script.timeout} tag={script.tag} deployedHash={deployedScriptHash} bind:args bind:modules={script.modules} /> {:else} { saveDraft() }} on:saveDraft={() => { saveDraft() }} on:openTriggers={openTriggers} on:applyArgs={applyArgs} on:addPreprocessor={addPreprocessor} bind:editor bind:this={scriptEditor} bind:schema={script.schema} path={script.path} stablePathForCaptures={initialPath || fakeInitialPath} bind:code={script.content} lang={script.language} timeout={script.timeout} kind={script.kind} autoKind={script.auto_kind} {template} tag={script.tag} lastSavedCode={savedScript?.content} lastDeployedCode={savedScript?.content} bind:args bind:hasPreprocessor bind:captureTable bind:assets={script.assets} bind:modules={script.modules} enablePreprocessorSnippet {testPanelCollapsed} /> {/if} {:else} Script Builder not available to operators {/if}

A dbt script is a whole dbt project: the files are the script's module bundle, the content is a wm_dbt.yaml descriptor, and the models become dbt:// assets in the graph.

Expect rough edges, and expect details to move: the descriptor's fields, what a run returns, and how the graph is stored are all still settling.

Deploying and running work today, and an existing project needs no changes — cp -r it into the script's folder and push. Nothing here is load-bearing for other languages.

Docs · report anything surprising, it is the most useful thing at this stage.