Skip to content

feat: OIDC trusted npm publishing + agent workflow tooling#5

Merged
khaliqgant merged 7 commits intomainfrom
feat/trusted-npm-publishing
Apr 10, 2026
Merged

feat: OIDC trusted npm publishing + agent workflow tooling#5
khaliqgant merged 7 commits intomainfrom
feat/trusted-npm-publishing

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Apr 10, 2026

Summary

  • publish.yml: Removed NPM_TOKEN / NODE_AUTH_TOKEN secrets, switched to OIDC trusted publishing. Added npm install -g npm@latest step before publish to avoid stale-runner auth failures. Provenance attestations preserved.
  • persona fix: Corrected @prpm/npm-trusted-publishing skill source scope (was prpm/, now @prpm/)
  • SDK fix: Updated HARNESS_SKILL_TARGETS.opencode.dir from .agents/skills to .opencode/skills to match prpm's actual install path
  • Workflows: Added configure-trusted-publishing.ts (DAG workflow that uses the npm-provenance-publisher persona to automate the publish.yml conversion) and investigate-agent-profile-workflows.ts (investigation workflow exploring auto-generated workflows from --agent flag)
  • Investigation outputs: Design plan, persona analysis, and workflow pattern analysis for the agent-relay run --agent <persona> feature

Test plan

  • configure-trusted-publishing workflow passed all 15 steps (verified via agent-relay run)
  • Verification gates confirmed: no NPM_TOKEN references, id-token: write present, --provenance flag present, npm install -g npm@latest step present, repository.url set
  • pnpm run check passed as final gate
  • Register trusted publisher on npmjs.com for @agentworkforce/workload-router (manual step — required before first OIDC publish)
  • Test a dry-run publish via workflow_dispatch after trusted publisher registration

🤖 Generated with Claude Code


Open with Devin

khaliqgant and others added 2 commits April 10, 2026 16:59
…oling

Replace long-lived NPM_TOKEN with GitHub Actions OIDC trusted publishing
in publish.yml, fix the @PrPM skill source scope and opencode skill
directory in the workload-router SDK, and add agent-relay workflows for
automated publishing configuration and agent-profile investigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…PrPM scope

Align verify-skill-installed path with the corrected opencode skill
directory (.opencode/skills/) and update skill reference to @PrPM scope.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

khaliqgant and others added 4 commits April 10, 2026 17:08
Workflows and investigation outputs now live in AgentWorkforce/build-plans
under the workforce/ directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update regex patterns in index.test.ts to match the corrected
@prpm/npm-trusted-publishing package reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 new potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment thread workflows/configure-trusted-publishing.ts Outdated
Comment thread workflows/configure-trusted-publishing.ts Outdated
Comment thread workflows/finish-npm-provenance-persona.ts Outdated
Comment on lines 86 to +89
- name: Publish to npm
if: ${{ github.event.inputs.dry_run != 'true' }}
working-directory: packages/workload-router
run: npm publish --access public --provenance --tag ${{ github.event.inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --provenance --access public --tag ${{ github.event.inputs.tag }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 NODE_AUTH_TOKEN removed from publish.yml but setup-node still configures registry-url expecting it

In .github/workflows/publish.yml, NODE_AUTH_TOKEN env was removed from both publish steps (lines 81-89), but setup-node@v4 with registry-url: 'https://registry.npmjs.org' (line 49) creates an .npmrc with //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}. For this to work without NODE_AUTH_TOKEN, the package must be configured for npm OIDC trusted publishing on npmjs.com, and npm >= 10.9 (ensured by the new npm install -g npm@latest step) must handle OIDC auth. If the trusted publisher is not yet registered on npmjs.com, or if the npm install -g npm@latest step fails/is skipped, the real publish step will fail with an auth error. This is not inherently a code bug, but a fragile implicit dependency on external npm registry configuration.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@khaliqgant khaliqgant merged commit 71f7496 into main Apr 10, 2026
@khaliqgant khaliqgant deleted the feat/trusted-npm-publishing branch April 10, 2026 15:33
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 6 additional findings in Devin Review.

Open in Devin Review

claude: { asFlag: 'claude', dir: '.claude/skills' },
codex: { asFlag: 'codex', dir: '.agents/skills' },
opencode: { asFlag: 'opencode', dir: '.agents/skills' }
opencode: { asFlag: 'opencode', dir: '.skills' }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 installedManifest hardcodes SKILL.md but opencode format uses .md

The PR aligns the opencode skill directory with prpm's actual behavior (changing from .agents/skills to .skills at line 119), but the installedManifest computation at packages/workload-router/src/index.ts:209 still unconditionally appends /SKILL.md for every harness. The newly added prpm.lock file confirms that the opencode format installs the manifest as npm-trusted-publishing.md, not SKILL.md:

  • Code computes: .skills/npm-trusted-publishing/SKILL.md
  • prpm.lock actual (prpm.lock:62): .skills/npm-trusted-publishing/npm-trusted-publishing.md

For the claude format the SKILL.md assumption is correct (confirmed by prpm.lock:72), so only opencode is affected. Any caller that reads installedManifest to inject the skill into an agent's task body (as suggested by the README) would get a file-not-found for opencode-installed skills.

Prompt for agents
The HARNESS_SKILL_TARGETS map was updated with the correct opencode directory (.skills), but the installedManifest computation in the materializeSkills function (line 209) hardcodes SKILL.md as the manifest filename for all harnesses. The prpm.lock file shows that opencode format uses <packageName>.md (e.g. npm-trusted-publishing.md) instead of SKILL.md, while claude format does use SKILL.md.

To fix this, the HarnessSkillTarget interface (or the HARNESS_SKILL_TARGETS constant) needs to include per-harness manifest filename information. For example, add a manifestFilename field to HarnessSkillTarget: claude uses 'SKILL.md', opencode uses the derived package name + '.md'. Then update line 209 in materializeSkills to use that field instead of the hardcoded 'SKILL.md'. Also add a test case for the opencode harness verifying the correct installedManifest path.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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