@ekanos/cli 0.10.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 (57) 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/reviewers.d.ts +21 -0
  9. package/dist/commands/reviewers.js +162 -0
  10. package/dist/commands/reviewers.js.map +1 -0
  11. package/dist/commands/runs.d.ts +42 -0
  12. package/dist/commands/runs.js +362 -0
  13. package/dist/commands/runs.js.map +1 -0
  14. package/dist/commands/skills.d.ts +60 -0
  15. package/dist/commands/skills.js +397 -0
  16. package/dist/commands/skills.js.map +1 -0
  17. package/dist/commands/team-agents-agents.d.ts +9 -0
  18. package/dist/commands/team-agents-agents.js +188 -0
  19. package/dist/commands/team-agents-agents.js.map +1 -0
  20. package/dist/commands/team-agents-mcp.d.ts +4 -0
  21. package/dist/commands/team-agents-mcp.js +218 -0
  22. package/dist/commands/team-agents-mcp.js.map +1 -0
  23. package/dist/commands/team-agents-triggers.d.ts +12 -0
  24. package/dist/commands/team-agents-triggers.js +251 -0
  25. package/dist/commands/team-agents-triggers.js.map +1 -0
  26. package/dist/commands/team-agents.d.ts +31 -0
  27. package/dist/commands/team-agents.js +71 -0
  28. package/dist/commands/team-agents.js.map +1 -0
  29. package/dist/commands/teams-onboard.d.ts +51 -0
  30. package/dist/commands/teams-onboard.js +261 -0
  31. package/dist/commands/teams-onboard.js.map +1 -0
  32. package/dist/commands/teams.d.ts +16 -1
  33. package/dist/commands/teams.js +22 -3
  34. package/dist/commands/teams.js.map +1 -1
  35. package/dist/index.js +197 -5
  36. package/dist/index.js.map +1 -1
  37. package/dist/reviewers-api.d.ts +33 -0
  38. package/dist/reviewers-api.js +81 -0
  39. package/dist/reviewers-api.js.map +1 -0
  40. package/dist/runs-api.d.ts +34 -0
  41. package/dist/runs-api.js +112 -0
  42. package/dist/runs-api.js.map +1 -0
  43. package/dist/skills-api.d.ts +28 -0
  44. package/dist/skills-api.js +104 -0
  45. package/dist/skills-api.js.map +1 -0
  46. package/dist/teams-api.d.ts +45 -3
  47. package/dist/teams-api.js +72 -3
  48. package/dist/teams-api.js.map +1 -1
  49. package/package.json +2 -2
  50. package/templates/package.json.tmpl +4 -4
  51. package/templates/skills/build-agent/SKILL.md +90 -8
  52. package/templates/skills/build-agent/references/agent-json.md +78 -2
  53. package/templates/skills/build-agent/references/rollout.md +9 -1
  54. package/templates/skills/build-agent/references/set-up-an-integration.md +2 -1
  55. package/templates/skills/build-agent/references/skills.md +78 -0
  56. package/templates/skills/build-agent/references/triggers.md +25 -5
  57. package/templates/skills/ekanos-platform/SKILL.md +108 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekanos/cli",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "private": false,
5
5
  "description": "The Ekanos partner toolchain CLI: scaffold, validate, and test an Ekanos integration against the published @ekanos packages. Agent-native — every verb speaks JSON with a stable exit-code taxonomy.",
6
6
  "keywords": [
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@clack/prompts": "1.7.0",
38
- "@ekanos/integration-schema": "0.13.0",
38
+ "@ekanos/integration-schema": "0.14.0",
39
39
  "esbuild": "0.28.1",
40
40
  "picocolors": "1.1.1"
41
41
  },
@@ -12,12 +12,12 @@
12
12
  "prepare": "node scripts/setup-hooks.mjs"
13
13
  },
14
14
  "dependencies": {
15
- "@ekanos/sdk": "^0.13.0",
16
- "@ekanos/ui": "^0.13.0"
15
+ "@ekanos/sdk": "^0.14.0",
16
+ "@ekanos/ui": "^0.14.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@ekanos/cli": "^0.10.0",
20
- "@ekanos/harness": "^0.7.4",
19
+ "@ekanos/cli": "^0.11.0",
20
+ "@ekanos/harness": "^0.14.0",
21
21
  "@hookform/resolvers": "^5.2.2",
22
22
  "@tailwindcss/postcss": "^4.3.3",
23
23
  "@tanstack/react-query": "^5.101.4",
@@ -68,7 +68,12 @@ through it? It takes about ten minutes." Then follow
68
68
  `references/set-up-an-integration.md`. It covers where the connection should
69
69
  live (each team through the Source's app, each team with its own app, or one
70
70
  for the whole Source), the integration's own steps, one per message, and
71
- checking each one with `ekanos teams show` before moving on. For the
71
+ checking each one with `ekanos teams show` before moving on. If the team
72
+ itself does not exist yet, create it and invite its people first
73
+ (`ekanos teams create`, `ekanos teams members invite`, `ekanos teams roles
74
+ list` to find the role holding `agents.review` for reviewers — see the
75
+ `ekanos-platform` skill, "Onboarding a team"), and send the member who will
76
+ sign in the link from `ekanos teams connect <team> <product>`. For the
72
77
  Source's app itself, `references/app-setup.md` has the console walk-through.
73
78
  Secrets are only ever entered at the user's terminal or in the app.
74
79
 
@@ -88,7 +93,8 @@ in parentheses are the recommendation when the user has no preference.
88
93
  (Reads only to start; add writes once it has earned trust.)
89
94
  4. **What waits for a person.** Reads run on their own, changes wait for
90
95
  approval — and any per-tool exceptions (a public reply to a customer
91
- almost always waits). See `references/agent-json.md` → `policy`.
96
+ almost always waits). See `references/agent-json.md` → `policy`. If
97
+ anything waits, ask who decides it — see **Reviewers** below.
92
98
  5. **Whose connections.** For each product and MCP server, where the
93
99
  connection lives (`references/set-up-an-integration.md` § 2): each team
94
100
  connects its own, and it is `required` (the agent waits at "needs setup"
@@ -98,10 +104,16 @@ in parentheses are the recommendation when the user has no preference.
98
104
  6. **What teams may add** — their own MCP servers, their own skills, more of
99
105
  their own integrations, or narrowing (removing tools, more approvals). All
100
106
  off unless there is a reason. Give one concrete example per knob.
101
- 7. **What starts it** — see `references/triggers.md`. Triggers belong to each
102
- team and are set after turning the agent on; say what each team will have
103
- to set up (an @mention, a label, a new ticket, a schedule) and what it
104
- needs connected first.
107
+ 7. **What starts it** — see `references/triggers.md`. Declare the triggers in
108
+ the template (an event such as `zendesk.ticket_created` with its filters,
109
+ a schedule, a webhook) so every team gets them, or leave them to each
110
+ team. Say what each team needs connected first.
111
+ 8. **Who it works with** — other agents of this Source it may ask or hand
112
+ work to (`links`). A link only exists in a team that runs both agents.
113
+ 9. **What teams may change** — `teamOverrides` per area (approvals,
114
+ triggers, links). Off (the default) means teams follow the template
115
+ exactly; on lets a team keep its own differences. Switching an area off
116
+ later keeps a team's differences but stops applying them.
105
117
 
106
118
  ## 3. Draft, apply, publish
107
119
 
@@ -111,21 +123,91 @@ in parentheses are the recommendation when the user has no preference.
111
123
  The instructions say: the job, the sources of truth and when to consult
112
124
  each, what to do when unsure (ask, or hand to a person), tone, and what
113
125
  never to do. Show the user both files and walk through them.
126
+ Know-how the agent loads only when needed (a policy, a playbook) goes in
127
+ a skill folder, `agents/<key>/skills/<slug>/SKILL.md` — see
128
+ `references/skills.md`. Content only one team may see is a **team
129
+ skill**: `ekanos skills push <dir> --team <team-slug>`.
114
130
  2. On their go: `npx @ekanos/cli agents apply agents/<key> --source <slug> --json`.
115
131
  A refusal (exit 3) lists each problem with its path in the body — explain
116
132
  and fix them together. The stored version is a **draft**: no team sees it.
133
+ Skill folders beside the agent are pushed first and are **live at once**
134
+ (unlike the agent) — say so before applying, and show the user what
135
+ `skills` the output reports as created or changed.
117
136
  3. `npx @ekanos/cli agents show <key> --source <slug>` — review the stored draft
118
137
  with the user.
138
+ Then test it on one team that has turned the agent on, without publishing:
139
+ `npx @ekanos/cli agents test <key> --team <team> --prompt "…" --follow --json`
140
+ (or `--input example.json` for a real ticket or event). It runs the latest
141
+ version on that team as a test run — same tools, approvals and audit; the
142
+ team's current agent still bounds what it may do, so a draft can only do
143
+ less. A write waits for an approval like any run (see "Running, watching
144
+ and deciding" below).
119
145
  4. Ask: publish this version to every team now? Only on yes:
120
146
  `npx @ekanos/cli agents publish <key> --source <slug> --to <n> --yes`.
121
- 5. Hand over the team-side checklist (`references/triggers.md` has the
147
+ 5. If anything waits for approval, name its reviewers (**Reviewers**
148
+ below) before teams turn it on — a draft nobody may decide just waits.
149
+ 6. Hand over the team-side checklist (`references/triggers.md` has the
122
150
  per-integration parts): find it under Agents → "Provided for your team",
123
151
  Turn on, connect what it needs, confirm access, add triggers. Suggest one
124
152
  team pilots it first, and plan a first test run with them.
125
153
 
154
+ ## Reviewers
155
+
156
+ Reply drafts held under an `approve` policy are decided by the team's own
157
+ managers (`agents.manage`) and reviewers (`agents.review`), and — for agents
158
+ the Source provides — by the Source's **named reviewers**. A Source admin
159
+ names them; each must be a member of one of the Source's teams, and is
160
+ notified of every draft in their reach.
161
+
162
+ - `npx @ekanos/cli reviewers list --source <slug> --json` — who reviews now.
163
+ - `npx @ekanos/cli reviewers add <email> --reach source --source <slug>` —
164
+ decides drafts from every team's provided agents, in the Source's review
165
+ queue at `/reviews` (reviewers are managed at `/management/reviewers`).
166
+ - `npx @ekanos/cli reviewers add <email> --reach team --team <team-slug> --source <slug>`
167
+ — decides one team's drafts, from the same review queue (they need not be
168
+ a member of that team).
169
+ - `npx @ekanos/cli reviewers remove <email> [--team <team-slug>] --source <slug>`
170
+ — every reach, or just that team's.
171
+
172
+ The first decision settles a draft for everyone. Recommend one or two
173
+ source-reach reviewers for an agent provided to every team, plus team-reach
174
+ reviewers where a team wants its own people deciding. A refusal with
175
+ `USER_NOT_IN_SOURCE` means the person is not on any of the Source's teams yet.
176
+
126
177
  ## Changing it later
127
178
 
128
179
  `npx @ekanos/cli agents pull <key> --source <slug>` writes the latest version to
129
180
  `agents/<key>/`; edit, `apply` (a new draft), `show`, then `publish` on the
130
- user's yes. `rollback <key> --to <n> --yes` republishes an earlier version.
181
+ user's yes. For one small change, edit the stored draft directly — `agents
182
+ policy <key> set <tool> approve`, `agents triggers <key> add|remove …`,
183
+ `agents links <key> add|remove …`, `agents overrides <key> enable|disable
184
+ <area>` (each stores a new draft; see `references/agent-json.md` § Editing
185
+ one area without a file) — then `publish` on the user's yes. `rollback <key> --to <n> --yes` republishes an earlier version.
131
186
  Teams that pinned a version stay on it and are told a newer one exists.
187
+
188
+ ## Running, watching and deciding
189
+
190
+ All as the Source admin, on one team (`--team <slug>`; `ekanos teams list`
191
+ names them). Add `--json` for a stable record a script can assert on.
192
+
193
+ - `npx @ekanos/cli runs start <key> --team <team> --prompt "…" [--follow]` —
194
+ the app's "Run now": runs as the agent's owner under its own tools and
195
+ approvals, recorded as started by you. `--input <file.json>` passes a
196
+ payload instead of (or beside) the prompt. `--follow` prints status,
197
+ messages and each tool call until the run ends or waits on an approval.
198
+ - `npx @ekanos/cli runs list --team <team> [--agent <key>]` — recent runs.
199
+ - `npx @ekanos/cli runs show <run-id> --team <team> --json` — trigger, version
200
+ (and `draftTemplateVersion` on a test run), output, transcript, every tool
201
+ call with `authorizedVia` (`auto` or `approved`), and its approvals. A leak
202
+ test is a script over this: e.g. assert no `transcript` tool result and no
203
+ `output` contains a value the agent must never reveal.
204
+ - `npx @ekanos/cli approvals list --team <team>` — what is waiting.
205
+ - `npx @ekanos/cli approvals approve <id> --team <team> [--reason "…"]` /
206
+ `approvals reject <id> --team <team> --reason "…"` — decided as you, with
207
+ the authority a team's agent manager has in the app.
208
+ - `npx @ekanos/cli approvals edit <id> --team <team> --body ./reply.md` — Edit &
209
+ send a reply draft: approves it with your text instead. Only reply drafts
210
+ take an edit.
211
+
212
+ Never approve on the user's behalf without asking: show them what the agent
213
+ proposes (`approvals list`) and decide only on their word.
@@ -33,7 +33,25 @@ conflicting change unless `--overwrite`. Unknown fields are refused.
33
33
  "toolEffects": { "search": "read" }
34
34
  }
35
35
  ],
36
- "teamCustomization": { "mcpServers": false, "skills": false, "integrations": false, "narrow": false }
36
+ "teamCustomization": { "mcpServers": false, "skills": false, "integrations": false, "narrow": false },
37
+ "triggers": [
38
+ {
39
+ "key": "new-tickets",
40
+ "type": "event",
41
+ "event": "zendesk.ticket_created",
42
+ "filter": { "tags": ["vip", "urgent"], "brand": "123", "reply_as": "internal_note" }
43
+ },
44
+ {
45
+ "key": "weekday-digest",
46
+ "type": "schedule",
47
+ "cron": "0 9 * * 1-5",
48
+ "timezone": "America/Los_Angeles",
49
+ "prompt": "Summarize yesterday's open escalations."
50
+ },
51
+ { "key": "inbound", "type": "webhook", "prompt": "Triage the posted ticket." }
52
+ ],
53
+ "links": [{ "to": "billing-agent", "kind": "delegate", "mode": "handoff" }],
54
+ "teamOverrides": { "policy": false, "triggers": true, "links": false }
37
55
  }
38
56
  ```
39
57
 
@@ -58,7 +76,9 @@ The tool names above are illustrations. Take real ones from
58
76
  defaults by the tool's effect; `overrides` set single tools by name. An
59
77
  undeclared tool effect counts as a write. MCP tools are named
60
78
  `mcp__<server key>__<tool>` in `overrides`.
61
- - **`skills`** — skill slugs the Source or the platform already has.
79
+ - **`skills`** — skill slugs the Source or the platform already has. Skill
80
+ folders in `agents/<key>/skills/<slug>/` are pushed and added here by
81
+ `agents apply` (see `skills.md`).
62
82
  - **`connections`** — by product slug: `{ "owner": "team", "team": "required" | "optional" }`.
63
83
  A product with no entry is `team`/`optional`. `owner: "source"` (one
64
84
  connection for every team) is refused today.
@@ -77,6 +97,62 @@ The tool names above are illustrations. Take real ones from
77
97
  - `narrow` — remove tools or make more of them wait for approval. Never
78
98
  loosens.
79
99
 
100
+ - **`triggers`** — what starts a run, set up on every team's copy when it
101
+ turns the agent on (and kept in step on every publish). Each has a `key`
102
+ (lowercase-hyphenated, unique in the agent: what versions are matched by),
103
+ an optional `prompt` (what to do each time), and `enabled` (default
104
+ `true`; `false` sets it up turned off). Types:
105
+ - `event` — `event` is an integration event (`<slug>.<event>`, as
106
+ `ekanos catalog <product>` lists under `agentEvents`); `filter` holds the
107
+ event's declared filter fields (Zendesk: `organization`, `brand`,
108
+ `group`, `tags`, `reply_as` …).
109
+ - `schedule` — `cron` (5 fields, on a 5-minute boundary) and `timezone`
110
+ (IANA, default `UTC`); give it a `prompt`.
111
+ - `webhook` — each team gets its **own** URL and secret, created or
112
+ rotated by the team in the app. A template never holds a webhook secret.
113
+ - **`links`** — other agents of this Source it may ask (`kind: "talk"`) or
114
+ hand work to (`kind: "delegate"`, `mode: "await"` to wait for the answer,
115
+ default, or `"handoff"` to let go). `to` is the other agent's key. A link
116
+ is made in a team only where that team runs both agents; it appears when
117
+ the team turns the other one on.
118
+ - **`teamOverrides`** — which areas a team may change on its copy:
119
+ `policy`, `triggers`, `links`. **The template wins.** An area that is off
120
+ follows the template exactly and the team cannot change it (it shows
121
+ "Set by your administrator"). An area that is on lets the team keep its
122
+ own differences: its own triggers and on/off for the template's, its own
123
+ links, its own auto/approve answers. Switching an area off again keeps the
124
+ team's differences but stops applying them; switching it back on restores
125
+ them. Omitted: `policy` is off; `triggers` and `links` are off when this
126
+ file declares them and on (the team's, as before) when it does not.
127
+
128
+ ## Editing one area without a file
129
+
130
+ Each of these reads the latest version, changes one thing, and stores the
131
+ result as a new **draft** version (`--publish` also rolls it out, with
132
+ `--yes`). A pulled `agent.json` is left alone; `agents pull` refreshes it.
133
+
134
+ ```
135
+ ekanos agents policy <key> # show
136
+ ekanos agents policy <key> set zendesk_add_comment approve
137
+ ekanos agents policy <key> unset zendesk_add_comment
138
+ ekanos agents policy <key> --reads auto --writes approve
139
+ ekanos agents triggers <key> # list
140
+ ekanos agents triggers <key> add event new-tickets --event zendesk.ticket_created \
141
+ --filter tags=vip,urgent --filter brand=123 --filter reply_as=internal_note
142
+ ekanos agents triggers <key> add schedule weekday-digest --cron "0 9 * * 1-5" \
143
+ --timezone America/Los_Angeles --prompt "Summarize yesterday's escalations."
144
+ ekanos agents triggers <key> add webhook inbound --prompt "Triage the posted ticket."
145
+ ekanos agents triggers <key> remove inbound
146
+ ekanos agents links <key> add billing-agent --kind delegate --mode handoff
147
+ ekanos agents links <key> remove billing-agent
148
+ ekanos agents overrides <key> # show the switches
149
+ ekanos agents overrides <key> enable triggers
150
+ ekanos agents overrides <key> disable policy
151
+ ```
152
+
153
+ `--filter field=value` repeats; a value with commas is a list, `true` or
154
+ `false` a switch, anything else text. `--disabled` adds a trigger turned off.
155
+
80
156
  ## What the host checks on `apply`
81
157
 
82
158
  Every product and tool must be in the Source's catalog, every skill must
@@ -32,7 +32,15 @@ Built with `ekanos agents` by a Source admin.
32
32
  Good for: the same job done by several teams; a central owner who improves
33
33
  it over time; consistent behaviour and approvals.
34
34
 
35
- Piloting: publish, then have one team turn it on first. Teams that never
35
+ **A Source admin can do a team's part from the terminal**:
36
+ `ekanos teams agents enable <team> <key> [--as <member-email>]` turns it on
37
+ for the team (running as that member, the team's owner by default),
38
+ `ekanos teams agents pin|unpin`, `ekanos teams agents policy`, and
39
+ `ekanos teams triggers|links|mcp` set up the rest. `ekanos teams agents list
40
+ <team>` shows where each team stands and what it still needs connected.
41
+
42
+ Piloting: publish, then have one team turn it on first (or turn it on for
43
+ them with `ekanos teams agents enable`). Teams that never
36
44
  turn it on are unaffected. Or keep it as an applied draft until the pilot
37
45
  plan is ready.
38
46
 
@@ -62,7 +62,8 @@ connected (`references/agent-json.md`).
62
62
  provider's console and enter the new one at the terminal.
63
63
  - **Signing in is a person's click.** Connecting (the provider's consent
64
64
  screen) happens in the browser, by someone on the team, from the link in
65
- `teams show`. Tell them who should click it: the account the integration
65
+ `teams show` (or just the link and whether it is connected yet:
66
+ `teams connect <team> <product>`). Tell them who should click it: the account the integration
66
67
  acts as. A dedicated seat such as "Support agent" makes its replies easy
67
68
  to recognise.
68
69
  - **Close each product out**: one line on what now works ("New tickets in
@@ -0,0 +1,78 @@
1
+ # Skills: what an agent knows how to do
2
+
3
+ A skill is a folder — `SKILL.md` plus optional `references/` and `assets/` —
4
+ in the same format Claude Code uses. An agent lists its skills by name and
5
+ description and loads one when the task calls for it.
6
+
7
+ ```
8
+ agents/support-triage/
9
+ agent.json
10
+ AGENT.md
11
+ skills/
12
+ refund-policy/
13
+ SKILL.md # frontmatter: name, description; then the instructions
14
+ references/policy-2026.md
15
+ ```
16
+
17
+ `SKILL.md` frontmatter:
18
+
19
+ ```markdown
20
+ ---
21
+ name: refund-policy
22
+ description: How we decide refunds — use when a customer asks for money back.
23
+ ---
24
+
25
+ # Refund policy
26
+ ...
27
+ ```
28
+
29
+ The slug is `name` when it is lowercase-with-hyphens, else the folder's
30
+ name. The `description` is how the agent decides to load the skill — write it
31
+ as "what it is — when to use it".
32
+
33
+ ## Two levels
34
+
35
+ | Level | Command | Who sees it |
36
+ |---|---|---|
37
+ | **Source** (default) | `ekanos skills push <dir>` | Every team on the Source. An agent template may name it in `skills`. |
38
+ | **Team** | `ekanos skills push <dir> --team <team-slug>` | That one team only. For content another team must not see (one bank's own guide). |
39
+
40
+ Pushing is a Source admin's. A push is **live at once**: there is no draft
41
+ and no publish step, and every agent naming the skill reads the new version
42
+ on its next run. Show the user the folder before pushing it.
43
+
44
+ ## Commands
45
+
46
+ ```bash
47
+ npx @ekanos/cli skills list --source <slug> --json # the Source's + platform skills
48
+ npx @ekanos/cli skills list --team <team> --source <slug> # one team's own
49
+ npx @ekanos/cli skills show <slug> --source <slug> # files, versions
50
+ npx @ekanos/cli skills push agents/<key>/skills/<slug> --source <slug> --json
51
+ npx @ekanos/cli skills pull <slug> --source <slug> [--out <dir>]
52
+ ```
53
+
54
+ `push` prints what changed (files added, changed, removed) and the new
55
+ version; an identical folder is `unchanged` and stores nothing — safe to run
56
+ again.
57
+
58
+ ## With `agents apply`
59
+
60
+ `ekanos agents apply agents/<key>` pushes every `agents/<key>/skills/<slug>/`
61
+ folder at Source level first, then names those slugs in the agent's `skills`
62
+ (you need not repeat them in `agent.json`). `--no-skills` skips that.
63
+ Because pushing needs a Source admin, a `developer` seat applying an agent
64
+ with skill folders gets SOURCE_ADMIN_REQUIRED; pass `--no-skills` and ask a
65
+ Source admin to `skills push` them.
66
+
67
+ A provided agent (template) names Source or platform skills only. A team
68
+ skill is attached by that team to its own agents — or to a provided agent
69
+ whose `teamCustomization.skills` is on.
70
+
71
+ ## Limits today
72
+
73
+ - Prompt skills only: the agent reads `SKILL.md`'s instructions. Files under
74
+ `references/` and `assets/` are stored with each version and come back with
75
+ `pull`, but the agent does not open them at run time — put what it must
76
+ know in `SKILL.md`.
77
+ - A `scripts/` folder is refused: executable skills need the in-app review.
78
+ - Up to 100 files, 1 MB per file, 3 MB per skill.
@@ -1,9 +1,28 @@
1
1
  # What starts the agent: triggers
2
2
 
3
- Triggers belong to each team. They are not part of the agent template: a team
4
- adds them on its copy (Agents → the agent → Triggers) after turning it on.
5
- Your job in the interview is to say which triggers each team will want, and
6
- what it must connect first, so the team-side checklist is complete.
3
+ The template can declare its triggers (`triggers` in `agent.json`, or
4
+ `ekanos agents triggers <key> add …`): every team that turns the agent on gets
5
+ them, and each publish keeps them in step. By default a team cannot change
6
+ them — they show as "Set by your administrator". Turn on
7
+ `teamOverrides.triggers` (`ekanos agents overrides <key> enable triggers`) to
8
+ let teams add their own and turn the template's on or off. A template that
9
+ declares no triggers leaves them to each team, set on its copy (Agents → the
10
+ agent → Triggers) after turning it on.
11
+
12
+ Ask in the interview: should the Source set what starts the agent for every
13
+ team (recommended when every team works the same way), or each team? Either
14
+ way say what each team must connect first, so the checklist is complete.
15
+ A webhook trigger's secret is always per team: the template declares the
16
+ trigger, each team creates or rotates its own secret in the app.
17
+
18
+ A Source admin can add them for the team from the terminal instead:
19
+ `ekanos teams triggers list|add|remove <team> <key> …` — for example
20
+ `ekanos teams triggers add acme-support support-agent event zendesk.ticket_created --filter '{"tags":["billing"]}'`,
21
+ `… schedule --cron "0 9 * * 1-5" --timezone America/Los_Angeles --prompt "…"`,
22
+ `… webhook --prompt "…"` (prints the URL and token once) or `… manual`.
23
+ Slack and Linear triggers are added in the app. When a provided agent's
24
+ template declares triggers and has not turned on team overrides for them, the
25
+ team's triggers follow the template and these commands refuse to change them.
7
26
 
8
27
  ## Kinds a team can add
9
28
 
@@ -45,4 +64,5 @@ internal notes, or approval on public replies, until the team trusts it.
45
64
  it (the agent shows what is missing).
46
65
  3. Do each integration's own setup (team app, webhook) from its guide.
47
66
  4. Confirm access if asked.
48
- 5. Add the triggers above, then run one real example and review it.
67
+ 5. Add the triggers above — unless the template already sets them — then
68
+ run one real example and review it.
@@ -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
@@ -97,12 +128,78 @@ changed through the CLI or the app, with no deploy.
97
128
  - **Provided for every team** — a Source admin defines it once with
98
129
  `ekanos agents` (a template). Each team sees it under Agents → "Provided for
99
130
  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.
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.
101
136
  - **A team's own** — built by a team in the app (Agents → New). Only that team
102
137
  has it, and the Source cannot update it.
103
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
+
104
143
  The `build-agent` skill walks through choosing between these and building one.
105
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
+
106
203
  ## Where each thing is done
107
204
 
108
205
  | Done by | Where |
@@ -110,6 +207,14 @@ The `build-agent` skill walks through choosing between these and building one.
110
207
  | Making a product available to a Source; granting seats | Ekanos super admin, in Ekanos's admin |
111
208
  | Building or updating an integration | A developer, with `ekanos validate` / `ekanos publish` |
112
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` |
113
215
  | An integration's app for the whole Source (client ID and secret) | A Source admin, with `ekanos apps set` at their own terminal |
114
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` |
115
- | Connecting an integration; turning on a provided agent; its triggers | Each team, in the app |
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` |