Repository navigation
feat(web): onboarding supplies the Myra deploy input (CL-8154) - #758
Merged
Merged
Conversation
…fe subpath Myra's system prompt, tool-package pins, and workflow/step ids now live in workflows/assistant/src/prompt.ts, which imports nothing but a type-only ToolPackagePin. index.ts re-exports the same names so no existing consumer needs to change. This is prep for CL-8154: apps/web needs these constants to hand-build Myra's deployable definition client-side, but importing the package's default entry point pulls in @intx/workflow/@intx/agent's Node-bound runtime (file locking, in particular) that a browser bundle cannot resolve. Claude-Session: https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG
After T7 (#753), the onboarding page drove install over stock routes but never supplied myraDeploy, so every fresh hub stopped on the "Myra is absent" gap screen. This wires the converge loop the owner ruled on: authenticate, mint the primary tenant if needed, resolve whether it already has a usable model offering (inherited, or a previous run), and ask the operator for a provider credential only when it doesn't — never a multi-step wizard. myra-source.ts pins the deploy-source variant apps/web actually uses: neither `registry` (workflows/assistant is unpublished) nor a git-pushed `asset` "source" (the push helper shells out to a system git binary and node:fs, unavailable to a browser SPA) work today. The `asset` "tarball" variant does: PUT /api/tenants/:id/assets/:assetId/ tarballs/:filename takes raw bytes over plain fetch, no git protocol. myra-deploy.ts hand-builds the exact WorkflowDefinition JSON `buildAssistantWorkflow` would produce (from the browser-safe prompt data split out of workflows/assistant), packs it into an npm-shaped tarball with a hand-rolled USTAR writer plus the browser's own CompressionStream("gzip"), and PUTs it into a package-registry asset. provider-connect-step.tsx is the one prompt this flow asks for: three providers, each mapping to one canonical model, so connecting a provider mints exactly one offering and needs no separate "which model" pick. A tenant that already resolves a catalog offering skips this screen entirely. needs-converge.ts's HubTenant/TenantShape now carries the tenant's `domain` field the stock tenant route already returns — needed to derive Myra's trigger address, and no hub change since the field was already there. Deleted the old test asserting the pre-CL-8154 "surfaces the myra-deploy gap" behavior; replaced it with one asserting the new credential-connect landing. Claude-Session: https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG
TheGreatAxios
force-pushed
the
cl-8154-myra-deploy-input
branch
from
September 17, 2026 17:17
59052ad to
7db8f7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After T7 (#753), the onboarding page drove install over stock routes but never supplied
myraDeploytoconvergeNeedsList, so every fresh hub landed on the "Myra is absent" gap screen. This wires the converge loop the owner ruled on: authenticate → mint the primary tenant if needed → resolve whether it already has a usable model offering (inherited, or a previous run of this flow) → ask the operator for a provider credential only when it doesn't. No hub changes, no seed logic, everything over stock routes.Deploy-source variant chosen, and why
WorkflowDefinitionSourcehas two variants (registry,asset). Neither of the "obvious" choices actually installs today for@corbits/assistant-workflow:registry(the ticket's stated default): the package isprivate: trueand unpublished to any registry — CL-8151's job, not done yet. Selecting it today would just move the failure from "no myraDeploy" to "registry has nothing to resolve."asset+package.format: "source"(git-pushed codebase, whatpackages/onboarding'sseedTenantand the e2e harness use): the pusher (createGitWorkflowPusher) shells out to a systemgitbinary andnode:fs/node:child_process— fundamentally unavailable to a browser SPA.workflows/assistant's own package also exports builder functions (buildAssistantWorkflow), not a default-exportedWorkflowDefinition, so even a hub-side push of the real package wouldn't satisfy the source-tree installer's shape today.What does work, fully client-side, over plain
fetch, no git protocol, no hub change:asset+package.format: "tarball".PUT /api/tenants/:id/assets/:assetId/tarballs/:filenametakes raw npm-shaped tarball bytes over a stock REST route.myra-deploy.ts:package-registryasset exists (409-then-list, same idempotency pattern asensureWorkflowAsset).WorkflowDefinitionJSONbuildAssistantWorkflowwould produce — not by calling that function (importing@corbits/assistant-workflowdirectly pulls in@intx/workflow/@intx/agent's Node-bound runtime, confirmed by a failedapps/webbuild), but from plain data split into a new browser-safe subpath,@corbits/assistant-workflow/prompt(system prompt, tool-package pins, ids — zero runtime imports).CompressionStream("gzip"), and PUTs it in.WorkflowDeployInput(buildMyraDeployInput, the one piece with real logic — unit tested).Credential/offering step
provider-connect-step.tsxis the one prompt this flow asks for, and only when needed: three providers (Anthropic, OpenAI, Google), each mapping to one canonical model, so connecting a provider mints exactly one offering with no separate "which model" pick. A tenant that already resolves a catalog offering (inherited, or a previous run) skips this screen entirely —resolveExistingOfferingmirrorsresolveRealSourceOfferingIds's "lowest priority wins the default" rule.Other changes
needs-converge.ts'sHubTenant/TenantShapenow parses thedomainfield the stock tenant route already returns (needed to derive Myra's trigger addressassistant@<domain>) — no hub change, the field was already there.Verified
bun run typecheck,bun run lint,bun run check:structuralall clean (0 fail;report-error/ui-vocabulary/web-tailwind-utilitiesallok).bun run buildinapps/websucceeds (confirmed the naive approach — importing@corbits/assistant-workflowdirectly, and the bare@corbits/workflowsentry point — fails the build by pulling in Node-only code; both are now routed through browser-safe subpaths).apps/web/src/myra-deploy.test.ts(new, the offering→deploy-input mapping), plus the fullapps/websuite andworkflows/assistant's suite pass.Not verified: a live end-to-end walkthrough (
scripts/e2e/browser/walkthrough.tsor driving the real stack withHUB_DATA_DIR=$(mktemp -d)) against a running hub+sidecar — I did not have time in this session to boot the full stack and confirm the sidecar actually resolves and runs a tarball-sourcedpackage-registryasset end to end. The route contracts (PUT .../tarballs/:filename,extractTarballPackageJSON's tar-tail matching,InstallAndApproveAssetTarballArgs) are read from source, not exercised live. This is the one open risk in this PR and should be driven by hand or via CI's e2e suite before considering CL-8154 fully closed.Test plan
bun run typecheckbun run lintbun run check:structuralbun test(apps/web, workflows/assistant)https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG