@ekanos/cli 0.8.0 → 0.10.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.
- package/dist/commands/apps.d.ts +3 -0
- package/dist/commands/apps.js +13 -6
- package/dist/commands/apps.js.map +1 -1
- package/dist/commands/teams.d.ts +30 -0
- package/dist/commands/teams.js +295 -0
- package/dist/commands/teams.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/dist/teams-api.d.ts +43 -0
- package/dist/teams-api.js +99 -0
- package/dist/teams-api.js.map +1 -0
- package/package.json +2 -2
- package/templates/package.json.tmpl +4 -4
- package/templates/skills/build-agent/SKILL.md +25 -12
- package/templates/skills/build-agent/references/app-setup.md +64 -0
- package/templates/skills/build-agent/references/set-up-an-integration.md +133 -0
- package/templates/skills/build-agent/references/triggers.md +2 -1
- package/templates/skills/ekanos-platform/SKILL.md +15 -7
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Setting up an integration, concierge-style
|
|
2
|
+
|
|
3
|
+
The user wants an agent to use something (Zendesk, Linear, Slack…) and it is
|
|
4
|
+
not ready yet. Your job is to get it ready **with** them, the way a good
|
|
5
|
+
concierge would: you already know the way, you say what happens next and
|
|
6
|
+
why, you hand them exactly what to type or paste, and you check that each
|
|
7
|
+
step worked before moving on. They should never have to read a manual or
|
|
8
|
+
guess.
|
|
9
|
+
|
|
10
|
+
## 1. Find out where it stands (before saying anything)
|
|
11
|
+
|
|
12
|
+
1. `npx @ekanos/cli catalog <product> --source <slug> --json`. Its
|
|
13
|
+
`setupSteps` are the integration's own steps, already filled in with this
|
|
14
|
+
Source's exact callback URLs and scopes. Each step has an `actor`:
|
|
15
|
+
`ekanos` (an Ekanos super admin), `source_admin` (the user, if they hold
|
|
16
|
+
that seat), or `team`.
|
|
17
|
+
2. Which teams will use it: `npx @ekanos/cli teams list --source <slug> --json`.
|
|
18
|
+
3. For a team: `npx @ekanos/cli teams show <team> <product> --source <slug> --json`
|
|
19
|
+
shows what that team has already done (app fields entered, webhook URL
|
|
20
|
+
minted, connected, who connected and when) and the link to the team's page
|
|
21
|
+
in the app.
|
|
22
|
+
|
|
23
|
+
Then tell the user, in two or three lines, what is done, what is left, and
|
|
24
|
+
who does each remaining step. If a step needs Ekanos (the product is not
|
|
25
|
+
enabled for the Source), say so and stop there for that product; nobody else
|
|
26
|
+
can do it.
|
|
27
|
+
|
|
28
|
+
## 2. Decide where the connection lives
|
|
29
|
+
|
|
30
|
+
Explain the choice in plain words, recommend one, and let them pick. There
|
|
31
|
+
are three places, and **the team account is the default owner** of an
|
|
32
|
+
integration: its members, its data and its connections.
|
|
33
|
+
|
|
34
|
+
| Where | What it means | Who sets it up | Typical for |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
| **Each team, through the Source's app** | One app, created once for the whole Source under the Source's own name. Each team then signs in through it. | The Source admin creates the app (`references/app-setup.md`, `ekanos apps set`); each team connects | Linear, Slack: products where every team is a separate workspace |
|
|
37
|
+
| **Each team, with its own app** | Each team creates its own app in the provider and enters its credentials | Each team, or the Source admin on the team's behalf with `ekanos teams` (below) | Zendesk: each bank or business has its own Zendesk |
|
|
38
|
+
| **One connection for the whole Source** | Every team's provided agent uses the Source's single connection, limited to what is routed to that team | The Source admin, once | One shared Zendesk for many teams. **Not available yet**: say so, and suggest a connection per team for now |
|
|
39
|
+
|
|
40
|
+
The agent records the choice in `agent.json` → `connections`:
|
|
41
|
+
`{ "zendesk": { "owner": "team", "team": "required" } }` means each team
|
|
42
|
+
uses its own Zendesk and the agent waits at "needs setup" until it is
|
|
43
|
+
connected (`references/agent-json.md`).
|
|
44
|
+
|
|
45
|
+
## 3. Walk it, one step per message
|
|
46
|
+
|
|
47
|
+
- **Say why before what.** "Zendesk needs to know where to send new tickets,
|
|
48
|
+
so we'll give it a webhook address from Ekanos." One sentence, then the step.
|
|
49
|
+
- **Exact values only.** Take URLs, field names and console paths from the
|
|
50
|
+
catalog or `teams show`, never from memory. Paste URLs exactly; providers
|
|
51
|
+
match them byte for byte.
|
|
52
|
+
- **Use the provider's words** for its screens ("Admin Center › Apps and
|
|
53
|
+
integrations › Webhooks"), and Ekanos's words for Ekanos.
|
|
54
|
+
- **Wait** for "done" or a question after each step. Then **check**: re-run
|
|
55
|
+
`teams show` (or `catalog`) and say what changed ("Ekanos sees the client ID
|
|
56
|
+
and secret now"). If the check disagrees with what they said, look at the
|
|
57
|
+
difference with them; don't move on.
|
|
58
|
+
- **Secrets never pass through the chat.** Client secrets and signing
|
|
59
|
+
secrets go in at the user's own terminal (`ekanos apps set`,
|
|
60
|
+
`ekanos teams app set`, with hidden input) or in the team's page in the app.
|
|
61
|
+
If they paste one into the chat anyway, tell them to rotate it in the
|
|
62
|
+
provider's console and enter the new one at the terminal.
|
|
63
|
+
- **Signing in is a person's click.** Connecting (the provider's consent
|
|
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
|
|
66
|
+
acts as. A dedicated seat such as "Support agent" makes its replies easy
|
|
67
|
+
to recognise.
|
|
68
|
+
- **Close each product out**: one line on what now works ("New tickets in
|
|
69
|
+
Acme's Zendesk will start the support agent"), then move on to the next
|
|
70
|
+
product or back to the agent.
|
|
71
|
+
|
|
72
|
+
## 4. A team's own app, from the terminal
|
|
73
|
+
|
|
74
|
+
When the user is a Source admin setting things up for a team (common in a
|
|
75
|
+
pilot), the team-side steps can be done from the CLI:
|
|
76
|
+
|
|
77
|
+
1. `npx @ekanos/cli teams show <team> <product> --source <slug>`: the
|
|
78
|
+
callback URL to register and the integration's steps.
|
|
79
|
+
2. They create the app in the provider's console, step by step as above.
|
|
80
|
+
3. **In their own terminal:**
|
|
81
|
+
`npx @ekanos/cli teams app set <team> <product> --source <slug>`. It asks
|
|
82
|
+
for each field and hides the secret ones. It refuses to run inside Claude;
|
|
83
|
+
that is deliberate.
|
|
84
|
+
4. If the integration takes webhooks:
|
|
85
|
+
`npx @ekanos/cli teams webhook <team> <product> --source <slug>` prints the
|
|
86
|
+
team's webhook URL **once**. Have them paste it into the provider at that
|
|
87
|
+
moment. Running it again makes a new URL and the old one stops working, so
|
|
88
|
+
it asks for `--yes` when one already exists.
|
|
89
|
+
5. Someone on the team opens the link from `teams show` and clicks Connect.
|
|
90
|
+
6. `teams show` again: every step ✓.
|
|
91
|
+
|
|
92
|
+
## Worked example: Zendesk for one team
|
|
93
|
+
|
|
94
|
+
The steps below are what Zendesk's own setup says, in order. Take the URLs
|
|
95
|
+
from `teams show zendesk`.
|
|
96
|
+
|
|
97
|
+
1. **OAuth client.** Admin Center › Apps and integrations › APIs › OAuth
|
|
98
|
+
Clients › Add OAuth client. Client kind **Confidential**, Redirect URL =
|
|
99
|
+
the callback URL. Save; copy the Identifier and the Secret (shown once).
|
|
100
|
+
2. **Webhook address.** `ekanos teams webhook <team> zendesk`, then in Admin
|
|
101
|
+
Center › Apps and integrations › Webhooks › Create webhook › Trigger or
|
|
102
|
+
automation: that URL, POST, JSON, no authentication. Open it and Reveal
|
|
103
|
+
secret.
|
|
104
|
+
3. **Credentials into Ekanos.** `ekanos teams app set <team> zendesk` in
|
|
105
|
+
their terminal: subdomain, client ID, client secret, webhook signing
|
|
106
|
+
secret.
|
|
107
|
+
4. **Connect.** Someone on the team opens the link and connects, as the
|
|
108
|
+
Zendesk agent the integration should reply as.
|
|
109
|
+
5. **Zendesk triggers.** Objects and rules › Triggers: one for *Ticket is
|
|
110
|
+
Created* and one for a customer's public reply, each notifying the webhook
|
|
111
|
+
with the body from the steps. `"reply_as": "internal"` makes the agent's
|
|
112
|
+
answer an internal note a person reviews before the customer sees it.
|
|
113
|
+
Recommend that until the team trusts the agent; `"public"` lets it answer
|
|
114
|
+
the customer directly.
|
|
115
|
+
6. **The agent's trigger.** In the app, on the agent: *A ticket is created*
|
|
116
|
+
(and *A customer replies*), with any filters.
|
|
117
|
+
7. **Try it.** Open a test ticket as a customer and watch: the agent reads
|
|
118
|
+
the ticket, looks things up, and answers on it. If it wants to change the
|
|
119
|
+
ticket (status, priority, assignee), it leaves an internal note saying
|
|
120
|
+
what it asked for, and someone approves it in Ekanos.
|
|
121
|
+
|
|
122
|
+
## When something goes wrong
|
|
123
|
+
|
|
124
|
+
- **Redirect mismatch on Connect:** the callback URL in the provider differs
|
|
125
|
+
from `teams show`'s, often by a trailing slash or a custom domain. Fix it in
|
|
126
|
+
the provider.
|
|
127
|
+
- **Tickets don't start the agent:** `teams show` should list a live webhook
|
|
128
|
+
that has been used recently. If it has never been used, the provider is not
|
|
129
|
+
calling it: check the Zendesk trigger's conditions and that it notifies the
|
|
130
|
+
right webhook. If it has been used but nothing ran, check that the agent has
|
|
131
|
+
a trigger for that event and that the team connected the product.
|
|
132
|
+
- **A command says it needs a terminal:** it was run inside Claude. Ask them
|
|
133
|
+
to run it in a terminal tab themselves.
|
|
@@ -33,7 +33,8 @@ Guide: https://sdk.ekanos.dev/guides/linear-agent
|
|
|
33
33
|
**Zendesk** (`zendesk.ticket_created`, `zendesk.comment_added`; filters such
|
|
34
34
|
as brand, group, tags, organization) — when present in the catalog, each team
|
|
35
35
|
connects its own Zendesk (subdomain plus an OAuth client it creates in
|
|
36
|
-
Zendesk) and adds a Zendesk webhook pointing at its Ekanos endpoint
|
|
36
|
+
Zendesk) and adds a Zendesk webhook pointing at its Ekanos endpoint
|
|
37
|
+
(walk-through: `set-up-an-integration.md`, worked example). The agent
|
|
37
38
|
answers on the ticket as a public reply or an internal note — recommend
|
|
38
39
|
internal notes, or approval on public replies, until the team trusts it.
|
|
39
40
|
|
|
@@ -62,8 +62,12 @@ Ask them in this order; each catalog product reports where it stands
|
|
|
62
62
|
is an Ekanos super admin's step (`setupSteps` names it with actor
|
|
63
63
|
`ekanos`) — not something a Source admin or the CLI can do.
|
|
64
64
|
2. **Connected by a team** — a team (or a person, for per-person
|
|
65
|
-
integrations) signed in to the third party.
|
|
66
|
-
|
|
65
|
+
integrations) signed in to the third party. The team account owns the
|
|
66
|
+
connection: two teams using Linear each connect their own. A Source admin
|
|
67
|
+
can do a team's setup for it from the terminal (`ekanos teams show`,
|
|
68
|
+
`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.
|
|
67
71
|
3. **Set up by the team** where needed — some integrations have each team
|
|
68
72
|
bring its own app (a team-provided app: client id, secret, webhook signing
|
|
69
73
|
secret entered in Ekanos). Those secrets are typed into the app, never
|
|
@@ -72,11 +76,14 @@ Ask them in this order; each catalog product reports where it stands
|
|
|
72
76
|
|
|
73
77
|
Some integrations sign every team in through **one app for the whole Source**
|
|
74
78
|
(Linear's OAuth app, say): until the Source has its credentials, no team can
|
|
75
|
-
connect (`setupSteps` step `provider-app`).
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
connect (`setupSteps` step `provider-app`). It is the Source's own app — for a
|
|
80
|
+
white-label Source, under its product name and company — and its admin
|
|
81
|
+
creates it once in the provider's console. The integration ships the steps
|
|
82
|
+
(the catalog's `instructions`, with the Source's exact callback URLs filled
|
|
83
|
+
in); `ekanos apps set <product>`, run by the admin at their own terminal,
|
|
84
|
+
takes the client ID and secret. The `build-agent` skill walks through it
|
|
85
|
+
(`references/app-setup.md`). Integrations whose teams each bring their own
|
|
86
|
+
app (Zendesk) have no Source app; each team follows that app's steps.
|
|
80
87
|
|
|
81
88
|
A product that is "enabled" is not therefore "connected". Say which one you
|
|
82
89
|
mean.
|
|
@@ -104,4 +111,5 @@ The `build-agent` skill walks through choosing between these and building one.
|
|
|
104
111
|
| Building or updating an integration | A developer, with `ekanos validate` / `ekanos publish` |
|
|
105
112
|
| Agents provided for every team | A Source admin, with `ekanos agents` |
|
|
106
113
|
| An integration's app for the whole Source (client ID and secret) | A Source admin, with `ekanos apps set` at their own terminal |
|
|
114
|
+
| 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` |
|
|
107
115
|
| Connecting an integration; turning on a provided agent; its triggers | Each team, in the app |
|