chore: bump Workforce pins to 4.1.43 so the relayflows dep resolves honestly

Merged
KH
2mo ago
+2661-265

Follow-up to #112, which Codex flagged as P1 — correctly.

The problem

#112 added @relayflows/core@^1.0.6, which declares:

@agentworkforce/persona-kit      ^4.1.39
@agentworkforce/persona-registry ^4.1.39

while this repo's global override pinned persona-kit to 4.1.23. npm overrides suppress that incompatibility, so npm install succeeds while core/registry load against a persona-kit below their declared minimum — nothing fails until agent startup.

The change

Every @agentworkforce/* pin and the agentworkforce CLI: 4.1.23 → 4.1.43, in both dependencies and overrides, so no package is left resolving behind an override.

$ npm ls @relayflows/core @agentworkforce/persona-kit --depth=1
└─┬ @relayflows/core@1.0.6
  ├── @agentworkforce/persona-kit@4.1.43 deduped
  └── @agentworkforce/persona-registry@4.1.43

Ranges satisfied rather than overridden.

The bump surfaced a real typing break

Which is rather the point of doing it. At 4.1.43, ctx.persona.id is unknown:

WorkforcePersonaContext extends Omit<PersonaSpec, 'inputs'>
PersonaSpec { …; [key: string]: unknown }   // consumer-defined fields

Omit over an index signature collapses every declared field — id, description, intent — to unknown. aliasVariants in linear/agent.ts now takes unknown and narrows, which is also strictly safer than the old string | undefined signature that would have thrown on .trim() had a non-string ever arrived.

That collapse looks like an upstream typing defect worth fixing in runtime/persona-kit rather than worked around at every call site — any handler reading ctx.persona.<field> hits it. This PR only unblocks the one site here.

Verified

  • tsc --noEmit — 0 errors
  • npm test — 250/250
  • npm run compile — all 8 personas compile

Two caveats, both environmental

Neither is attributable to this change, and I'd rather flag them than imply a clean sweep:

  1. npm test initially failed 2/250 with ENOENT workforce/packages/harness-kit/package.json. harness-kit was deleted upstream (workforce 451a5305) and my checkout retained an orphaned untracked dist/. workforce-package-proof.mjs enumerates packages/* and reads each package.json, so the orphan breaks it. Moving the two orphan dirs (harness-kit, relay-helpers) aside gave 250/250; restored afterwards. Suggest the script skip directories without a package.json so a stale checkout can't fail the suite.
  2. acceptance:composable-runtime-closure exits 1 after ~20s with no output. The globally installed agentworkforce CLI here is 4.1.22 against repo-local 4.1.43, and the harness invokes it. I couldn't attribute the failure to this change, so I'm leaving it for CI rather than claiming a pass I hadn't established.

🤖 Generated with Claude Code


Summary by cubic

Aligns all @agentworkforce/* pins and the agentworkforce CLI from 4.1.23 to 4.1.43 so @relayflows/core@^1.0.6 resolves against supported persona-kit/persona-registry versions instead of being masked by overrides. Updates linear/agent.ts to accept unknown for persona fields introduced by persona-kit@4.1.43; previously aliasVariants assumed a string and could throw, now it narrows safely.

Review notes

  • Dependencies and overrides both pin @agentworkforce/* to 4.1.43; npm ls shows @relayflows/core@1.0.6 deduped to @agentworkforce/persona-kit@4.1.43 and @agentworkforce/persona-registry@4.1.43.
  • aliasVariants(value: unknown) adds a typeof check; behavior is unchanged for strings and returns [] for non-strings.
  • If running acceptance locally, upgrade your global agentworkforce to 4.1.43.