@ekanos/cli 0.9.0 → 0.11.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 (61) 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 +3 -0
  9. package/dist/commands/apps.js +2 -2
  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/runs.d.ts +42 -0
  15. package/dist/commands/runs.js +362 -0
  16. package/dist/commands/runs.js.map +1 -0
  17. package/dist/commands/skills.d.ts +60 -0
  18. package/dist/commands/skills.js +397 -0
  19. package/dist/commands/skills.js.map +1 -0
  20. package/dist/commands/team-agents-agents.d.ts +9 -0
  21. package/dist/commands/team-agents-agents.js +188 -0
  22. package/dist/commands/team-agents-agents.js.map +1 -0
  23. package/dist/commands/team-agents-mcp.d.ts +4 -0
  24. package/dist/commands/team-agents-mcp.js +218 -0
  25. package/dist/commands/team-agents-mcp.js.map +1 -0
  26. package/dist/commands/team-agents-triggers.d.ts +12 -0
  27. package/dist/commands/team-agents-triggers.js +251 -0
  28. package/dist/commands/team-agents-triggers.js.map +1 -0
  29. package/dist/commands/team-agents.d.ts +31 -0
  30. package/dist/commands/team-agents.js +71 -0
  31. package/dist/commands/team-agents.js.map +1 -0
  32. package/dist/commands/teams-onboard.d.ts +51 -0
  33. package/dist/commands/teams-onboard.js +261 -0
  34. package/dist/commands/teams-onboard.js.map +1 -0
  35. package/dist/commands/teams.d.ts +45 -0
  36. package/dist/commands/teams.js +314 -0
  37. package/dist/commands/teams.js.map +1 -0
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.js +222 -2
  40. package/dist/index.js.map +1 -1
  41. package/dist/reviewers-api.d.ts +33 -0
  42. package/dist/reviewers-api.js +81 -0
  43. package/dist/reviewers-api.js.map +1 -0
  44. package/dist/runs-api.d.ts +34 -0
  45. package/dist/runs-api.js +112 -0
  46. package/dist/runs-api.js.map +1 -0
  47. package/dist/skills-api.d.ts +28 -0
  48. package/dist/skills-api.js +104 -0
  49. package/dist/skills-api.js.map +1 -0
  50. package/dist/teams-api.d.ts +85 -0
  51. package/dist/teams-api.js +168 -0
  52. package/dist/teams-api.js.map +1 -0
  53. package/package.json +2 -2
  54. package/templates/package.json.tmpl +4 -4
  55. package/templates/skills/build-agent/SKILL.md +106 -17
  56. package/templates/skills/build-agent/references/agent-json.md +78 -2
  57. package/templates/skills/build-agent/references/rollout.md +9 -1
  58. package/templates/skills/build-agent/references/set-up-an-integration.md +134 -0
  59. package/templates/skills/build-agent/references/skills.md +78 -0
  60. package/templates/skills/build-agent/references/triggers.md +27 -6
  61. package/templates/skills/ekanos-platform/SKILL.md +115 -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
@@ -62,8 +93,12 @@ Ask them in this order; each catalog product reports where it stands
62
93
  is an Ekanos super admin's step (`setupSteps` names it with actor
63
94
  `ekanos`) — not something a Source admin or the CLI can do.
64
95
  2. **Connected by a team** — a team (or a person, for per-person
65
- integrations) signed in to the third party. Connections belong to a team,
66
- never to the Source: two teams using Linear each connect their own.
96
+ integrations) signed in to the third party. The team account owns the
97
+ connection: two teams using Linear each connect their own. A Source admin
98
+ can do a team's setup for it from the terminal (`ekanos teams show`,
99
+ `ekanos teams app set`, `ekanos teams webhook`), but signing in is a click
100
+ by someone on the team. One connection for the whole Source, shared by
101
+ every team's agents, is not available yet.
67
102
  3. **Set up by the team** where needed — some integrations have each team
68
103
  bring its own app (a team-provided app: client id, secret, webhook signing
69
104
  secret entered in Ekanos). Those secrets are typed into the app, never
@@ -93,12 +128,78 @@ changed through the CLI or the app, with no deploy.
93
128
  - **Provided for every team** — a Source admin defines it once with
94
129
  `ekanos agents` (a template). Each team sees it under Agents → "Provided for
95
130
  your team" and turns it on; it then runs on that team's own connections.
96
- Publishing a new version updates every team that follows it.
131
+ Publishing a new version updates every team that follows it. The template
132
+ can also set what starts it (triggers), which other agents it works with
133
+ (links) and which calls wait for approval, and — per area, with
134
+ `teamOverrides` — whether a team may change them. The template wins unless
135
+ an area is opened to teams.
97
136
  - **A team's own** — built by a team in the app (Agents → New). Only that team
98
137
  has it, and the Source cannot update it.
99
138
 
139
+ Skills are folders (`SKILL.md` + references) an agent loads when needed.
140
+ A Source admin pushes them with `ekanos skills push <dir>`: at Source level
141
+ every team can use them, with `--team <slug>` only that team can.
142
+
100
143
  The `build-agent` skill walks through choosing between these and building one.
101
144
 
145
+ A Source admin can also do a team's agent setup from the terminal, acting on
146
+ that team (every write is recorded under the admin's own name). The shape is
147
+ always `ekanos teams <area> <verb> <team> …`:
148
+
149
+ - `ekanos teams agents list <team>` — provided agents, on or off, the version
150
+ each runs (pinned or following), triggers, links, the team's MCP servers,
151
+ and what each still needs connected.
152
+ - `ekanos teams agents enable <team> <key> [--as <member-email>]` /
153
+ `disable <team> <key>` — the app's "Turn on" / "Turn off". The agent runs
154
+ as a team member who manages agents (the team's owner by default); that
155
+ person confirms in the app that it may use their connections.
156
+ - `ekanos teams agents pin <team> <key> <version>` / `unpin <team> <key>`.
157
+ - `ekanos teams agents policy <team> <key>` — every tool the agent can call,
158
+ read or write, and whether it runs on its own or waits for approval;
159
+ `… policy <team> <key> set <tool> auto|approve`, `unset <tool>`,
160
+ `--reads auto|approve --writes auto|approve`. A provided agent's policy
161
+ follows its template unless the template turns on team overrides for it.
162
+ - `ekanos teams triggers list|add|remove <team> <key> …` — manual, schedule
163
+ (`--cron`, `--timezone`), webhook (URL and token shown once) and
164
+ integration events (`event zendesk.ticket_created --filter '{…}'`).
165
+ - `ekanos teams links list|add|remove <team> <from-key> [<to-key>] --kind
166
+ talk|delegate [--mode await|handoff]`.
167
+ - `ekanos teams mcp list|add|status|token|effect <team> [<server-key> …]` — a
168
+ team's own MCP server (`--url`, `--auth none|token|oauth`); a token is typed
169
+ at the admin's terminal with hidden input, never in chat or arguments; OAuth
170
+ prints a link for a team member to open.
171
+
172
+ Triggers, links and the policy of a provided agent follow its template by
173
+ default; when the template has not turned on team overrides for that area,
174
+ these commands show the template's settings and refuse to change them.
175
+
176
+ ### Reviewers
177
+
178
+ A call that waits for a person (the `approve` policy — a customer reply
179
+ draft, usually) is decided by the Source's **named reviewers**. A Source
180
+ admin picks them from the Source's own users — anyone who is a member of one
181
+ of its teams — each at a reach:
182
+
183
+ - **`source`** — decides drafts from every team's provided agents, in the
184
+ Source's review queue at `/reviews` (reviewers are managed at
185
+ `/management/reviewers`).
186
+ - **`team`** — decides one named team's drafts, from the same review queue
187
+ (they need not be a member of that team).
188
+
189
+ The first decision settles a draft for everyone; it then leaves every other
190
+ reviewer's queue.
191
+
192
+ ```
193
+ npx @ekanos/cli reviewers list --source <slug> --json
194
+ npx @ekanos/cli reviewers add <email> --reach source --source <slug>
195
+ npx @ekanos/cli reviewers add <email> --reach team --team <team-slug> --source <slug>
196
+ npx @ekanos/cli reviewers remove <email> [--team <team-slug>] --source <slug>
197
+ ```
198
+
199
+ `remove` without `--team` takes the person off at every reach; with it, only
200
+ that team's. Adding someone who is not a member of any of the Source's teams
201
+ is refused (`USER_NOT_IN_SOURCE`): `ekanos teams list` shows the teams.
202
+
102
203
  ## Where each thing is done
103
204
 
104
205
  | Done by | Where |
@@ -106,5 +207,14 @@ The `build-agent` skill walks through choosing between these and building one.
106
207
  | Making a product available to a Source; granting seats | Ekanos super admin, in Ekanos's admin |
107
208
  | Building or updating an integration | A developer, with `ekanos validate` / `ekanos publish` |
108
209
  | Agents provided for every team | A Source admin, with `ekanos agents` |
210
+ | Testing an unpublished agent version on one team | A Source admin, with `ekanos agents test <key> --team <slug>` |
211
+ | 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` |
212
+ | 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` |
213
+ | Skills (SKILL.md folders) for every team, or one team's own | A Source admin, with `ekanos skills push` (`--team <slug>` for one team) |
214
+ | Who decides agent drafts that wait for a person | A Source admin, with `ekanos reviewers` |
109
215
  | An integration's app for the whole Source (client ID and secret) | A Source admin, with `ekanos apps set` at their own terminal |
110
- | Connecting an integration; turning on a provided agent; its triggers | Each team, in the app |
216
+ | 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` |
217
+ | 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 |
218
+ | 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) |
219
+ | Connecting an integration (signing in) | Each team, in the app |
220
+ | 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` |