Repository navigation
feat(workflows,tools): cut Workbench-internal imports for standalone publish (CL-8152) - #755
Merged
Merged
Conversation
CL-8152: workflows/* and packages/*-tools are meant to be publishable npm packages any Interchange-backed hub can install, so they can't reach for Workbench-only product config or private root-bucket packages at import time. - @corbits/connections-tools no longer statically imports Workbench's concrete connector set from @workbench/templates/connectors; the tool bundle now takes a connectorRegistry/mcpPresets pair through its env, so any deploying build supplies its own connector lineup. - @corbits/capability-tools and @corbits/workflow-authoring-tools no longer depend on @corbits/workflows (a private, server-heavy root-bucket package) just for its tiny run-bearer-auth fetch helper; each package now carries its own copy. - workflows/assistant's manager-tools scenario test wires the real Workbench connector set in as a devDependency, since it's exercising Myra's actual shipped behavior. Version bumps and pin-literal updates for the three changed tool packages per tool-package-freshness. Claude-Session: https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG
Merged
5 tasks done
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
CL-8152 (under parent CL-8151): the end state is that
workflows/*andevery
packages/*-toolspackage become published npm packages anyInterchange-backed hub can install and deploy through the stock
POST /api/tenants/:id/workflows/deploymentsroute — no Workbench repocheckout, no
vendor/intxreach-through, no Workbench-only hub route.This PR inventories every import in
workflows/*andpackages/*tools*that resolves to something Workbench-internal, and cuts the two real
violations found.
Inventory
Scope scanned: 14
workflows/*packages, 17packages/*tools*packages(
*-tools,tools-*). Searched for@workbench/*imports,@corbits/chat,relative paths escaping the package,
vendor/intx/*relative paths, andworkspace:*deps on non-publishable (private: true) packages.packages/connections-tools/src/tool.ts→@workbench/templates/connectors(CONNECTOR_REGISTRY,MCP_PRESETS)connectorRegistry/mcpPresetsthrough itsWorkflowConnectionEnv, so any deploying build supplies its own connector lineup — same pattern as every other hub-URL env key this bundle already takes. Tests updated with a small local fixture registry instead of the real product set.packages/capability-tools/src/client.ts,packages/workflow-authoring-tools/src/client.ts→@corbits/workflows/client(runBearerHeaders,runBearerFetch,runBearerErrorMessage,RunBearerClientConfig)@corbits/workflows— aprivate: trueroot-bucket package with a large server dependency graph (drizzle-orm,hono,@intx/hub-api, ...), even though the./clientsubpath itself is browser-safesrc/run-bearer.ts) rather than depending on a private package just for this.workflows/assistant/test/manager-tools-scenario.test.ts→ connector envconnections-tools' old static import; broke once that import was cut@workbench/templates/connectorsas a devDependency (test-only — not part of the published package) and wires it into the env, since this scenario deliberately exercises Myra's real shipped connector lineup.Everything else scanned came back clean:
@corbits/chat,../../apps, or../../vendorimports anywherein scope — the handful of hits were doc comments referencing those
paths by name, not actual imports.
vendor/intx/*is reached only through normal@intx/*package deps(
workspace:*resolving to the vendored copy perVENDORED.md'ssanctioned vendoring flow) — never a raw relative path into
vendor/.@corbits/connections/registryand@corbits/connections/mcp-presets(used by
connections-tools) are explicitly documented, browser-safe,generic subpaths of a private package (mirrors
@corbits/workflows/client'spattern) — noted rather than inlined, per the ticket's own exception for
a genuinely-needed Workbench-owned service.
packages/*-toolsandworkflows/*dependency on aworkspace:*package not under@corbits//publishable turned out to bea
devDependency(test-only fixtures, e2e DB harness helpers) — thesenever ship in the published package, so they don't block standalone
install.
Not fixed (out of scope for this ticket)
*-toolspackage (andworkflows/*) is stillpackage.json"private": true— flipping that to actually publish is CL-8151'sbroader end state, not this import-cutting pass.
@corbits/connectionsitself staysprivate: true; only its twogeneric subpaths are consumed here (see inventory above).
Test plan
bun run typecheckbun run check:structural(tool-package-freshness required versionbumps for the three tool packages whose
src/changed:@corbits/capability-tools0.0.5→0.0.6,@corbits/connections-tools0.0.8→0.0.9,
@corbits/workflow-authoring-tools0.0.5→0.0.6, withmatching pin-literal updates in
workflows/assistant/src/index.ts)bun testinpackages/connections-tools,packages/capability-tools,packages/workflow-authoring-tools,workflows/assistantbun run linthas one pre-existing failure (3 unused-var errors inapps/hub/src/index.ts), unrelated to this change and present onorigin/mainbefore this branchhttps://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG