Skip to content

deploy doesn't compile persona.ts (requires prebuilt persona.json); persona compile subcommand missing in 3.0.22 #149

Description

@khaliqgant

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.tspersona.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)

  1. deploy accepts a .ts path and compiles it in-process (detect extension; evaluate the module; serialize the default export) before preflight.
  2. Ship/restore agentworkforce persona compile so the documented/example workflow works, and make deploy suggest it when handed a .ts.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions