ethos-cli 0.6.0 → 0.7.1

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.
@@ -8,9 +8,9 @@ import { openInBrowser } from "../lib/open-browser.js";
8
8
  import { printResult } from "../lib/output.js";
9
9
  const SKILL = "find-people-at-companies";
10
10
  const HOOK_EVENT = "UserPromptSubmit";
11
- // Explicit invocation only: the skill named in the prompt, with or without a
12
- // leading slash. Conservative on purpose so unrelated prompts never open a browser.
13
- const EAGER_OPEN_TRIGGER = /(^|\s)\/?find-people-at-companies\b/i;
11
+ // Explicit invocation only: Codex's skill-link shape must appear in the prompt.
12
+ // Mentions in prose, pasted transcripts, and debug discussion should no-op.
13
+ const EAGER_OPEN_TRIGGER = /\[\$find-people-at-companies\]\([^)]*\/find-people-at-companies\/SKILL\.md\)/i;
14
14
  export function registerHooks(program) {
15
15
  const hooks = program
16
16
  .command("hooks")
@@ -25,25 +25,24 @@ export function matchesEagerOpenTrigger(prompt) {
25
25
  function registerEagerOpen(hooks) {
26
26
  const eagerOpen = hooks
27
27
  .command("eager-open")
28
- .description(`${HOOK_EVENT} hook handler: when the ${SKILL} skill is invoked, pre-open the upload browser and inject the started handoff for the skill to reuse`);
28
+ .description(`${HOOK_EVENT} hook handler: when the ${SKILL} skill is invoked, create the upload handoff and inject it for the skill to reuse`);
29
29
  eagerOpen.action(async () => {
30
+ const prompt = readHookPrompt();
31
+ if (!matchesEagerOpenTrigger(prompt))
32
+ return; // not this skill - leave the prompt untouched
30
33
  try {
31
- const prompt = readHookPrompt();
32
- if (!matchesEagerOpenTrigger(prompt))
33
- return; // not this skill - leave the prompt untouched
34
34
  await withClient(eagerOpen, async (client, config) => {
35
35
  const clientId = resolveAgentClientId("auto");
36
36
  const handoff = await createFindPeopleHandoff(client, config, { agentClient: clientId });
37
- // Codex uploads in its in-app Browser, a surface only the agent can open;
38
- // the OS opener would surface the wrong window. So only shell clients
39
- // (Claude Code) open here — on Codex we inject the URL for the agent to open.
37
+ // Codex uploads in its in-app Browser, which only the agent can open.
38
+ // Shell clients get the latency win from opening the OS browser here.
40
39
  if (clientId !== "codex")
41
40
  openInBrowser(handoff.handoff_url);
42
41
  emitAdditionalContext(eagerOpenContext(handoff, clientId));
43
42
  });
44
43
  }
45
- catch {
46
- // Never block or fail the user's prompt; the skill's own `flows start` is the fallback.
44
+ catch (error) {
45
+ emitAdditionalContext(eagerOpenFailureContext(error));
47
46
  }
48
47
  });
49
48
  }
@@ -63,15 +62,33 @@ function readHookPrompt() {
63
62
  }
64
63
  function eagerOpenContext(handoff, clientId) {
65
64
  const workspace = handoff.org_name ? ` in workspace "${handoff.org_name}"` : "";
66
- // Codex can't be OS-opened by the hook, so tell the agent to open it in-app;
67
- // Claude Code's OS browser is already opening.
68
- const lead = clientId === "codex"
69
- ? `Ethos find-people: a CSV upload flow is ready${workspace}. Open ${handoff.upload_url} in your in-app Browser`
70
- : `Ethos find-people: the CSV upload browser is already opening${workspace} (pre-started by a hook)`;
71
- return (`${lead}. Reuse this flow when running the ${SKILL} skill - do NOT run \`ethos flows start\` again. ` +
72
- `handoff_token=${handoff.handoff_token}. ` +
73
- `Next: ask the user for their ICP and buying-signal brief while they upload, then run ` +
74
- `\`ethos flows wait ${handoff.handoff_token} --json\` to capture the uploaded table id.`);
65
+ const browserInstruction = clientId === "codex"
66
+ ? `Open upload_url in the Codex in-app Browser now.`
67
+ : `The upload browser is already opening in the OS browser.`;
68
+ return [
69
+ `ETHOS_FIND_PEOPLE_HANDOFF_READY`,
70
+ `This is the hook-created upload handoff for the current ${SKILL} request${workspace}.`,
71
+ `Do not say no hook handoff was injected.`,
72
+ `Do not run \`ethos flows start\` or create another handoff.`,
73
+ `If the user provided a local CLI path, the hook already used the installed hook command for this environment.`,
74
+ browserInstruction,
75
+ `handoff_token=${handoff.handoff_token}`,
76
+ `upload_url=${handoff.upload_url}`,
77
+ `agent_client=${handoff.agent_client}`,
78
+ `org_id=${handoff.org_id}`,
79
+ `org_name=${handoff.org_name}`,
80
+ `Next: ask the user for their ICP and buying-signal brief while they upload, then run \`ethos flows wait ${handoff.handoff_token} --json\` to capture the uploaded table id.`,
81
+ ].join("\n");
82
+ }
83
+ function eagerOpenFailureContext(error) {
84
+ const message = error instanceof Error ? error.message : String(error);
85
+ if (/missing api token/i.test(message)) {
86
+ return (`Ethos find-people: the eager handoff hook could not create an upload flow because the Ethos CLI is not authenticated. ` +
87
+ `Do NOT run \`ethos flows start\` before logging in; it will fail the same way. ` +
88
+ `Run \`ethos auth login --agent-client auto\`, then use the skill's \`ethos flows start find-people-at-companies --agent-client auto --json\` fallback for this turn.`);
89
+ }
90
+ return (`Ethos find-people: the eager handoff hook could not create an upload flow (${message}). ` +
91
+ `Continue with the skill fallback; if auth is missing, run \`ethos auth login --agent-client auto\` before \`ethos flows start\`.`);
75
92
  }
76
93
  function emitAdditionalContext(additionalContext) {
77
94
  process.stdout.write(JSON.stringify({
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAsB,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAA0B,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,KAAK,GAAG,0BAA0B,CAAC;AACzC,MAAM,UAAU,GAAG,kBAAkB,CAAC;AACtC,6EAA6E;AAC7E,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,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACvH,CAAC,CAAC,oBAAoB;YACxB,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;SAC1B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAgB,EAAE,MAAwC;IAClF,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AAC7E,CAAC"}
@@ -19,7 +19,7 @@ export const HOOK_AGENTS = {
19
19
  export const ALL_HOOK_AGENTS = Object.keys(HOOK_AGENTS);
20
20
  const HOOK_EVENT = "UserPromptSubmit";
21
21
  // Substring identifying our handler, so install/uninstall stay idempotent and
22
- // migrate older bindings (e.g. a dev-CLI path) in place.
22
+ // migrate an older binding (e.g. a dev-CLI path) in place.
23
23
  const HOOK_COMMAND_MARKER = "hooks eager-open";
24
24
  /**
25
25
  * The command the hook runs. Bound to whichever CLI installs it: the dev CLI
@@ -1 +1 @@
1
- {"version":3,"file":"hooks-installer.js","sourceRoot":"","sources":["../../src/lib/hooks-installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAe1C,MAAM,CAAC,MAAM,WAAW,GAAqC;IAC3D,aAAa,EAAE;QACb,IAAI,EAAE,aAAa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AI,KAAK,CAAC,uBAAuB,GAAG,gBAAgB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5C,CAAC"}
@@ -1,8 +1,8 @@
1
- import { HOOK_AGENTS, detectHookAgents, installEagerOpenHook } from "../lib/hooks-installer.js";
1
+ import { detectHookAgents, installEagerOpenHook } from "../lib/hooks-installer.js";
2
2
  // Runs on `npm install`. Re-binds the find-people eager-open hook to the CLI
3
3
  // being installed — for a normal global install that is prod `ethos`, so
4
- // installing through npm always returns the hook to production (a `make dev`
5
- // run rebinds it to the dev CLI for local testing).
4
+ // installing through npm always returns hooks to production (a `make dev` run
5
+ // rebinds them to the dev CLI for local testing).
6
6
  async function main() {
7
7
  if (process.env.ETHOS_SKIP_HOOKS || process.env.ETHOS_SKIP_SKILLS) {
8
8
  process.stderr.write("ethos: skipping eager-open hook install.\n");
@@ -17,8 +17,7 @@ async function main() {
17
17
  if (!agents.length)
18
18
  return;
19
19
  const { command, results } = await installEagerOpenHook({ agents });
20
- const targets = results.map((entry) => HOOK_AGENTS[entry.agent].displayName).join(", ");
21
- process.stderr.write(`ethos: eager-open hook installed for ${targets} (command: ${command})\n`);
20
+ process.stderr.write(`ethos: eager-open hook installed for ${results.map((entry) => entry.agent).join(", ")} (command: ${command})\n`);
22
21
  }
23
22
  main().catch((err) => {
24
23
  process.stderr.write(`ethos: hook install failed (continuing) - ${err instanceof Error ? err.message : String(err)}\nRun \`ethos hooks install\` manually after install completes.\n`);
@@ -1 +1 @@
1
- {"version":3,"file":"install-hooks.js","sourceRoot":"","sources":["../../src/scripts/install-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEhG,6EAA6E;AAC7E,yEAAyE;AACzE,6EAA6E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,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CACjD,mEAAmE,CACpE,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ethos-cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Commander-based CLI for Ethos table operations",
5
5
  "homepage": "https://github.com/cluster-software/ethos#readme",
6
6
  "repository": {
@@ -11,34 +11,29 @@ pass `--api-url` for local development or an explicitly requested environment.
11
11
 
12
12
  ## Required CLI
13
13
 
14
- The Ethos CLI (`ethos`) is required. The first command in this skill opens the
15
- upload browser straight away:
16
-
17
- ```sh
18
- ethos flows start find-people-at-companies --agent-client auto --open --json
19
- ```
20
-
21
- If that command fails because `ethos` is not installed or not available on
14
+ The Ethos CLI (`ethos`) is required. If `ethos` is not installed or not on
22
15
  `PATH`, install the latest CLI and retry:
23
16
 
24
17
  ```sh
25
18
  npm install -g ethos-cli@latest --prefer-online
26
19
  ```
27
20
 
28
- If it fails because the CLI is not authenticated, run
29
- `ethos auth login --agent-client auto`, then re-run the `flows start` command.
30
- Do not run a separate `ethos auth status` first; `flows start` already requires
31
- auth and surfaces a clear error when login is needed.
21
+ If a CLI command fails because the CLI is not authenticated, run
22
+ `ethos auth login --agent-client auto`, then retry. Do not run a separate
23
+ `ethos auth status` first; the flow and table commands already require auth and
24
+ surface a clear error when login is needed.
32
25
 
33
26
  ## Flow
34
27
 
35
28
  Keep CSV upload in the browser-based Ethos product flow:
36
29
 
37
- 1. Start the flow and open the upload browser in one command (`ethos flows start --open`). Save the `handoff_token` from the response.
38
- 2. Immediately ask the user for ICP, buying signals, person targets, and max contacts while they upload.
39
- 3. Capture the uploaded table id automatically with `ethos flows wait "$HANDOFF_TOKEN" --json`. Do not ask the user to paste the table URL unless `flows wait` cannot recover.
40
- 4. Once the brief is ready, inspect the table, create the `people_sourcing` agent, and create the agent-client-created column with the CLI.
41
- 5. Run the column for the FIRST 3 ROWS ONLY. Tell the user you're running for 3 rows to see if the results are good. If yes, the next step is to run on the whole table. If not, refine the agent based on their feedback so it finds the right people.
30
+ 1. Use the hook-created upload flow first. If the context contains `ETHOS_FIND_PEOPLE_HANDOFF_READY`, that is the injected Ethos handoff for this request. REUSE its `handoff_token` and `upload_url`; do NOT run `ethos flows start`, even if the user also provided a local CLI path. On Codex, immediately open `upload_url` in the in-app Browser. On Claude Code and other shell clients, the hook already opened the OS browser.
31
+ 2. If the hook injected an auth failure, do NOT try `ethos flows start` first. Run `ethos auth login --agent-client auto`, then use the `flows start` fallback for this turn.
32
+ 3. Only if no hook handoff was injected, run the `flows start` fallback and save `handoff_token` and `upload_url`. Add `--open` only on shell clients (Claude Code, Cursor) to open the OS browser; on Codex do NOT pass `--open`.
33
+ 4. Immediately ask the user for ICP, buying signals, person targets, and max contacts while they upload.
34
+ 5. Capture the uploaded table id with `ethos flows wait "$HANDOFF_TOKEN" --json`. Do not ask the user to paste the table URL unless `flows wait` cannot recover.
35
+ 6. Once the brief is ready, inspect the table, create the `people_sourcing` agent, and create the agent-client-created column with the CLI.
36
+ 7. Run the column for the FIRST 3 ROWS ONLY. Tell the user you're running for 3 rows to see if the results are good. If yes, the next step is to run on the whole table. If not, refine the agent based on their feedback so it finds the right people.
42
37
 
43
38
  Do not run `ethos tables import-csv` for this skill unless the user explicitly
44
39
  asks for a CLI-only/non-browser fallback. The browser upload is part of the
@@ -46,33 +41,60 @@ product flow and must not be replaced by CLI import.
46
41
 
47
42
  ## Authenticate
48
43
 
49
- Authentication is handled implicitly by `flows start`; do not run a separate
50
- `ethos auth status` pre-check. Only if `flows start` reports that the CLI is not
51
- authenticated, run:
44
+ Authentication is handled implicitly by the hook or by the fallback
45
+ `flows start`; do not run a separate `ethos auth status` pre-check. Only if a
46
+ flow/table command reports that the CLI is not authenticated, run:
52
47
 
53
48
  ```sh
54
49
  ethos auth login --agent-client auto
55
50
  ```
56
51
 
57
- then re-run the `flows start` command. The browser claim flow handles production
58
- auth. Do not ask for API tokens unless the user explicitly wants a non-browser
59
- setup.
52
+ then retry the failed command. The browser claim flow handles production auth.
53
+ Do not ask for API tokens unless the user explicitly wants a non-browser setup.
60
54
 
61
55
  ## Start Upload Flow
62
56
 
63
- **Reuse a pre-started flow first.** If the conversation already contains an
64
- injected Ethos handoff for example a `UserPromptSubmit` hook reporting that the
65
- upload browser is already opening and providing a `handoff_token` do NOT run
66
- `ethos flows start` again. Reuse that `handoff_token`: skip to the brief and then
67
- `ethos flows wait <handoff_token>`. Only run the command below when no such
68
- handoff has been provided.
57
+ **Use the hook handoff first.** A `UserPromptSubmit` hook may have already
58
+ started the flow and injected an `ETHOS_FIND_PEOPLE_HANDOFF_READY` block with a
59
+ `handoff_token` plus `upload_url`.
69
60
 
70
- Start the browser handoff flow through the CLI abstraction instead of constructing client-specific URLs. Pass `--open` so the CLI opens the upload browser itself:
61
+ - On Codex, the hook cannot open the in-app Browser itself. Open the injected
62
+ `upload_url` in the in-app Browser immediately, then ask the brief.
63
+ - On Claude Code, Cursor, or another shell client, the hook may have already
64
+ opened the OS browser. Reuse the injected `handoff_token`, then ask the brief.
65
+
66
+ If you see `ETHOS_FIND_PEOPLE_HANDOFF_READY`, do NOT claim that no hook handoff
67
+ was injected, and do NOT run `ethos flows start` again. Save the injected
68
+ `handoff_token`, `upload_url`, `agent_client`, `org_id`, and `org_name`; later
69
+ run `ethos flows wait <handoff_token>`. Do not mention hooks, injected context,
70
+ handoff tokens, or hook handoffs in user-facing messages.
71
+
72
+ If the user provides a local CLI path and `ETHOS_FIND_PEOPLE_HANDOFF_READY` is
73
+ also present, the hook has already prepared the local handoff. Use the injected
74
+ URL; do not run the local CLI path until `flows wait`.
75
+
76
+ If the hook injected an auth failure, do NOT run `ethos flows start` before
77
+ logging in. It will fail with the same missing-token error. Run:
71
78
 
72
79
  ```sh
73
- ethos flows start find-people-at-companies --agent-client auto --open --json
80
+ ethos auth login --agent-client auto
74
81
  ```
75
82
 
83
+ then use the fallback `flows start` command below for this turn. The hook will
84
+ prepare the handoff on future turns once the CLI auth is valid.
85
+
86
+ Only when no hook handoff was injected, start the handoff through the CLI
87
+ fallback instead of constructing client-specific URLs:
88
+
89
+ ```sh
90
+ ethos flows start find-people-at-companies --agent-client auto --json
91
+ ```
92
+
93
+ Add `--open` only on shell clients (Claude Code, Cursor) so the CLI opens the OS
94
+ browser. On Codex, do NOT pass `--open` — open `upload_url` in the in-app Browser
95
+ (see Open Browser Upload); use `--open` there only as a fallback if the in-app
96
+ Browser is not working.
97
+
76
98
  Save these fields from `response`:
77
99
 
78
100
  - `handoff_token` (needed for `ethos flows wait`)
@@ -83,8 +105,7 @@ Save these fields from `response`:
83
105
  - `next_prompt`
84
106
 
85
107
  The `upload_url` is a handoff URL that verifies the browser session and
86
- workspace before redirecting to the CSV upload modal. With `--open`, the CLI
87
- already launched it in the default browser.
108
+ workspace before redirecting to the CSV upload modal.
88
109
 
89
110
  If the detected client is wrong, rerun the same command with an explicit client,
90
111
  such as `--agent-client codex` or `--agent-client claude-desktop`.
@@ -94,19 +115,20 @@ session.
94
115
 
95
116
  ## Open Browser Upload
96
117
 
97
- With `--open`, the CLI already launched `response.upload_url` in the default
98
- browser and the CSV upload modal opens directly. You usually do not open
99
- anything yourself. Handle the exceptions per client:
100
-
101
- - In Codex, the in-app Browser is the right surface. If `--open` did not surface
102
- the page there, open `response.upload_url` in the Codex Browser. Do not click
103
- `Import CSV` or take other browser actions after navigating unless the user
104
- asks for help.
105
- - In Claude Code, Cursor, or another shell-based client, `--open` uses the OS
106
- opener. If it failed (for example, no desktop session), run `open "$UPLOAD_URL"`
107
- yourself, and only fall back to MCP browser tools, Chrome connectors, or in-app
108
- browser plugins if that also fails. If every option fails, show the URL and ask
109
- the user to open it.
118
+ Open the upload page in the browser surface for this client. Use `upload_url`
119
+ from the reused hook handoff or from the fallback `flows start` response.
120
+
121
+ - **Codex**: open `upload_url` in the **in-app Browser** — the default and only
122
+ surface you open. Do NOT also OS-open it. Only if the user says the in-app
123
+ Browser is not working, fall back to OS-opening it (`open "$UPLOAD_URL"`). Do
124
+ not click `Import CSV` or take other browser actions after navigating unless
125
+ the user asks for help.
126
+ - **Claude Code, Cursor, or another shell-based client**: the hook or fallback
127
+ `--open` already opened the OS browser. If it failed (for example, no desktop
128
+ session), run `open "$UPLOAD_URL"` yourself, and only fall back to MCP browser
129
+ tools, Chrome connectors, in-app browser plugins, or other browser automation
130
+ connectors if that also fails. If every option fails, show the URL and ask the
131
+ user to open it.
110
132
 
111
133
  Right after the browser opens, immediately ask `response.next_prompt`. If the
112
134
  flow response is not available for some reason, ask:
@@ -131,7 +153,7 @@ returns `response.table_id` and `response.org_id`. Save both.
131
153
  says they have uploaded — so the table is usually already there and the
132
154
  command returns right away.
133
155
  - If it times out because the user has not uploaded yet, just re-run the same
134
- command. The upload window is about 10 minutes from `flows start`.
156
+ command. The upload window is about 10 minutes from the handoff creation.
135
157
  - Only fall back if `flows wait` reports the flow expired or keeps timing out:
136
158
  if you can inspect the browser URL, the completed shape is
137
159
  `/tables/<TABLE_ID>?agent_flow=find-people-at-companies&uploaded=1&...`;
@@ -298,6 +320,10 @@ user asks for them or you are actively debugging.
298
320
  - While you execute the flow, keep communication simple and approachable. Avoid
299
321
  explaining UI behavior that should happen automatically when everything is
300
322
  working. Do not mention internal Ethos concepts unless explicitly necessary.
323
+ - Do not disclose whether upload context came from hooks, injected context, or
324
+ `ethos flows start`. Treat that as implementation detail. When opening the
325
+ upload page, say something general like: "I'm opening a window for you to
326
+ upload a company list."
301
327
 
302
328
  For example, instead of
303
329