@ekanos/cli 0.13.0 → 0.15.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/README.md +25 -8
- package/dist/agents-api.d.ts +11 -2
- package/dist/agents-api.js +39 -3
- package/dist/agents-api.js.map +1 -1
- package/dist/apps-api.js +2 -2
- package/dist/apps-api.js.map +1 -1
- package/dist/auth/ekanos-api.d.ts +16 -2
- package/dist/auth/ekanos-api.js +101 -15
- package/dist/auth/ekanos-api.js.map +1 -1
- package/dist/auth/host-trust.d.ts +46 -0
- package/dist/auth/host-trust.js +79 -0
- package/dist/auth/host-trust.js.map +1 -0
- package/dist/auth/session.d.ts +10 -1
- package/dist/auth/session.js +28 -28
- package/dist/auth/session.js.map +1 -1
- package/dist/commands/agents-edit.d.ts +6 -2
- package/dist/commands/agents-edit.js +57 -26
- package/dist/commands/agents-edit.js.map +1 -1
- package/dist/commands/agents.d.ts +13 -2
- package/dist/commands/agents.js +140 -35
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/apps.d.ts +2 -0
- package/dist/commands/apps.js +16 -12
- package/dist/commands/apps.js.map +1 -1
- package/dist/commands/catalog.js +7 -6
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/knowledge.d.ts +19 -0
- package/dist/commands/knowledge.js +119 -27
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.js +30 -2
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +9 -1
- package/dist/commands/logout.js +56 -7
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/publish.js +3 -3
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/reviewers.d.ts +2 -0
- package/dist/commands/reviewers.js +7 -3
- package/dist/commands/reviewers.js.map +1 -1
- package/dist/commands/routes.d.ts +2 -0
- package/dist/commands/routes.js +42 -9
- package/dist/commands/routes.js.map +1 -1
- package/dist/commands/runs.d.ts +13 -2
- package/dist/commands/runs.js +99 -16
- package/dist/commands/runs.js.map +1 -1
- package/dist/commands/scope-notice.d.ts +21 -0
- package/dist/commands/scope-notice.js +35 -0
- package/dist/commands/scope-notice.js.map +1 -0
- package/dist/commands/skills.d.ts +7 -1
- package/dist/commands/skills.js +80 -24
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/sources.d.ts +1 -1
- package/dist/commands/sources.js +126 -12
- package/dist/commands/sources.js.map +1 -1
- package/dist/commands/status.js +5 -4
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/team-agent-readiness.d.ts +49 -0
- package/dist/commands/team-agent-readiness.js +308 -0
- package/dist/commands/team-agent-readiness.js.map +1 -0
- package/dist/commands/team-agents-agents.d.ts +24 -3
- package/dist/commands/team-agents-agents.js +314 -35
- package/dist/commands/team-agents-agents.js.map +1 -1
- package/dist/commands/team-agents-mcp.js +32 -3
- package/dist/commands/team-agents-mcp.js.map +1 -1
- package/dist/commands/team-agents-triggers.js +230 -55
- package/dist/commands/team-agents-triggers.js.map +1 -1
- package/dist/commands/team-agents.d.ts +3 -1
- package/dist/commands/team-agents.js +27 -7
- package/dist/commands/team-agents.js.map +1 -1
- package/dist/commands/teams-channel-install.d.ts +24 -0
- package/dist/commands/teams-channel-install.js +94 -0
- package/dist/commands/teams-channel-install.js.map +1 -0
- package/dist/commands/teams-connect.d.ts +41 -0
- package/dist/commands/teams-connect.js +212 -57
- package/dist/commands/teams-connect.js.map +1 -1
- package/dist/commands/teams-events.d.ts +12 -0
- package/dist/commands/teams-events.js +138 -0
- package/dist/commands/teams-events.js.map +1 -0
- package/dist/commands/teams-onboard.d.ts +11 -3
- package/dist/commands/teams-onboard.js +60 -7
- package/dist/commands/teams-onboard.js.map +1 -1
- package/dist/commands/teams-overview.d.ts +11 -0
- package/dist/commands/teams-overview.js +160 -0
- package/dist/commands/teams-overview.js.map +1 -0
- package/dist/commands/teams-scope.d.ts +10 -0
- package/dist/commands/teams-scope.js +109 -0
- package/dist/commands/teams-scope.js.map +1 -0
- package/dist/commands/teams.d.ts +4 -2
- package/dist/commands/teams.js +113 -14
- package/dist/commands/teams.js.map +1 -1
- package/dist/commands/upgrade.js +12 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/use.js +2 -2
- package/dist/commands/use.js.map +1 -1
- package/dist/commands/whoami.js +1 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/connections-api.js +1 -1
- package/dist/connections-api.js.map +1 -1
- package/dist/delegate.js +11 -4
- package/dist/delegate.js.map +1 -1
- package/dist/harness-scaffold.js +12 -0
- package/dist/harness-scaffold.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +682 -167
- package/dist/index.js.map +1 -1
- package/dist/knowledge-api.d.ts +46 -0
- package/dist/knowledge-api.js +32 -1
- package/dist/knowledge-api.js.map +1 -1
- package/dist/open-url.d.ts +16 -0
- package/dist/open-url.js +73 -0
- package/dist/open-url.js.map +1 -0
- package/dist/parse-argv.d.ts +2 -0
- package/dist/parse-argv.js.map +1 -1
- package/dist/publish-api.d.ts +2 -1
- package/dist/publish-api.js +4 -3
- package/dist/publish-api.js.map +1 -1
- package/dist/pull-write.d.ts +27 -0
- package/dist/pull-write.js +60 -0
- package/dist/pull-write.js.map +1 -0
- package/dist/routes-api.d.ts +3 -0
- package/dist/routes-api.js +9 -4
- package/dist/routes-api.js.map +1 -1
- package/dist/runs-api.d.ts +7 -1
- package/dist/runs-api.js +21 -6
- package/dist/runs-api.js.map +1 -1
- package/dist/safe-fs.d.ts +2 -0
- package/dist/safe-fs.js +12 -6
- package/dist/safe-fs.js.map +1 -1
- package/dist/secret-file.d.ts +17 -0
- package/dist/secret-file.js +69 -0
- package/dist/secret-file.js.map +1 -0
- package/dist/skills-api.d.ts +10 -2
- package/dist/skills-api.js +37 -2
- package/dist/skills-api.js.map +1 -1
- package/dist/source-products-api.d.ts +4 -0
- package/dist/source-products-api.js +14 -4
- package/dist/source-products-api.js.map +1 -1
- package/dist/source-target.js +2 -1
- package/dist/source-target.js.map +1 -1
- package/dist/sources-api.d.ts +2 -1
- package/dist/sources-api.js +3 -2
- package/dist/sources-api.js.map +1 -1
- package/dist/team-connect-api.d.ts +44 -2
- package/dist/team-connect-api.js +19 -7
- package/dist/team-connect-api.js.map +1 -1
- package/dist/teams-api.d.ts +41 -1
- package/dist/teams-api.js +95 -19
- package/dist/teams-api.js.map +1 -1
- package/dist/toolchain-api.d.ts +9 -0
- package/dist/toolchain-api.js +17 -2
- package/dist/toolchain-api.js.map +1 -1
- package/dist/toolchain-resolve.d.ts +3 -0
- package/dist/toolchain-resolve.js +15 -1
- package/dist/toolchain-resolve.js.map +1 -1
- package/dist/toolchain.d.ts +6 -0
- package/dist/toolchain.js +19 -0
- package/dist/toolchain.js.map +1 -1
- package/dist/update-notice.js +2 -1
- package/dist/update-notice.js.map +1 -1
- package/package.json +2 -2
- package/templates/AGENTS.md.tmpl +6 -1
- package/templates/claude-skill.md.tmpl +5 -0
- package/templates/package.json.tmpl +4 -4
- package/templates/skills/build-agent/SKILL.md +104 -17
- package/templates/skills/build-agent/references/agent-json.md +4 -2
- package/templates/skills/build-agent/references/rollout.md +23 -4
- package/templates/skills/build-agent/references/set-up-an-integration.md +55 -7
- package/templates/skills/build-agent/references/skills.md +20 -1
- package/templates/skills/build-agent/references/triggers.md +47 -11
- package/templates/skills/build-integration/references/widget-design.md +3 -3
- package/templates/skills/ekanos-platform/SKILL.md +45 -16
- package/templates/skills/polish-widgets/references/patterns.md +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import * as fs from 'node:fs';
|
|
2
13
|
import { runAgents } from './commands/agents.js';
|
|
14
|
+
import { TEMPLATE_EDIT_HELP } from './commands/agents-edit.js';
|
|
3
15
|
import { runApps } from './commands/apps.js';
|
|
4
16
|
import { runCatalog } from './commands/catalog.js';
|
|
5
17
|
import { runDev } from './commands/dev.js';
|
|
@@ -14,6 +26,7 @@ import { runApprovals, runRuns } from './commands/runs.js';
|
|
|
14
26
|
import { runSkills } from './commands/skills.js';
|
|
15
27
|
import { runSources } from './commands/sources.js';
|
|
16
28
|
import { runStatus } from './commands/status.js';
|
|
29
|
+
import { TEAM_AGENT_AREAS, usageFor } from './commands/team-agents.js';
|
|
17
30
|
import { runTeams } from './commands/teams.js';
|
|
18
31
|
import { runTest } from './commands/test.js';
|
|
19
32
|
import { runUpgrade } from './commands/upgrade.js';
|
|
@@ -28,209 +41,544 @@ import { parseArgv } from './parse-argv.js';
|
|
|
28
41
|
export { CliContext } from './context.js';
|
|
29
42
|
export { EXIT_CODES, ERROR_CODES } from './exit-codes.js';
|
|
30
43
|
const GLOBAL_SPECS = {
|
|
31
|
-
json: {
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
json: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
description: 'One JSON envelope on stdout (on by default when piped or under Claude Code; --no-json forces text)',
|
|
47
|
+
},
|
|
48
|
+
help: { type: 'boolean', description: 'Show help for the command' },
|
|
49
|
+
version: { type: 'boolean', description: 'Print the CLI version' },
|
|
50
|
+
};
|
|
51
|
+
/** The flags most commands share, described once. */
|
|
52
|
+
const HOST = {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Ekanos host URL (else EKANOS_HOST, the "host" in ekanos.json, or the only stored login)',
|
|
55
|
+
};
|
|
56
|
+
const SOURCE = {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'The Source to act on (else the "source" in ekanos.json, or your only seat)',
|
|
59
|
+
};
|
|
60
|
+
const DIR = {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Project directory, where ekanos.json and relative paths are read (default: the current one)',
|
|
34
63
|
};
|
|
35
64
|
const COMMAND_SPECS = {
|
|
36
65
|
init: {
|
|
37
|
-
slug: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
66
|
+
slug: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Kebab-case id of the integration, e.g. acme-crm',
|
|
69
|
+
},
|
|
70
|
+
dir: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Target directory (default ./<slug>; --dir . scaffolds in place)',
|
|
73
|
+
},
|
|
74
|
+
force: {
|
|
75
|
+
type: 'boolean',
|
|
76
|
+
description: 'Overwrite files that already exist',
|
|
77
|
+
},
|
|
78
|
+
yes: {
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
description: 'Accepted for scripts; init never prompts',
|
|
81
|
+
},
|
|
41
82
|
// Repeatable: each occurrence appends one docs entry (URL or relative
|
|
42
83
|
// path) to the scaffolded ekanos.json.
|
|
43
|
-
docs: {
|
|
84
|
+
docs: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
repeatable: true,
|
|
87
|
+
description: "An http(s) URL or project-relative path to the API's docs, written to ekanos.json",
|
|
88
|
+
},
|
|
44
89
|
},
|
|
45
90
|
validate: {
|
|
46
|
-
dir:
|
|
91
|
+
dir: DIR,
|
|
47
92
|
},
|
|
48
93
|
dev: {
|
|
49
|
-
dir:
|
|
50
|
-
port: { type: 'string' },
|
|
51
|
-
host: {
|
|
52
|
-
|
|
53
|
-
|
|
94
|
+
dir: DIR,
|
|
95
|
+
port: { type: 'string', description: 'Dev server port (default 3100)' },
|
|
96
|
+
host: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'Interface to bind (default 127.0.0.1; anything else is exposed, with a warning)',
|
|
99
|
+
},
|
|
100
|
+
force: {
|
|
101
|
+
type: 'boolean',
|
|
102
|
+
description: 'Rewrite every generated file even when unchanged',
|
|
103
|
+
},
|
|
104
|
+
start: {
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
description: 'Start the server even in JSON mode; --no-start only scaffolds',
|
|
107
|
+
},
|
|
54
108
|
},
|
|
55
109
|
test: {
|
|
56
|
-
dir:
|
|
110
|
+
dir: DIR,
|
|
57
111
|
// Skips the vitest JSON-reporter injection and the curated failures
|
|
58
112
|
// appendix, reproducing the pre-appendix raw-passthrough behavior —
|
|
59
113
|
// also the escape hatch if the vitest-detection heuristic ever guesses
|
|
60
114
|
// wrong for a project. See `test-report.ts`.
|
|
61
|
-
raw: {
|
|
115
|
+
raw: {
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
description: 'Run the test script as is, without the failures appendix and its reporter',
|
|
118
|
+
},
|
|
62
119
|
},
|
|
63
120
|
login: {
|
|
64
|
-
host: {
|
|
65
|
-
|
|
66
|
-
|
|
121
|
+
host: {
|
|
122
|
+
type: 'string',
|
|
123
|
+
description: 'Ekanos host URL (else EKANOS_HOST, or the only stored login; never ekanos.json)',
|
|
124
|
+
},
|
|
125
|
+
force: {
|
|
126
|
+
type: 'boolean',
|
|
127
|
+
description: 'Sign in again even when the stored session is valid',
|
|
128
|
+
},
|
|
129
|
+
'trust-host': {
|
|
130
|
+
type: 'boolean',
|
|
131
|
+
description: 'Sign in to a host you have never logged in to without being asked',
|
|
132
|
+
},
|
|
133
|
+
claude: {
|
|
134
|
+
type: 'boolean',
|
|
135
|
+
description: 'Add the Ekanos docs to Claude Code without asking; --no-claude skips it',
|
|
136
|
+
},
|
|
67
137
|
},
|
|
68
138
|
logout: {
|
|
69
|
-
host:
|
|
70
|
-
all: { type: 'boolean' },
|
|
139
|
+
host: HOST,
|
|
140
|
+
all: { type: 'boolean', description: 'Log out of every stored host' },
|
|
71
141
|
},
|
|
72
142
|
whoami: {
|
|
73
|
-
host:
|
|
143
|
+
host: HOST,
|
|
74
144
|
},
|
|
75
145
|
status: {
|
|
76
|
-
host:
|
|
77
|
-
dir:
|
|
78
|
-
findings: {
|
|
79
|
-
|
|
80
|
-
|
|
146
|
+
host: HOST,
|
|
147
|
+
dir: DIR,
|
|
148
|
+
findings: {
|
|
149
|
+
type: 'boolean',
|
|
150
|
+
description: 'Every finding of each version, not just the counts',
|
|
151
|
+
},
|
|
152
|
+
all: {
|
|
153
|
+
type: 'boolean',
|
|
154
|
+
description: "Expand the Source's other integrations into full version tables",
|
|
155
|
+
},
|
|
156
|
+
watch: {
|
|
157
|
+
type: 'boolean',
|
|
158
|
+
description: "Wait until this project's current version reaches a gate verdict",
|
|
159
|
+
},
|
|
81
160
|
},
|
|
82
161
|
sources: {
|
|
83
|
-
host:
|
|
84
|
-
dir:
|
|
162
|
+
host: HOST,
|
|
163
|
+
dir: DIR,
|
|
85
164
|
// `sources products [enable|disable <product>]`.
|
|
86
|
-
source:
|
|
87
|
-
yes: {
|
|
165
|
+
source: SOURCE,
|
|
166
|
+
yes: {
|
|
167
|
+
type: 'boolean',
|
|
168
|
+
description: 'Confirm products disable, scopes remove',
|
|
169
|
+
},
|
|
88
170
|
},
|
|
89
171
|
catalog: {
|
|
90
|
-
host:
|
|
91
|
-
source:
|
|
92
|
-
dir:
|
|
172
|
+
host: HOST,
|
|
173
|
+
source: SOURCE,
|
|
174
|
+
dir: DIR,
|
|
93
175
|
},
|
|
94
176
|
apps: {
|
|
95
|
-
host:
|
|
96
|
-
source:
|
|
97
|
-
dir:
|
|
98
|
-
'no-wait': {
|
|
177
|
+
host: HOST,
|
|
178
|
+
source: SOURCE,
|
|
179
|
+
dir: DIR,
|
|
180
|
+
'no-wait': {
|
|
181
|
+
type: 'boolean',
|
|
182
|
+
description: 'connect: print the links and return without waiting',
|
|
183
|
+
},
|
|
184
|
+
yes: {
|
|
185
|
+
type: 'boolean',
|
|
186
|
+
description: 'disconnect: confirm without the question (needed in a script or agent run)',
|
|
187
|
+
},
|
|
99
188
|
},
|
|
100
189
|
teams: {
|
|
101
|
-
host:
|
|
102
|
-
source:
|
|
103
|
-
dir:
|
|
104
|
-
connection: {
|
|
190
|
+
host: HOST,
|
|
191
|
+
source: SOURCE,
|
|
192
|
+
dir: DIR,
|
|
193
|
+
connection: {
|
|
194
|
+
type: 'string',
|
|
195
|
+
description: 'connect, app set: which of the integration\'s connections (e.g. "agent" for Linear\'s agent)',
|
|
196
|
+
},
|
|
105
197
|
// `teams app set`: which fields to enter, non-secret values, removals.
|
|
106
|
-
field: {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
198
|
+
field: {
|
|
199
|
+
type: 'string',
|
|
200
|
+
repeatable: true,
|
|
201
|
+
description: 'app set: enter just this field at your terminal',
|
|
202
|
+
},
|
|
203
|
+
set: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
repeatable: true,
|
|
206
|
+
description: 'app set: <name>=<value> for a non-secret field',
|
|
207
|
+
},
|
|
208
|
+
clear: {
|
|
209
|
+
type: 'string',
|
|
210
|
+
repeatable: true,
|
|
211
|
+
description: "app set: remove this field's saved value",
|
|
212
|
+
},
|
|
213
|
+
slug: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
description: "create: the team's slug (default: from its name)",
|
|
216
|
+
},
|
|
217
|
+
owner: {
|
|
218
|
+
type: 'string',
|
|
219
|
+
description: 'create: invite this email as the owner instead of you',
|
|
220
|
+
},
|
|
221
|
+
role: {
|
|
222
|
+
type: 'string',
|
|
223
|
+
description: 'members invite: the role to invite as (default member)',
|
|
224
|
+
},
|
|
225
|
+
yes: {
|
|
226
|
+
type: 'boolean',
|
|
227
|
+
description: 'Confirm a change that removes, pauses, revokes or opens something up (members remove, webhook, disconnect, agents disable, triggers add slack, triggers remove|rotate, links remove, mcp remove, scope set that drops a scope)',
|
|
228
|
+
},
|
|
113
229
|
// `teams agents|triggers|links|mcp` (team-agents.ts).
|
|
114
|
-
as: {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
230
|
+
as: {
|
|
231
|
+
type: 'string',
|
|
232
|
+
description: 'connect: the member who signs in; agents enable: the member the agent runs as',
|
|
233
|
+
},
|
|
234
|
+
// `teams agents enable|pin … --draft`: test the unpublished draft there.
|
|
235
|
+
draft: {
|
|
236
|
+
type: 'boolean',
|
|
237
|
+
description: "agents enable|pin: put this team alone on the template's unpublished draft",
|
|
238
|
+
},
|
|
239
|
+
// `teams agents enable|policy`: also confirm, as yourself, what the
|
|
240
|
+
// agent may use (whoever sets it up confirms it, plan 247.2).
|
|
241
|
+
'confirm-access': {
|
|
242
|
+
type: 'boolean',
|
|
243
|
+
description: 'agents enable|policy: also confirm, as yourself, what it may use',
|
|
244
|
+
},
|
|
245
|
+
reads: {
|
|
246
|
+
type: 'string',
|
|
247
|
+
description: 'agents policy: auto|approve for every read tool',
|
|
248
|
+
},
|
|
249
|
+
writes: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
description: 'agents policy: auto|approve for every write tool',
|
|
252
|
+
},
|
|
253
|
+
effect: {
|
|
254
|
+
type: 'string',
|
|
255
|
+
description: 'Not read: "teams mcp effect" takes the effect as an argument',
|
|
256
|
+
},
|
|
257
|
+
kind: { type: 'string', description: 'links add: talk|delegate' },
|
|
258
|
+
mode: {
|
|
259
|
+
type: 'string',
|
|
260
|
+
description: 'links add: await|handoff, for a delegate link',
|
|
261
|
+
},
|
|
262
|
+
url: { type: 'string', description: "mcp add: the server's URL" },
|
|
263
|
+
auth: {
|
|
264
|
+
type: 'string',
|
|
265
|
+
description: 'mcp add: none|token|oauth (default oauth)',
|
|
266
|
+
},
|
|
267
|
+
name: { type: 'string', description: "mcp add: the server's display name" },
|
|
268
|
+
cron: {
|
|
269
|
+
type: 'string',
|
|
270
|
+
description: 'triggers add schedule: a cron expression',
|
|
271
|
+
},
|
|
272
|
+
timezone: {
|
|
273
|
+
type: 'string',
|
|
274
|
+
description: 'triggers add schedule: an IANA time zone (default UTC)',
|
|
275
|
+
},
|
|
276
|
+
prompt: {
|
|
277
|
+
type: 'string',
|
|
278
|
+
description: 'triggers add: what the agent is told when it fires',
|
|
279
|
+
},
|
|
280
|
+
// Repeatable `field=value`, or one JSON object — as at the template level.
|
|
281
|
+
filter: {
|
|
282
|
+
type: 'string',
|
|
283
|
+
repeatable: true,
|
|
284
|
+
description: 'triggers add event: field=a,b (repeatable) or one JSON object',
|
|
285
|
+
},
|
|
286
|
+
// `teams <area> … --team <slug>`: the team, in place of the positional.
|
|
287
|
+
team: {
|
|
288
|
+
type: 'string',
|
|
289
|
+
description: 'The team, in place of the <team> argument (teams <area> … --team <slug>)',
|
|
290
|
+
},
|
|
291
|
+
// `teams triggers add … slack|linear`: where it answers. `--no-mention`
|
|
292
|
+
// is the negation of `mention`.
|
|
293
|
+
channel: {
|
|
294
|
+
type: 'string',
|
|
295
|
+
repeatable: true,
|
|
296
|
+
description: 'triggers add slack: a channel it answers in (#name or id)',
|
|
297
|
+
},
|
|
298
|
+
dms: {
|
|
299
|
+
type: 'boolean',
|
|
300
|
+
description: 'triggers add slack: also answer direct messages',
|
|
301
|
+
},
|
|
302
|
+
label: {
|
|
303
|
+
type: 'string',
|
|
304
|
+
repeatable: true,
|
|
305
|
+
description: 'triggers add linear: a label that hands an issue to it',
|
|
306
|
+
},
|
|
307
|
+
mention: {
|
|
308
|
+
type: 'boolean',
|
|
309
|
+
description: 'triggers add linear: --no-mention ignores @mentions',
|
|
310
|
+
},
|
|
127
311
|
// `teams connect`: `--no-wait`, `--no-open` (the negation of `open`),
|
|
128
312
|
// `--link-only`.
|
|
129
|
-
'no-wait': {
|
|
130
|
-
|
|
131
|
-
|
|
313
|
+
'no-wait': {
|
|
314
|
+
type: 'boolean',
|
|
315
|
+
description: 'connect: print the sign-in link and return at once',
|
|
316
|
+
},
|
|
317
|
+
open: {
|
|
318
|
+
type: 'boolean',
|
|
319
|
+
description: 'connect: --no-open prints the link without opening a browser',
|
|
320
|
+
},
|
|
321
|
+
'link-only': {
|
|
322
|
+
type: 'boolean',
|
|
323
|
+
description: "connect: print the team's page instead of connecting",
|
|
324
|
+
},
|
|
325
|
+
// `teams events <team> [--product] [--since] [--limit]`.
|
|
326
|
+
product: {
|
|
327
|
+
type: 'string',
|
|
328
|
+
description: 'events: only this product (or name it after the team)',
|
|
329
|
+
},
|
|
330
|
+
since: {
|
|
331
|
+
type: 'string',
|
|
332
|
+
description: 'events: since 30m, 24h, 7d or a date',
|
|
333
|
+
},
|
|
334
|
+
limit: { type: 'string', description: 'events: how many, 1 to 100' },
|
|
335
|
+
// `teams connect --reconnect`.
|
|
336
|
+
reconnect: {
|
|
337
|
+
type: 'boolean',
|
|
338
|
+
description: 'connect: connect again though it reads as connected (revoked or expired)',
|
|
339
|
+
},
|
|
132
340
|
},
|
|
133
341
|
reviewers: {
|
|
134
|
-
host:
|
|
135
|
-
source:
|
|
136
|
-
dir:
|
|
137
|
-
reach: {
|
|
138
|
-
|
|
342
|
+
host: HOST,
|
|
343
|
+
source: SOURCE,
|
|
344
|
+
dir: DIR,
|
|
345
|
+
reach: {
|
|
346
|
+
type: 'string',
|
|
347
|
+
description: "add: source (every team's drafts) or team (one team's)",
|
|
348
|
+
},
|
|
349
|
+
team: {
|
|
350
|
+
type: 'string',
|
|
351
|
+
description: "add --reach team, remove: the team's slug",
|
|
352
|
+
},
|
|
353
|
+
yes: { type: 'boolean', description: 'remove: confirm' },
|
|
139
354
|
},
|
|
140
355
|
routes: {
|
|
141
|
-
host:
|
|
142
|
-
source:
|
|
143
|
-
dir:
|
|
144
|
-
label: { type: 'string' },
|
|
145
|
-
webhook: {
|
|
356
|
+
host: HOST,
|
|
357
|
+
source: SOURCE,
|
|
358
|
+
dir: DIR,
|
|
359
|
+
label: { type: 'string', description: 'set: a name for the value' },
|
|
360
|
+
webhook: {
|
|
361
|
+
type: 'string',
|
|
362
|
+
description: 'webhook: which webhook, when the integration has several',
|
|
363
|
+
},
|
|
364
|
+
yes: {
|
|
365
|
+
type: 'boolean',
|
|
366
|
+
description: 'remove: confirm; webhook: replace the live URL, revoking it',
|
|
367
|
+
},
|
|
146
368
|
},
|
|
147
369
|
agents: {
|
|
148
|
-
host:
|
|
149
|
-
source:
|
|
150
|
-
dir:
|
|
370
|
+
host: HOST,
|
|
371
|
+
source: SOURCE,
|
|
372
|
+
dir: DIR,
|
|
151
373
|
// Not `--version`: that is global, and prints the CLI's own version.
|
|
152
|
-
to: {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
374
|
+
to: {
|
|
375
|
+
type: 'string',
|
|
376
|
+
description: 'publish, rollback: the version teams run',
|
|
377
|
+
},
|
|
378
|
+
'base-version': {
|
|
379
|
+
type: 'string',
|
|
380
|
+
description: 'apply: the version your edit starts from (refused when the host has moved on)',
|
|
381
|
+
},
|
|
382
|
+
overwrite: {
|
|
383
|
+
type: 'boolean',
|
|
384
|
+
description: 'apply: replace a newer version on the host anyway',
|
|
385
|
+
},
|
|
386
|
+
out: {
|
|
387
|
+
type: 'string',
|
|
388
|
+
description: 'pull: where to write the template (default agents/<key>)',
|
|
389
|
+
},
|
|
390
|
+
yes: {
|
|
391
|
+
type: 'boolean',
|
|
392
|
+
description: 'publish, rollback, archive, --publish: confirm (needed in a script or agent run)',
|
|
393
|
+
},
|
|
394
|
+
all: {
|
|
395
|
+
type: 'boolean',
|
|
396
|
+
description: 'list: include archived agents',
|
|
397
|
+
},
|
|
398
|
+
force: {
|
|
399
|
+
type: 'boolean',
|
|
400
|
+
description: 'init: replace the skills and CLAUDE.md that exist; pull: overwrite local files that differ',
|
|
401
|
+
},
|
|
402
|
+
claude: {
|
|
403
|
+
type: 'boolean',
|
|
404
|
+
description: 'init: add the docs to Claude Code without asking; --no-claude skips it',
|
|
405
|
+
},
|
|
159
406
|
// `agents test <key> --team <slug> --prompt|--input [--follow]`.
|
|
160
|
-
team: { type: 'string' },
|
|
161
|
-
prompt: {
|
|
162
|
-
|
|
163
|
-
|
|
407
|
+
team: { type: 'string', description: 'test: the team to run the draft on' },
|
|
408
|
+
prompt: {
|
|
409
|
+
type: 'string',
|
|
410
|
+
description: 'test: the message; triggers add: what the agent is told',
|
|
411
|
+
},
|
|
412
|
+
input: { type: 'string', description: 'test: a JSON file to run with' },
|
|
413
|
+
follow: {
|
|
414
|
+
type: 'boolean',
|
|
415
|
+
description: 'test: wait for the run and print its result',
|
|
416
|
+
},
|
|
164
417
|
// `apply`: `--no-skills` skips pushing the skill folders beside the agent.
|
|
165
|
-
skills: {
|
|
418
|
+
skills: {
|
|
419
|
+
type: 'boolean',
|
|
420
|
+
description: 'apply: --no-skills skips pushing <dir>/skills/<slug>/',
|
|
421
|
+
},
|
|
166
422
|
// policy | triggers | links | overrides
|
|
167
|
-
event: {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
423
|
+
event: {
|
|
424
|
+
type: 'string',
|
|
425
|
+
description: 'triggers add event: <product>.<event>',
|
|
426
|
+
},
|
|
427
|
+
filter: {
|
|
428
|
+
type: 'string',
|
|
429
|
+
repeatable: true,
|
|
430
|
+
description: 'triggers add event: field=a,b (repeat for more fields)',
|
|
431
|
+
},
|
|
432
|
+
disabled: {
|
|
433
|
+
type: 'boolean',
|
|
434
|
+
description: 'triggers add: store the trigger turned off',
|
|
435
|
+
},
|
|
436
|
+
cron: {
|
|
437
|
+
type: 'string',
|
|
438
|
+
description: 'triggers add schedule: a cron expression',
|
|
439
|
+
},
|
|
440
|
+
timezone: {
|
|
441
|
+
type: 'string',
|
|
442
|
+
description: 'triggers add schedule: an IANA time zone',
|
|
443
|
+
},
|
|
444
|
+
kind: { type: 'string', description: 'links: talk|delegate' },
|
|
445
|
+
mode: {
|
|
446
|
+
type: 'string',
|
|
447
|
+
description: 'links add: await|handoff, for a delegate link',
|
|
448
|
+
},
|
|
449
|
+
reads: {
|
|
450
|
+
type: 'string',
|
|
451
|
+
description: 'policy: auto|approve for every read tool',
|
|
452
|
+
},
|
|
453
|
+
writes: {
|
|
454
|
+
type: 'string',
|
|
455
|
+
description: 'policy: auto|approve for every write tool',
|
|
456
|
+
},
|
|
457
|
+
publish: {
|
|
458
|
+
type: 'boolean',
|
|
459
|
+
description: 'policy, triggers, links, overrides: publish the new version too (with --yes)',
|
|
460
|
+
},
|
|
461
|
+
// `publish | rollback` (and `--publish`): also confirm, as yourself, on
|
|
462
|
+
// every team running the version with no confirmation.
|
|
463
|
+
'confirm-access': {
|
|
464
|
+
type: 'boolean',
|
|
465
|
+
description: 'publish, rollback, --publish: also confirm, as yourself, on every team on that version not yet confirmed',
|
|
466
|
+
},
|
|
177
467
|
},
|
|
178
468
|
skills: {
|
|
179
|
-
host:
|
|
180
|
-
source:
|
|
181
|
-
dir:
|
|
182
|
-
team: {
|
|
183
|
-
|
|
469
|
+
host: HOST,
|
|
470
|
+
source: SOURCE,
|
|
471
|
+
dir: DIR,
|
|
472
|
+
team: {
|
|
473
|
+
type: 'string',
|
|
474
|
+
description: "That team's own skills instead of the Source's",
|
|
475
|
+
},
|
|
476
|
+
out: {
|
|
477
|
+
type: 'string',
|
|
478
|
+
description: 'pull: where to write the skill folder',
|
|
479
|
+
},
|
|
480
|
+
force: {
|
|
481
|
+
type: 'boolean',
|
|
482
|
+
description: 'pull: overwrite local files that differ from the host',
|
|
483
|
+
},
|
|
484
|
+
yes: {
|
|
485
|
+
type: 'boolean',
|
|
486
|
+
description: 'archive: confirm (needed in a script or agent run)',
|
|
487
|
+
},
|
|
184
488
|
},
|
|
185
489
|
knowledge: {
|
|
186
|
-
host:
|
|
187
|
-
source:
|
|
188
|
-
dir:
|
|
189
|
-
team: {
|
|
190
|
-
|
|
490
|
+
host: HOST,
|
|
491
|
+
source: SOURCE,
|
|
492
|
+
dir: DIR,
|
|
493
|
+
team: {
|
|
494
|
+
type: 'string',
|
|
495
|
+
description: "That team's collection instead of General",
|
|
496
|
+
},
|
|
497
|
+
out: { type: 'string', description: 'pull: where to write the articles' },
|
|
498
|
+
force: {
|
|
499
|
+
type: 'boolean',
|
|
500
|
+
description: 'pull: overwrite local files that differ from the host',
|
|
501
|
+
},
|
|
502
|
+
prune: {
|
|
503
|
+
type: 'boolean',
|
|
504
|
+
description: 'push: also delete the articles an earlier push of this folder made whose files are gone (never ones written or edited in the app)',
|
|
505
|
+
},
|
|
506
|
+
yes: {
|
|
507
|
+
type: 'boolean',
|
|
508
|
+
description: 'push --prune: delete without asking (needed in a script or agent run)',
|
|
509
|
+
},
|
|
191
510
|
},
|
|
192
511
|
runs: {
|
|
193
|
-
host:
|
|
194
|
-
source:
|
|
195
|
-
dir:
|
|
196
|
-
team: { type: 'string' },
|
|
197
|
-
agent: { type: 'string' },
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
512
|
+
host: HOST,
|
|
513
|
+
source: SOURCE,
|
|
514
|
+
dir: DIR,
|
|
515
|
+
team: { type: 'string', description: 'The team whose runs these are' },
|
|
516
|
+
agent: { type: 'string', description: "list: only this agent's runs" },
|
|
517
|
+
status: {
|
|
518
|
+
type: 'string',
|
|
519
|
+
description: 'list: only runs in this status (running, awaiting_approval, completed, failed, cancelled)',
|
|
520
|
+
},
|
|
521
|
+
since: {
|
|
522
|
+
type: 'string',
|
|
523
|
+
description: 'list: only runs started since 30m, 24h, 7d or a date',
|
|
524
|
+
},
|
|
525
|
+
prompt: { type: 'string', description: 'start: the message' },
|
|
526
|
+
input: { type: 'string', description: 'start: a JSON file to run with' },
|
|
527
|
+
follow: {
|
|
528
|
+
type: 'boolean',
|
|
529
|
+
description: 'start: wait for the run and print its result',
|
|
530
|
+
},
|
|
531
|
+
// `runs cancel <run-id> --yes`.
|
|
532
|
+
yes: { type: 'boolean', description: 'cancel: confirm' },
|
|
201
533
|
},
|
|
202
534
|
approvals: {
|
|
203
|
-
host:
|
|
204
|
-
source:
|
|
205
|
-
dir:
|
|
206
|
-
team: { type: 'string' },
|
|
207
|
-
reason: { type: 'string' },
|
|
208
|
-
body: {
|
|
535
|
+
host: HOST,
|
|
536
|
+
source: SOURCE,
|
|
537
|
+
dir: DIR,
|
|
538
|
+
team: { type: 'string', description: 'The team whose runs wait on these' },
|
|
539
|
+
reason: { type: 'string', description: 'approve, reject: why' },
|
|
540
|
+
body: {
|
|
541
|
+
type: 'string',
|
|
542
|
+
description: 'edit: a file with the reply to send instead',
|
|
543
|
+
},
|
|
209
544
|
},
|
|
210
545
|
use: {
|
|
211
|
-
host:
|
|
212
|
-
dir:
|
|
546
|
+
host: HOST,
|
|
547
|
+
dir: DIR,
|
|
213
548
|
},
|
|
214
549
|
publish: {
|
|
215
|
-
host:
|
|
216
|
-
source:
|
|
217
|
-
dir:
|
|
218
|
-
yes: {
|
|
550
|
+
host: HOST,
|
|
551
|
+
source: SOURCE,
|
|
552
|
+
dir: DIR,
|
|
553
|
+
yes: {
|
|
554
|
+
type: 'boolean',
|
|
555
|
+
description: 'Publish to the ekanos.json source without asking (needed in a script with several seats)',
|
|
556
|
+
},
|
|
219
557
|
},
|
|
220
558
|
upgrade: {
|
|
221
|
-
dir:
|
|
222
|
-
host:
|
|
223
|
-
check: {
|
|
224
|
-
|
|
559
|
+
dir: DIR,
|
|
560
|
+
host: HOST,
|
|
561
|
+
check: {
|
|
562
|
+
type: 'boolean',
|
|
563
|
+
description: 'Report current and target versions; change nothing',
|
|
564
|
+
},
|
|
565
|
+
yes: {
|
|
566
|
+
type: 'boolean',
|
|
567
|
+
description: 'Upgrade without asking (needed outside a terminal)',
|
|
568
|
+
},
|
|
225
569
|
// `--no-verify` is the negation of this — parse-argv's `--no-<bool>`
|
|
226
570
|
// convention (same as `--no-json`/`--no-start`), not a flag of its own.
|
|
227
|
-
verify: {
|
|
571
|
+
verify: {
|
|
572
|
+
type: 'boolean',
|
|
573
|
+
description: '--no-verify skips the validate and test run after installing',
|
|
574
|
+
},
|
|
228
575
|
},
|
|
229
576
|
};
|
|
230
577
|
/** Commands that take positional arguments, and what each means, in order. Every other command is positional-free. */
|
|
231
578
|
const POSITIONAL_COMMANDS = {
|
|
232
579
|
use: ['source-slug'],
|
|
233
|
-
sources
|
|
580
|
+
// `sources scopes add <scope> <product>` is the longest form.
|
|
581
|
+
sources: ['subcommand', 'verb', 'product-or-scope', 'product-slug'],
|
|
234
582
|
catalog: ['product-slug'],
|
|
235
583
|
apps: ['subcommand', 'product-slug'],
|
|
236
584
|
// `teams agents policy <team> <key> set <tool> auto` is the longest form.
|
|
@@ -265,7 +613,8 @@ const USAGE = [
|
|
|
265
613
|
' appendix from a JSON reporter report; --raw skips that and',
|
|
266
614
|
' the reporter injection entirely.',
|
|
267
615
|
' login Authenticate against an Ekanos host in a browser (--host <url>;',
|
|
268
|
-
' offers to add the Ekanos docs to Claude Code: --claude|--no-claude
|
|
616
|
+
' offers to add the Ekanos docs to Claude Code: --claude|--no-claude;',
|
|
617
|
+
' a host you have never used asks first, or needs --trust-host)',
|
|
269
618
|
' logout Revoke and delete the stored session (--host <url> | --all)',
|
|
270
619
|
' whoami Print the identity the stored session authenticates as, plus',
|
|
271
620
|
' a compact list of the sources you hold a seat on',
|
|
@@ -278,7 +627,10 @@ const USAGE = [
|
|
|
278
627
|
' Integration, and whether it is enabled for the Source) |',
|
|
279
628
|
' products enable <product> | products disable <product> --yes',
|
|
280
629
|
' (a super-admin grant: an "ekanos login" session is refused',
|
|
281
|
-
' and pointed at /admin)',
|
|
630
|
+
' and pointed at /admin) | scopes (each product scope: its',
|
|
631
|
+
' products and how many teams hold it; a team sees in the app',
|
|
632
|
+
" only its scopes' products) | scopes add <scope> <product> |",
|
|
633
|
+
' scopes remove <scope> <product> --yes',
|
|
282
634
|
' catalog What a source can already use, and how to set it up',
|
|
283
635
|
' ("ekanos catalog [<product-slug>] --source <slug>", --json)',
|
|
284
636
|
" apps The Source's app for an integration teams sign in through:",
|
|
@@ -286,50 +638,103 @@ const USAGE = [
|
|
|
286
638
|
' at your terminal, Enter keeps a saved value) | connect',
|
|
287
639
|
' <product> [--no-wait] (one',
|
|
288
640
|
" connection for the whole Source, used by the Source's provided",
|
|
289
|
-
' agents in every team) | disconnect <product>
|
|
641
|
+
' agents in every team) | disconnect <product> [--yes] (a',
|
|
642
|
+
' script or agent run needs --yes) | list',
|
|
290
643
|
" teams A Source's teams, for the Source admin:",
|
|
291
644
|
' create <name> [--slug <slug>] [--owner <email>] (you own it',
|
|
292
645
|
' unless --owner, who is invited as owner) |',
|
|
646
|
+
' rename <team> <name> (the slug follows the name, as in the app) |',
|
|
293
647
|
' members list <team> | members invite <team> <email> [--role',
|
|
294
648
|
' <role>] (default member; sends the invitation email) |',
|
|
295
649
|
' members role <team> <email> <role> | members remove <team>',
|
|
296
650
|
" <email> --yes | roles list <team> (each role's permissions) |",
|
|
297
|
-
' connect <team> <product> [--
|
|
298
|
-
|
|
299
|
-
'
|
|
300
|
-
"
|
|
301
|
-
'
|
|
651
|
+
' connect <team> <product> [--connection <id>] [--as',
|
|
652
|
+
' <member-email>] [--no-wait] [--no-open] [--link-only]',
|
|
653
|
+
' [--reconnect] (connects',
|
|
654
|
+
" it: asks the form's fields at your terminal, or opens the",
|
|
655
|
+
' sign-in for you or the member --as names and waits;',
|
|
656
|
+
" --connection agent installs the team's Linear agent (its own",
|
|
657
|
+
' Linear app, as a member), which @mention and assign triggers',
|
|
658
|
+
" need; --link-only prints the team's page; --reconnect connects",
|
|
659
|
+
' it again when it reads as connected but is broken: a revoked or',
|
|
660
|
+
' expired sign-in) |',
|
|
661
|
+
' connect <team> slack|linear-app [--as <member-email>] (installs',
|
|
662
|
+
' Slack, or the Ekanos Agents app for Linear, which slack and',
|
|
663
|
+
' linear triggers answer through; same link-and-wait) |',
|
|
664
|
+
" disconnect <team> <product> --yes (takes the team's connection",
|
|
665
|
+
" and its tokens down; its own app's saved fields stay) |",
|
|
666
|
+
' list | show <team> (one screen: members, each integration and',
|
|
667
|
+
' whose connection it is, each agent live or the next step) |',
|
|
668
|
+
' show <team> <product> (a checklist: fields, callback',
|
|
302
669
|
' URLs, webhooks, connect link) | app set <team> <product>',
|
|
303
670
|
' [--connection <id>] [--field <name>]… [--set <name>=<value>]…',
|
|
304
671
|
' [--clear <name>]… (any one field at a time; a field you skip',
|
|
305
672
|
' keeps its saved value; secrets only at your terminal) |',
|
|
306
|
-
' webhook <team> <product> [<webhook-id>] [--yes] (URL
|
|
673
|
+
' webhook <team> <product> [<webhook-id>] [--yes] (URL saved to a 0600 file under ~/.ekanos/secrets, never printed) |',
|
|
674
|
+
' events <team> [<product>] [--product <slug>] [--since 24h|7d|<date>]',
|
|
675
|
+
' [--limit <n>] (the integration events recorded for the team, each',
|
|
676
|
+
' with its status, last error and the runs it started, or why none did)',
|
|
677
|
+
' | scope show <team> (the product scopes it holds and the products',
|
|
678
|
+
' it sees in the app) | scope set <team> <scope> [<scope>…] [--yes]',
|
|
679
|
+
' (replaces them; dropping one needs --yes)',
|
|
307
680
|
" A team's agents, for the Source admin (teams <area> <verb> <team> …):",
|
|
308
|
-
' agents list <team> | agents
|
|
309
|
-
'
|
|
681
|
+
' agents list <team> | agents show <team> <key> (is it live, and if',
|
|
682
|
+
' not, why: each connection and whose it is, each trigger and how its',
|
|
683
|
+
' events arrive, last event and run, one Next command)',
|
|
684
|
+
' | agents enable <team> <key> [--as <member-email>]',
|
|
685
|
+
' [--draft] [--confirm-access] (--confirm-access: you also confirm',
|
|
686
|
+
' what it may use) | agents confirm <team> <key> (you confirm what',
|
|
687
|
+
' it may use, as yourself: whoever sets an agent up confirms it, never',
|
|
688
|
+
' a team member) | agents disable <team> <key> --yes | agents',
|
|
689
|
+
' unpin <team> <key> | agents pin <team> <key> <version> | agents pin',
|
|
690
|
+
' <team> <key> --draft (this team only runs the unpublished draft, by',
|
|
691
|
+
' hand, every write waiting; the next publish puts it back to',
|
|
692
|
+
' following)',
|
|
310
693
|
' | agents policy <team> <key> [set <tool> auto|approve | unset <tool>]',
|
|
311
|
-
' [--reads auto|approve] [--writes auto|approve]',
|
|
312
|
-
'
|
|
694
|
+
' [--reads auto|approve] [--writes auto|approve] [--confirm-access]',
|
|
695
|
+
' | agents skills <team> <key> [add|remove <skill>] (where the',
|
|
696
|
+
' template allows team skills; its own skills stay)',
|
|
697
|
+
' triggers list|add|remove <team> <key> … (add … event <id>',
|
|
698
|
+
" [--filter field=a,b]… or --filter '<json>'; remove <trigger-id|key> --yes;",
|
|
699
|
+
' add … slack --channel',
|
|
700
|
+
' <#name|id>… [--dms] --yes | add … linear [--label <name>]…',
|
|
701
|
+
' [--no-mention], once installed with teams connect) | triggers',
|
|
702
|
+
" rotate <team> <key> <trigger-key|id> [--yes] (a webhook trigger's",
|
|
703
|
+
' new token, the old one revoked; saved to a 0600 file, never printed) | links list|add|remove',
|
|
313
704
|
' <team> <from-key> [<to-key> --kind talk|delegate --mode await|handoff]',
|
|
314
|
-
'
|
|
315
|
-
'
|
|
705
|
+
' (remove <link-id|to-key> [--kind <kind>] --yes)',
|
|
706
|
+
' | mcp list|add|status|token|effect|remove <team> [<server-key> …]',
|
|
707
|
+
' (remove needs --yes)',
|
|
708
|
+
' Every area also takes the team as --team <slug>.',
|
|
709
|
+
' ("ekanos teams --help" spells out each area)',
|
|
316
710
|
' reviewers Who decides agent reply drafts, for the Source admin:',
|
|
317
711
|
' list | add <email> --reach source|team [--team <slug>] |',
|
|
318
|
-
' remove <email> [--team <slug>]',
|
|
712
|
+
' remove <email> [--team <slug>] --yes',
|
|
319
713
|
" routes Route a Source connection's events to teams, for the Source admin:",
|
|
320
714
|
' list [<product>] | options <product> | set <product> <value> <team>',
|
|
321
|
-
' [--label <name>] | remove <product> <value> | webhook
|
|
322
|
-
' [--webhook <id>] (URL
|
|
715
|
+
' [--label <name>] | remove <product> <value> --yes | webhook',
|
|
716
|
+
' <product> [--webhook <id>] [--yes] (URL saved to a 0600 file, never printed; --yes',
|
|
717
|
+
' replaces a live one, revoking it) | unrouted [<product>] |',
|
|
323
718
|
' replay <event-id>',
|
|
324
719
|
" agents The source's agent templates, held by Ekanos:",
|
|
325
720
|
' init [<dir>] [--claude|--no-claude] (skills + docs MCP for designing',
|
|
326
721
|
' agents with Claude; offers to add the docs to Claude Code)',
|
|
327
|
-
' list
|
|
722
|
+
' list [--all] (--all: archived agents too) | show <key> |',
|
|
723
|
+
' pull <key> [--out <dir>] [--force] (--force: overwrite local',
|
|
724
|
+
' files that differ; without it the pull refuses and writes nothing)',
|
|
328
725
|
' apply <dir|file> [--base-version <n>] [--overwrite]',
|
|
329
|
-
'
|
|
726
|
+
' archive <key> --yes (refused while any team has it on; lists',
|
|
727
|
+
' each team and the command to turn it off) | unarchive <key>',
|
|
728
|
+
' publish <key> [--to <n>] [--confirm-access] --yes | rollback <key>',
|
|
729
|
+
' --to <n> [--confirm-access] --yes (every following team moves; one',
|
|
730
|
+
' that had confirmed stays confirmed, in your name: your publish is the',
|
|
731
|
+
' confirmation; --confirm-access: you also confirm every team on that',
|
|
732
|
+
' version not yet confirmed; the output lists teams pinned elsewhere)',
|
|
330
733
|
' test <key> --team <slug> (--prompt "…" | --input <file.json>)',
|
|
331
734
|
' [--follow] (runs the latest, unpublished version on one team;',
|
|
332
|
-
' same grant, policy, approvals and audit; marked as a test
|
|
735
|
+
' same grant, policy, approvals and audit; marked as a test; to',
|
|
736
|
+
' test a tool the draft adds, first "teams agents pin <team> <key>',
|
|
737
|
+
' --draft", which also works before anything is published)',
|
|
333
738
|
' apply also pushes <dir>/skills/<slug>/ folders first and names',
|
|
334
739
|
' them in the agent (--no-skills skips that)',
|
|
335
740
|
' Edit one template in place (stores a draft version; --publish',
|
|
@@ -337,7 +742,8 @@ const USAGE = [
|
|
|
337
742
|
' policy <key> [set <tool> auto|approve | unset <tool>]',
|
|
338
743
|
' [--reads auto|approve] [--writes auto|approve]',
|
|
339
744
|
' triggers <key> [list | add event <k> --event <slug.event>',
|
|
340
|
-
|
|
745
|
+
" [--filter field=a,b]... (or one --filter '<json>') | add",
|
|
746
|
+
' schedule <k> --cron "<expr>"',
|
|
341
747
|
' [--timezone <tz>] --prompt <text> | add webhook <k> --prompt',
|
|
342
748
|
' <text> | remove <k>] [--prompt <text>] [--disabled]',
|
|
343
749
|
' links <key> [list | add <to-key> --kind talk|delegate',
|
|
@@ -350,18 +756,29 @@ const USAGE = [
|
|
|
350
756
|
' push <dir> [--team <t>] (a new version, live at once; created',
|
|
351
757
|
' on first push, "unchanged" when identical; --team: that team\'s',
|
|
352
758
|
' own skill, no other team sees it) | pull <slug> [--out <dir>]',
|
|
759
|
+
' [--force] (refuses to overwrite a local file that differs)',
|
|
760
|
+
' | archive <slug> [--team <t>] --yes (refused while an agent',
|
|
761
|
+
' names it or a team agent has it attached; lists each and the',
|
|
762
|
+
' command that stops it) | unarchive <slug> [--team <t>]',
|
|
353
763
|
" knowledge The Source's Knowledge base (markdown articles), for the Source admin:",
|
|
354
764
|
' list [--team <t>] | push <dir> [--team <t>] (each .md file an',
|
|
355
765
|
' article: title from frontmatter or the first heading, tags from',
|
|
356
|
-
' frontmatter; upserts by path, "unchanged" when identical
|
|
766
|
+
' frontmatter; upserts by path, "unchanged" when identical;',
|
|
767
|
+
' --prune [--yes] also deletes the articles an earlier push of',
|
|
768
|
+
' this folder made whose files are gone, never ones written or',
|
|
769
|
+
' edited in the app) |',
|
|
357
770
|
" search <query> --team <t> (as that team's agents search: its",
|
|
358
771
|
' articles plus General) | pull [--team <t>] [--out <dir>]',
|
|
359
|
-
'
|
|
772
|
+
' [--force] (refuses to overwrite a local file that differs)',
|
|
773
|
+
" Without --team: General, which every team's agents granted",
|
|
774
|
+
' search_knowledge read.',
|
|
360
775
|
" runs Run and inspect a team's agents, as the Source admin:",
|
|
361
776
|
' start <agent-key> --team <slug> (--prompt "…" | --input',
|
|
362
|
-
' <file.json>) [--follow] | list --team <slug> [--agent <key>]
|
|
777
|
+
' <file.json>) [--follow] | list --team <slug> [--agent <key>]',
|
|
778
|
+
' [--status <status>] [--since 24h|7d|<date>] |',
|
|
363
779
|
' show <run-id> --team <slug> (--json: transcript, tool calls,',
|
|
364
|
-
' how each was authorized, approvals)',
|
|
780
|
+
' how each was authorized, approvals) | cancel <run-id> --team',
|
|
781
|
+
' <slug> [--yes] (stops a live run; asks first, --yes in a script)',
|
|
365
782
|
" approvals What a team's agent runs wait on: list --team <slug> |",
|
|
366
783
|
' approve|reject <id> --team <slug> [--reason "…"] |',
|
|
367
784
|
' edit <id> --team <slug> --body <file> (edit & send a reply draft)',
|
|
@@ -384,7 +801,10 @@ const USAGE = [
|
|
|
384
801
|
' sole stored login. "ekanos publish" saves host and source to ekanos.json.',
|
|
385
802
|
' "ekanos login" never reads ekanos.json for a host (--host, else',
|
|
386
803
|
' EKANOS_HOST, else the sole stored login) — it is the verb that creates',
|
|
387
|
-
' credentials, so a committed file must never choose where they go.',
|
|
804
|
+
' credentials, so a committed file must never choose where they go. A',
|
|
805
|
+
' host you have never logged in to is shown with its sign-in domain and',
|
|
806
|
+
' asked about first (--trust-host when nobody can be asked). A remote',
|
|
807
|
+
' http:// host is refused by every verb that sends credentials.',
|
|
388
808
|
'',
|
|
389
809
|
'Publish targeting (see "ekanos sources" / "ekanos use"):',
|
|
390
810
|
' publish refuses (FORBIDDEN) a source you hold no seat on. With multiple',
|
|
@@ -496,6 +916,8 @@ export async function run(argv, options = {}) {
|
|
|
496
916
|
host: parsed.flags.host,
|
|
497
917
|
force: parsed.flags.force === true,
|
|
498
918
|
claude: parsed.flags.claude,
|
|
919
|
+
trustHost: parsed.flags['trust-host'] === true,
|
|
920
|
+
confirmHost: options.confirm,
|
|
499
921
|
cwd,
|
|
500
922
|
env,
|
|
501
923
|
stdinIsTTY: options.stdinIsTTY,
|
|
@@ -554,6 +976,7 @@ export async function run(argv, options = {}) {
|
|
|
554
976
|
askSecret: options.askSecret,
|
|
555
977
|
confirm: options.confirm,
|
|
556
978
|
noWait: parsed.flags['no-wait'] === true,
|
|
979
|
+
yes: parsed.flags.yes === true,
|
|
557
980
|
});
|
|
558
981
|
case 'teams':
|
|
559
982
|
return await runTeams(ctx, {
|
|
@@ -568,12 +991,15 @@ export async function run(argv, options = {}) {
|
|
|
568
991
|
noWait: parsed.flags['no-wait'] === true,
|
|
569
992
|
noOpen: parsed.flags.open === false,
|
|
570
993
|
linkOnly: parsed.flags['link-only'] === true,
|
|
994
|
+
reconnect: parsed.flags.reconnect === true,
|
|
571
995
|
flags: parsed.flags,
|
|
572
996
|
dir,
|
|
573
997
|
env,
|
|
574
998
|
stdinIsTTY: options.stdinIsTTY,
|
|
575
999
|
ask: options.ask,
|
|
576
1000
|
askSecret: options.askSecret,
|
|
1001
|
+
openUrl: options.openUrl,
|
|
1002
|
+
pollDelayMs: options.pollDelayMs,
|
|
577
1003
|
});
|
|
578
1004
|
case 'reviewers':
|
|
579
1005
|
return await runReviewers(ctx, {
|
|
@@ -582,6 +1008,7 @@ export async function run(argv, options = {}) {
|
|
|
582
1008
|
positionals: parsed.positionals,
|
|
583
1009
|
reach: parsed.flags.reach,
|
|
584
1010
|
team: parsed.flags.team,
|
|
1011
|
+
yes: parsed.flags.yes === true,
|
|
585
1012
|
dir,
|
|
586
1013
|
env,
|
|
587
1014
|
});
|
|
@@ -592,6 +1019,7 @@ export async function run(argv, options = {}) {
|
|
|
592
1019
|
positionals: parsed.positionals,
|
|
593
1020
|
label: parsed.flags.label,
|
|
594
1021
|
webhook: parsed.flags.webhook,
|
|
1022
|
+
yes: parsed.flags.yes === true,
|
|
595
1023
|
dir,
|
|
596
1024
|
env,
|
|
597
1025
|
});
|
|
@@ -606,6 +1034,7 @@ export async function run(argv, options = {}) {
|
|
|
606
1034
|
overwrite: parsed.flags.overwrite === true,
|
|
607
1035
|
out: parsed.flags.out,
|
|
608
1036
|
yes: parsed.flags.yes === true,
|
|
1037
|
+
all: parsed.flags.all === true,
|
|
609
1038
|
force: parsed.flags.force === true,
|
|
610
1039
|
claude: parsed.flags.claude,
|
|
611
1040
|
skills: parsed.flags.skills,
|
|
@@ -620,6 +1049,7 @@ export async function run(argv, options = {}) {
|
|
|
620
1049
|
reads: parsed.flags.reads,
|
|
621
1050
|
writes: parsed.flags.writes,
|
|
622
1051
|
publish: parsed.flags.publish === true,
|
|
1052
|
+
confirmAccess: parsed.flags['confirm-access'] === true,
|
|
623
1053
|
dir,
|
|
624
1054
|
env,
|
|
625
1055
|
stdinIsTTY: options.stdinIsTTY,
|
|
@@ -637,14 +1067,19 @@ export async function run(argv, options = {}) {
|
|
|
637
1067
|
positionals: parsed.positionals,
|
|
638
1068
|
team: parsed.flags.team,
|
|
639
1069
|
agent: parsed.flags.agent,
|
|
1070
|
+
status: parsed.flags.status,
|
|
1071
|
+
since: parsed.flags.since,
|
|
640
1072
|
prompt: parsed.flags.prompt,
|
|
641
1073
|
input: parsed.flags.input,
|
|
642
1074
|
follow: parsed.flags.follow === true,
|
|
643
1075
|
reason: parsed.flags.reason,
|
|
644
1076
|
body: parsed.flags.body,
|
|
1077
|
+
yes: parsed.flags.yes === true,
|
|
645
1078
|
dir,
|
|
646
1079
|
env,
|
|
647
1080
|
sleep: options.sleep,
|
|
1081
|
+
stdinIsTTY: options.stdinIsTTY,
|
|
1082
|
+
confirm: options.confirm,
|
|
648
1083
|
});
|
|
649
1084
|
case 'skills':
|
|
650
1085
|
return await runSkills(ctx, {
|
|
@@ -654,8 +1089,12 @@ export async function run(argv, options = {}) {
|
|
|
654
1089
|
target: parsed.positionals[1],
|
|
655
1090
|
team: parsed.flags.team,
|
|
656
1091
|
out: parsed.flags.out,
|
|
1092
|
+
force: parsed.flags.force === true,
|
|
1093
|
+
yes: parsed.flags.yes === true,
|
|
657
1094
|
dir,
|
|
658
1095
|
env,
|
|
1096
|
+
stdinIsTTY: options.stdinIsTTY,
|
|
1097
|
+
confirm: options.confirm,
|
|
659
1098
|
});
|
|
660
1099
|
case 'knowledge':
|
|
661
1100
|
return await runKnowledge(ctx, {
|
|
@@ -665,8 +1104,13 @@ export async function run(argv, options = {}) {
|
|
|
665
1104
|
target: parsed.positionals[1],
|
|
666
1105
|
team: parsed.flags.team,
|
|
667
1106
|
out: parsed.flags.out,
|
|
1107
|
+
force: parsed.flags.force === true,
|
|
1108
|
+
prune: parsed.flags.prune === true,
|
|
1109
|
+
yes: parsed.flags.yes === true,
|
|
668
1110
|
dir,
|
|
669
1111
|
env,
|
|
1112
|
+
stdinIsTTY: options.stdinIsTTY,
|
|
1113
|
+
confirm: options.confirm,
|
|
670
1114
|
});
|
|
671
1115
|
case 'use':
|
|
672
1116
|
return await runUse(ctx, {
|
|
@@ -785,12 +1229,83 @@ function emitHelp(ctx) {
|
|
|
785
1229
|
});
|
|
786
1230
|
return ctx.succeed({ usage: USAGE, commands: COMMANDS, docs: SDK_DOCS_URL }, `${USAGE}${DOCS_FOOTER}`);
|
|
787
1231
|
}
|
|
1232
|
+
/** The per-area usage a command's own parser already gives, shown in its help too. */
|
|
1233
|
+
const COMMAND_DETAILS = {
|
|
1234
|
+
teams: () => TEAM_AGENT_AREAS.map(usageFor),
|
|
1235
|
+
agents: () => Object.entries(TEMPLATE_EDIT_HELP).map(([area, examples]) => `${area}: ${examples}`),
|
|
1236
|
+
};
|
|
1237
|
+
/** A command's block of the top-level usage: its line and the indented ones under it. */
|
|
1238
|
+
function commandUsage(command) {
|
|
1239
|
+
const lines = USAGE.split('\n');
|
|
1240
|
+
const start = lines.findIndex((line) => line.startsWith(` ${command} `));
|
|
1241
|
+
if (start === -1)
|
|
1242
|
+
return '';
|
|
1243
|
+
const end = lines.findIndex((line, index) => index > start && !line.startsWith(' '));
|
|
1244
|
+
return lines.slice(start, end === -1 ? undefined : end).join('\n');
|
|
1245
|
+
}
|
|
1246
|
+
function optionLabel(name, spec) {
|
|
1247
|
+
if (spec.type === 'boolean')
|
|
1248
|
+
return `--${name}`;
|
|
1249
|
+
return `--${name} <value>${spec.repeatable ? '…' : ''}`;
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* `ekanos <command> --help`: the command's block of the usage (its
|
|
1253
|
+
* subcommands, each described), the per-area usage its parser gives, and
|
|
1254
|
+
* every flag with its description. The JSON envelope carries the same, so an
|
|
1255
|
+
* agent reading it is not left with flag names only.
|
|
1256
|
+
*/
|
|
788
1257
|
function emitCommandHelp(ctx, command) {
|
|
789
1258
|
var _a;
|
|
790
|
-
|
|
1259
|
+
var _b, _c, _d;
|
|
1260
|
+
const specs = (_b = COMMAND_SPECS[command]) !== null && _b !== void 0 ? _b : {};
|
|
791
1261
|
const flags = Object.keys(specs).map((name) => `--${name}`);
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
|
|
1262
|
+
const usage = commandUsage(command);
|
|
1263
|
+
const details = (_c = (_a = COMMAND_DETAILS[command]) === null || _a === void 0 ? void 0 : _a.call(COMMAND_DETAILS)) !== null && _c !== void 0 ? _c : [];
|
|
1264
|
+
const options = [
|
|
1265
|
+
...Object.entries(specs),
|
|
1266
|
+
...Object.entries(GLOBAL_SPECS),
|
|
1267
|
+
].map(([name, spec]) => { var _a; return ({
|
|
1268
|
+
flag: `--${name}`,
|
|
1269
|
+
label: optionLabel(name, spec),
|
|
1270
|
+
takesValue: spec.type === 'string',
|
|
1271
|
+
repeatable: spec.repeatable === true,
|
|
1272
|
+
description: (_a = spec.description) !== null && _a !== void 0 ? _a : '',
|
|
1273
|
+
}); });
|
|
1274
|
+
const positionals = (_d = POSITIONAL_COMMANDS[command]) !== null && _d !== void 0 ? _d : [];
|
|
1275
|
+
const synopsis = [
|
|
1276
|
+
`ekanos ${command}`,
|
|
1277
|
+
positionals.length === 0
|
|
1278
|
+
? ''
|
|
1279
|
+
: positionals.length === 1
|
|
1280
|
+
? ` <${positionals[0]}>`
|
|
1281
|
+
: ` <${positionals[0]}> …`,
|
|
1282
|
+
' [options]',
|
|
1283
|
+
].join('');
|
|
1284
|
+
const docs = docsPage('cli/commands', command);
|
|
1285
|
+
const width = Math.min(26, Math.max(...options.map((option) => option.label.length)));
|
|
1286
|
+
const human = [
|
|
1287
|
+
`Usage: ${synopsis}`,
|
|
1288
|
+
...(usage ? ['', usage] : []),
|
|
1289
|
+
...(details.length > 0 ? ['', ...details] : []),
|
|
1290
|
+
'',
|
|
1291
|
+
'Options:',
|
|
1292
|
+
...options.map((option) => option.label.length > width
|
|
1293
|
+
? ` ${option.label}\n ${' '.repeat(width)} ${option.description}`
|
|
1294
|
+
: ` ${option.label.padEnd(width)} ${option.description}`),
|
|
1295
|
+
'',
|
|
1296
|
+
`Docs: ${docs}`,
|
|
1297
|
+
].join('\n');
|
|
1298
|
+
ctx.emitClaudeCodeHint({ tool: 'ekanos', command, flags, usage });
|
|
1299
|
+
return ctx.succeed({
|
|
1300
|
+
command,
|
|
1301
|
+
flags,
|
|
1302
|
+
usage,
|
|
1303
|
+
details,
|
|
1304
|
+
options: options.map((_a) => {
|
|
1305
|
+
var { label: _label } = _a, option = __rest(_a, ["label"]);
|
|
1306
|
+
return option;
|
|
1307
|
+
}),
|
|
1308
|
+
docs,
|
|
1309
|
+
}, human);
|
|
795
1310
|
}
|
|
796
1311
|
//# sourceMappingURL=index.js.map
|