Summary
agentworkforce deploy does not compile a TypeScript persona — it reads the path and JSON.parses it, so it requires a pre-built persona.json. Passing a persona.ts fails. Meanwhile the documented compile step (agentworkforce persona compile) is not present in the CLI version I have (3.0.22), so there's no first-party way to produce the persona.json that deploy needs. This bites any persona that does work at module-evaluation time (e.g. embedding a sibling file into an input at compile).
Environment
- CLI:
agentworkforce 3.0.22 (also 3.0.21 via npx)
@agentworkforce/persona-kit / @agentworkforce/runtime: ^3.0.24
Repro
# 1) deploy does not compile .ts — it JSON-parses the path
$ agentworkforce deploy ./churn-digest/persona.ts --mode cloud --dry-run --no-prompt
workforce deploy → .../churn-digest/persona.ts
agentworkforce deploy failed: persona JSON at .../churn-digest/persona.ts is not valid JSON:
Unexpected token 'i', "import { r"... is not valid JSON
# 2) but the compile subcommand the docs/examples assume doesn't exist
$ agentworkforce persona compile ./churn-digest/persona.ts
Unknown subcommand "persona".
For reference, deploy's preflight is readFile(path) → JSON.parse(raw) (packages/deploy preflight.js), and the bundler copies persona.json verbatim (require('./persona.json')), so a JSON spec is mandatory.
The published examples assume the subcommand exists — e.g. agents/package.json:
"compile": "for d in */persona.ts; do agentworkforce persona compile \"$d\"; done"
Impact
There's no supported path from persona.ts → persona.json with this CLI, so deploy can't be used with TS-authored personas without hand-writing JSON or shipping your own build step. (Workaround I'm using: a small tsx-based script that imports each persona.ts from its real path and serializes the default export — this also preserves import.meta.url, which matters for personas that read sibling files at compile time.)
Requests (any one would resolve it)
deploy accepts a .ts path and compiles it in-process (detect extension; evaluate the module; serialize the default export) before preflight.
- Ship/restore
agentworkforce persona compile so the documented/example workflow works, and make deploy suggest it when handed a .ts.
- At minimum, document the required compile step and ensure the example repos don't reference a subcommand the CLI doesn't provide.
Secondary: trigger-registry drift (confusing lint warnings)
Deploy-time trigger lint (CLI 3.0.22) disagrees with persona-kit 3.0.24's KNOWN_TRIGGERS:
slack: deploy lint says known: app_mention, message.channels and warns on message.created, but persona-kit 3.0.24 lists message.created (and message.updated/deleted) as valid. Authors don't know which name actually fires at runtime.
google-mail: deploy lint reports provider "google-mail" is not in the known-trigger registry (it's keyed as gmail in persona-kit's catalog, while the connect/provider id is google-mail).
These are non-fatal warnings, but the slack one is alarming because the event name determines whether the agent fires at all. Aligning the deploy CLI's registry with the shipped persona-kit catalog (or documenting the canonical event names per provider) would remove the ambiguity.
Summary
agentworkforce deploydoes not compile a TypeScript persona — it reads the path andJSON.parses it, so it requires a pre-builtpersona.json. Passing apersona.tsfails. Meanwhile the documented compile step (agentworkforce persona compile) is not present in the CLI version I have (3.0.22), so there's no first-party way to produce thepersona.jsonthatdeployneeds. This bites any persona that does work at module-evaluation time (e.g. embedding a sibling file into an input at compile).Environment
agentworkforce3.0.22 (also 3.0.21 via npx)@agentworkforce/persona-kit/@agentworkforce/runtime:^3.0.24Repro
For reference,
deploy's preflight isreadFile(path)→JSON.parse(raw)(packages/deploypreflight.js), and the bundler copiespersona.jsonverbatim (require('./persona.json')), so a JSON spec is mandatory.The published examples assume the subcommand exists — e.g.
agents/package.json:Impact
There's no supported path from
persona.ts→persona.jsonwith this CLI, sodeploycan't be used with TS-authored personas without hand-writing JSON or shipping your own build step. (Workaround I'm using: a smalltsx-based script that imports eachpersona.tsfrom its real path and serializes the default export — this also preservesimport.meta.url, which matters for personas that read sibling files at compile time.)Requests (any one would resolve it)
deployaccepts a.tspath and compiles it in-process (detect extension; evaluate the module; serialize the default export) before preflight.agentworkforce persona compileso the documented/example workflow works, and makedeploysuggest it when handed a.ts.Secondary: trigger-registry drift (confusing lint warnings)
Deploy-time trigger lint (CLI 3.0.22) disagrees with
persona-kit3.0.24'sKNOWN_TRIGGERS:slack: deploy lint saysknown: app_mention, message.channelsand warns onmessage.created, but persona-kit 3.0.24 listsmessage.created(andmessage.updated/deleted) as valid. Authors don't know which name actually fires at runtime.google-mail: deploy lint reportsprovider "google-mail" is not in the known-trigger registry(it's keyed asgmailin persona-kit's catalog, while the connect/provider id isgoogle-mail).These are non-fatal warnings, but the
slackone is alarming because the event name determines whether the agent fires at all. Aligning the deploy CLI's registry with the shippedpersona-kitcatalog (or documenting the canonical event names per provider) would remove the ambiguity.