@ekanos/cli 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +1 -0
  2. package/dist/commands/agents-edit.d.ts +49 -0
  3. package/dist/commands/agents-edit.js +385 -0
  4. package/dist/commands/agents-edit.js.map +1 -0
  5. package/dist/commands/agents.d.ts +24 -1
  6. package/dist/commands/agents.js +117 -8
  7. package/dist/commands/agents.js.map +1 -1
  8. package/dist/commands/apps.d.ts +6 -2
  9. package/dist/commands/apps.js +249 -4
  10. package/dist/commands/apps.js.map +1 -1
  11. package/dist/commands/reviewers.d.ts +21 -0
  12. package/dist/commands/reviewers.js +162 -0
  13. package/dist/commands/reviewers.js.map +1 -0
  14. package/dist/commands/routes.d.ts +23 -0
  15. package/dist/commands/routes.js +277 -0
  16. package/dist/commands/routes.js.map +1 -0
  17. package/dist/commands/runs.d.ts +42 -0
  18. package/dist/commands/runs.js +362 -0
  19. package/dist/commands/runs.js.map +1 -0
  20. package/dist/commands/skills.d.ts +60 -0
  21. package/dist/commands/skills.js +397 -0
  22. package/dist/commands/skills.js.map +1 -0
  23. package/dist/commands/team-agents-agents.d.ts +9 -0
  24. package/dist/commands/team-agents-agents.js +188 -0
  25. package/dist/commands/team-agents-agents.js.map +1 -0
  26. package/dist/commands/team-agents-mcp.d.ts +4 -0
  27. package/dist/commands/team-agents-mcp.js +218 -0
  28. package/dist/commands/team-agents-mcp.js.map +1 -0
  29. package/dist/commands/team-agents-triggers.d.ts +12 -0
  30. package/dist/commands/team-agents-triggers.js +251 -0
  31. package/dist/commands/team-agents-triggers.js.map +1 -0
  32. package/dist/commands/team-agents.d.ts +31 -0
  33. package/dist/commands/team-agents.js +71 -0
  34. package/dist/commands/team-agents.js.map +1 -0
  35. package/dist/commands/teams-onboard.d.ts +51 -0
  36. package/dist/commands/teams-onboard.js +261 -0
  37. package/dist/commands/teams-onboard.js.map +1 -0
  38. package/dist/commands/teams.d.ts +16 -1
  39. package/dist/commands/teams.js +22 -3
  40. package/dist/commands/teams.js.map +1 -1
  41. package/dist/connections-api.d.ts +125 -0
  42. package/dist/connections-api.js +156 -0
  43. package/dist/connections-api.js.map +1 -0
  44. package/dist/index.js +226 -6
  45. package/dist/index.js.map +1 -1
  46. package/dist/reviewers-api.d.ts +33 -0
  47. package/dist/reviewers-api.js +81 -0
  48. package/dist/reviewers-api.js.map +1 -0
  49. package/dist/routes-api.d.ts +105 -0
  50. package/dist/routes-api.js +147 -0
  51. package/dist/routes-api.js.map +1 -0
  52. package/dist/runs-api.d.ts +34 -0
  53. package/dist/runs-api.js +112 -0
  54. package/dist/runs-api.js.map +1 -0
  55. package/dist/skills-api.d.ts +28 -0
  56. package/dist/skills-api.js +104 -0
  57. package/dist/skills-api.js.map +1 -0
  58. package/dist/teams-api.d.ts +45 -3
  59. package/dist/teams-api.js +72 -3
  60. package/dist/teams-api.js.map +1 -1
  61. package/package.json +2 -2
  62. package/templates/package.json.tmpl +4 -4
  63. package/templates/skills/build-agent/SKILL.md +94 -10
  64. package/templates/skills/build-agent/references/agent-json.md +85 -4
  65. package/templates/skills/build-agent/references/rollout.md +9 -1
  66. package/templates/skills/build-agent/references/set-up-an-integration.md +59 -3
  67. package/templates/skills/build-agent/references/skills.md +81 -0
  68. package/templates/skills/build-agent/references/triggers.md +25 -5
  69. package/templates/skills/ekanos-platform/SKILL.md +116 -5
@@ -34,11 +34,42 @@ docs — ask, or check the CLI.
34
34
  | Seat | Can |
35
35
  |---|---|
36
36
  | `developer` | Submit integrations; read the catalog; apply agent **drafts** |
37
- | `source_admin` | Everything a developer can, plus **publish** agents to every team, set up the Source's **provider apps** (`ekanos apps`), and manage the Source's roster |
37
+ | `source_admin` | Everything a developer can, plus **publish** agents to every team, set up the Source's **provider apps** (`ekanos apps`), name its **reviewers** (`ekanos reviewers`), and manage the Source's roster |
38
38
 
39
39
  Only an Ekanos super admin grants seats. If the user lacks the seat a step
40
40
  needs, say which and stop — there is no way around it from the CLI.
41
41
 
42
+ ## Onboarding a team (Source admin)
43
+
44
+ A Source admin can stand a team up end to end from the terminal. Every
45
+ command takes `--source <slug>` (else the Source `ekanos use` set) and
46
+ `--json`:
47
+
48
+ ```sh
49
+ npx @ekanos/cli teams create "Bank A" --slug bank-a # you are its owner
50
+ npx @ekanos/cli teams create "Bank A" --owner ana@bank-a.com # ana is invited as owner
51
+ npx @ekanos/cli teams roles list bank-a # roles + permissions (e.g. agents.review)
52
+ npx @ekanos/cli teams members invite bank-a raj@bank-a.com --role admin # default role: member
53
+ npx @ekanos/cli teams members list bank-a # members and pending invitations
54
+ npx @ekanos/cli teams members role bank-a raj@bank-a.com member
55
+ npx @ekanos/cli teams members remove bank-a raj@bank-a.com --yes
56
+ npx @ekanos/cli teams connect bank-a zendesk # the link a member opens to connect
57
+ ```
58
+
59
+ - `create` without `--owner` seats the person running it as the team's
60
+ owner. With `--owner`, that person gets the invitation email and becomes
61
+ the owner when they accept. Say which happened.
62
+ - An invitation is an email sent from the Source's own address; the person
63
+ joins when they accept it. `members role` / `members remove` on someone who
64
+ has not accepted yet change or withdraw the invitation.
65
+ - Roles are the team roles (owner / admin / member, or the Source's own
66
+ customized ones). Pick a reviewer for agents by the role holding
67
+ `agents.review` in `teams roles list`. The primary owner's role cannot be
68
+ changed here; ownership moves in the app.
69
+ - Connecting an integration is always a team member signing in in their
70
+ browser. `teams connect` prints the link to send them and whether the team
71
+ is connected yet; `teams show <team> <product>` has the full checklist.
72
+
42
73
  ## Products: integrations and experiences
43
74
 
44
75
  Everything in the catalog (`npx @ekanos/cli catalog --source <slug> --json`) is a
@@ -66,8 +97,12 @@ Ask them in this order; each catalog product reports where it stands
66
97
  connection: two teams using Linear each connect their own. A Source admin
67
98
  can do a team's setup for it from the terminal (`ekanos teams show`,
68
99
  `ekanos teams app set`, `ekanos teams webhook`), but signing in is a click
69
- by someone on the team. One connection for the whole Source, shared by
70
- every team's agents, is not available yet.
100
+ by someone on the team. For integrations that support it, a Source admin
101
+ can instead connect **once for the whole Source** (`ekanos apps connect`),
102
+ for provided agents only: events are routed to teams by a value inside
103
+ them (`ekanos routes`, Zendesk by organization), and each team's agent
104
+ works only inside its own routed values. A team never sees that
105
+ connection.
71
106
  3. **Set up by the team** where needed — some integrations have each team
72
107
  bring its own app (a team-provided app: client id, secret, webhook signing
73
108
  secret entered in Ekanos). Those secrets are typed into the app, never
@@ -97,12 +132,78 @@ changed through the CLI or the app, with no deploy.
97
132
  - **Provided for every team** — a Source admin defines it once with
98
133
  `ekanos agents` (a template). Each team sees it under Agents → "Provided for
99
134
  your team" and turns it on; it then runs on that team's own connections.
100
- Publishing a new version updates every team that follows it.
135
+ Publishing a new version updates every team that follows it. The template
136
+ can also set what starts it (triggers), which other agents it works with
137
+ (links) and which calls wait for approval, and — per area, with
138
+ `teamOverrides` — whether a team may change them. The template wins unless
139
+ an area is opened to teams.
101
140
  - **A team's own** — built by a team in the app (Agents → New). Only that team
102
141
  has it, and the Source cannot update it.
103
142
 
143
+ Skills are folders (`SKILL.md` + references) an agent loads when needed.
144
+ A Source admin pushes them with `ekanos skills push <dir>`: at Source level
145
+ every team can use them, with `--team <slug>` only that team can.
146
+
104
147
  The `build-agent` skill walks through choosing between these and building one.
105
148
 
149
+ A Source admin can also do a team's agent setup from the terminal, acting on
150
+ that team (every write is recorded under the admin's own name). The shape is
151
+ always `ekanos teams <area> <verb> <team> …`:
152
+
153
+ - `ekanos teams agents list <team>` — provided agents, on or off, the version
154
+ each runs (pinned or following), triggers, links, the team's MCP servers,
155
+ and what each still needs connected.
156
+ - `ekanos teams agents enable <team> <key> [--as <member-email>]` /
157
+ `disable <team> <key>` — the app's "Turn on" / "Turn off". The agent runs
158
+ as a team member who manages agents (the team's owner by default); that
159
+ person confirms in the app that it may use their connections.
160
+ - `ekanos teams agents pin <team> <key> <version>` / `unpin <team> <key>`.
161
+ - `ekanos teams agents policy <team> <key>` — every tool the agent can call,
162
+ read or write, and whether it runs on its own or waits for approval;
163
+ `… policy <team> <key> set <tool> auto|approve`, `unset <tool>`,
164
+ `--reads auto|approve --writes auto|approve`. A provided agent's policy
165
+ follows its template unless the template turns on team overrides for it.
166
+ - `ekanos teams triggers list|add|remove <team> <key> …` — manual, schedule
167
+ (`--cron`, `--timezone`), webhook (URL and token shown once) and
168
+ integration events (`event zendesk.ticket_created --filter '{…}'`).
169
+ - `ekanos teams links list|add|remove <team> <from-key> [<to-key>] --kind
170
+ talk|delegate [--mode await|handoff]`.
171
+ - `ekanos teams mcp list|add|status|token|effect <team> [<server-key> …]` — a
172
+ team's own MCP server (`--url`, `--auth none|token|oauth`); a token is typed
173
+ at the admin's terminal with hidden input, never in chat or arguments; OAuth
174
+ prints a link for a team member to open.
175
+
176
+ Triggers, links and the policy of a provided agent follow its template by
177
+ default; when the template has not turned on team overrides for that area,
178
+ these commands show the template's settings and refuse to change them.
179
+
180
+ ### Reviewers
181
+
182
+ A call that waits for a person (the `approve` policy — a customer reply
183
+ draft, usually) is decided by the Source's **named reviewers**. A Source
184
+ admin picks them from the Source's own users — anyone who is a member of one
185
+ of its teams — each at a reach:
186
+
187
+ - **`source`** — decides drafts from every team's provided agents, in the
188
+ Source's review queue at `/reviews` (reviewers are managed at
189
+ `/management/reviewers`).
190
+ - **`team`** — decides one named team's drafts, from the same review queue
191
+ (they need not be a member of that team).
192
+
193
+ The first decision settles a draft for everyone; it then leaves every other
194
+ reviewer's queue.
195
+
196
+ ```
197
+ npx @ekanos/cli reviewers list --source <slug> --json
198
+ npx @ekanos/cli reviewers add <email> --reach source --source <slug>
199
+ npx @ekanos/cli reviewers add <email> --reach team --team <team-slug> --source <slug>
200
+ npx @ekanos/cli reviewers remove <email> [--team <team-slug>] --source <slug>
201
+ ```
202
+
203
+ `remove` without `--team` takes the person off at every reach; with it, only
204
+ that team's. Adding someone who is not a member of any of the Source's teams
205
+ is refused (`USER_NOT_IN_SOURCE`): `ekanos teams list` shows the teams.
206
+
106
207
  ## Where each thing is done
107
208
 
108
209
  | Done by | Where |
@@ -110,6 +211,16 @@ The `build-agent` skill walks through choosing between these and building one.
110
211
  | Making a product available to a Source; granting seats | Ekanos super admin, in Ekanos's admin |
111
212
  | Building or updating an integration | A developer, with `ekanos validate` / `ekanos publish` |
112
213
  | Agents provided for every team | A Source admin, with `ekanos agents` |
214
+ | Testing an unpublished agent version on one team | A Source admin, with `ekanos agents test <key> --team <slug>` |
215
+ | Running a team's agent, reading its runs (transcript, tool calls) | A team's agent manager in the app, or a Source admin with `ekanos runs` |
216
+ | Deciding what an agent run waits on (approve, reject, edit & send a reply) | A team's agent manager in the app, or a Source admin with `ekanos approvals` |
217
+ | Skills (SKILL.md folders) for every team, or one team's own | A Source admin, with `ekanos skills push` (`--team <slug>` for one team) |
218
+ | Who decides agent drafts that wait for a person | A Source admin, with `ekanos reviewers` |
113
219
  | An integration's app for the whole Source (client ID and secret) | A Source admin, with `ekanos apps set` at their own terminal |
220
+ | One connection for the whole Source, used by provided agents in every team | A Source admin, with `ekanos apps connect` (status: `ekanos apps show`), or **Shared integrations › Connections** in the Source admin area |
221
+ | Which team gets which events on that connection (Zendesk organization → team) | A Source admin, with `ekanos routes` (`webhook`, `options`, `set`, `list`, `remove`, `unrouted`, `replay`), or **Shared integrations › Routing** in the Source admin area |
114
222
  | A team's own app for an integration (client ID, secrets, webhook URL) | The team in the app, or a Source admin with `ekanos teams` |
115
- | Connecting an integration; turning on a provided agent; its triggers | Each team, in the app |
223
+ | A provided agent's triggers, links and approvals | A Source admin, in the template (`ekanos agents triggers / links / policy / overrides`); teams change them only where `teamOverrides` allows |
224
+ | Creating a team, inviting its members, changing their roles | A Source admin, with `ekanos teams create` / `ekanos teams members` (or the team's owner in the app) |
225
+ | Connecting an integration (signing in) | Each team, in the app |
226
+ | Turning on a provided agent for a team, pinning its version, its triggers, links, MCP servers and approval policy | Each team in the app, or a Source admin with `ekanos teams agents\|triggers\|links\|mcp` |