Skip to content

fix(release): unbreak Release workflow's Count agents step#97

Merged
telivity-otaip merged 1 commit into
mainfrom
fix/release-count-agents-import
May 6, 2026
Merged

fix(release): unbreak Release workflow's Count agents step#97
telivity-otaip merged 1 commit into
mainfrom
fix/release-count-agents-import

Conversation

@telivity-otaip
Copy link
Copy Markdown
Collaborator

Summary

Hotfix: every push-to-main since #93 (incl. #95 and #96) has failed the Release workflow's Count agents step. Result: v0.7.1 hasn't been tagged or published despite #96 being merged, and the GitHub front page still shows v0.7.0.

Root cause

#93 moved discoverAgents into @otaip/core and made the CLI a re-export. scripts/count-agents.ts imports through the CLI, so the indirection now forces tsx to resolve @otaip/core through its package.json exports map — which points at ./dist/index.js. The Release workflow's Count agents step runs before any build, so the file doesn't exist:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined
in /home/runner/work/otaip/otaip/packages/cli/node_modules/@otaip/core/package.json

Fix

Import discoverAgents directly from packages/core/src/discovery/agent-discovery.js so tsx walks files instead of resolving a package specifier. The CLI keeps its re-export untouched — every external consumer of @otaip/cli is unaffected.

Test plan

  • One-line import path change; same export, no behavior delta.
  • CI green on this PR.
  • On merge: Release workflow on the merge commit should succeed → tags v0.7.1 → triggers Publish to npmnpm view @otaip/core version returns 0.7.1.

🤖 Generated with Claude Code

#93 moved discoverAgents into @otaip/core and made the CLI a re-export.
scripts/count-agents.ts still imported via the CLI, so the indirection
forced tsx to resolve `@otaip/core` through its package.json exports
map — which points at `./dist/index.js`. The Release workflow runs
this script before any build, so the file doesn't exist:

    Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined
    in .../packages/cli/node_modules/@otaip/core/package.json

Result: every push-to-main since #93 has failed the Release workflow's
"Count agents" step, which means v0.7.0 → v0.7.1 hasn't been tagged or
published. Visible to users as "GitHub still shows 0.7.0" + npm still
on 0.7.0 for non-hotelbeds packages.

Fix: import discoverAgents directly from its source path
`packages/core/src/discovery/agent-discovery.js` so tsx walks files
instead of resolving a package specifier. The CLI keeps its
re-export — every external consumer of `@otaip/cli` is unaffected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@telivity-otaip telivity-otaip merged commit bbcdcc4 into main May 6, 2026
1 check passed
@telivity-otaip telivity-otaip deleted the fix/release-count-agents-import branch May 6, 2026 16:48
ntbpy pushed a commit to ntbpy/AI_Agent_otaip that referenced this pull request May 11, 2026
 fix

Patch bump off v0.7.1. Three pieces:

- TelivityAI#99 @otaip/adapter-duffel adds Cars (search → quote → book → get
  → cancel) under /cars/. Same Bearer auth, AbortSignal threading
  on request(). 8 open DOMAIN_QUESTIONs captured in
  docs/knowledge-base/cars.md.
- TelivityAI#97 unbreaks the Release workflow's Count agents step that TelivityAI#93's
  CLI re-export indirection broke. Every push-to-main since TelivityAI#93
  had been failing silently — that's why v0.7.1's tag was created
  but the workspace npm bumps lagged behind for a while.
- TelivityAI#98 switches gh release create to RELEASE_PAT so the
  release: published event propagates to the Publish workflow.
  This is the first release that should auto-publish to npm
  without a manual workflow_dispatch.

Workspace-wide bump: 17 package.json files 0.7.1 → 0.7.2
(@otaip/adapter-duffel was already at 0.7.2 from TelivityAI#99). Going
forward, the next release is v0.7.3.

See CHANGELOG.md for details.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant