@notis_ai/cli 0.2.0-beta.196.1 → 0.2.0-beta.197.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.
package/README.md CHANGED
@@ -810,25 +810,25 @@ For plain HTML, use the installed HTML Space and its linked saving Skill. Its ge
810
810
 
811
811
  ## Hand-over
812
812
 
813
- Give the branch you are on to a Notis agent, which continues the work in a git worktree on the Notis cloud computer. `--route` picks the agent: the hosted Notis agent, or the user's own Codex/Claude Code in the cloud sandbox or on their Mac. `--branch-mode same` makes the agent commit onto your branch; the default cuts a new branch from it.
813
+ Give the branch you are on to a Notis agent, which continues the work in a git worktree on the Notis cloud computer. By default Notis picks the agent (`--route auto`); `--route notis`, `--route codex` or `--route claude` names one instead. `--branch-mode same` makes the agent commit onto your branch; the default cuts a new branch from it.
814
814
 
815
815
  ### `npx --package @notis_ai/cli@latest -- notis handover start <task>`
816
816
 
817
817
  Hand the current branch to a Notis agent and keep working.
818
818
 
819
- When to use: Use this when you want Notis to continue work on the branch you are on -- long refactors, test fixing, or anything that should keep running after you close the laptop. Pick the agent with --route.
819
+ When to use: Use this when you want Notis to continue work on the branch you are on -- long refactors, test fixing, or anything that should keep running after you close the laptop. Notis picks the agent unless you name one with --route.
820
820
 
821
821
  Options:
822
822
  - `--branch-mode <mode>` — same = the agent commits onto your branch. new = the agent cuts a new branch from it (default).
823
- - `--route <target>` — Which agent runs it: notis (hosted, default), codex_cloud, claude_cloud, codex_local, claude_local, or auto.
823
+ - `--route <target>` — Which agent runs it: auto (default, Notis picks the agent), notis, codex or claude.
824
824
  - `--repo <slug>` — Configured repository slug on the cloud computer, when you know it.
825
825
  - `--no-wip` — Refuse on a dirty tree instead of committing the changes first.
826
826
 
827
827
  Examples:
828
828
  - `npx --package @notis_ai/cli@latest -- notis handover start "fix the failing auth tests"`
829
- - `npx --package @notis_ai/cli@latest -- notis handover start "finish the migration" --branch-mode same --route codex_cloud`
830
- - `npx --package @notis_ai/cli@latest -- notis handover start "add integration tests" --route claude_cloud`
831
- - `npx --package @notis_ai/cli@latest -- notis handover start "review and clean up this branch" --route claude_local`
829
+ - `npx --package @notis_ai/cli@latest -- notis handover start "finish the migration" --branch-mode same --route codex`
830
+ - `npx --package @notis_ai/cli@latest -- notis handover start "add integration tests" --route claude`
831
+ - `npx --package @notis_ai/cli@latest -- notis handover start "review and clean up this branch" --route notis`
832
832
 
833
833
  ### `npx --package @notis_ai/cli@latest -- notis handover status`
834
834
 
@@ -1,5 +1,4 @@
1
1
  [
2
- ".well-known",
3
2
  "api",
4
3
  "apps",
5
4
  "auth",
@@ -41494,10 +41494,24 @@ function pushBranch(repository, branch) {
41494
41494
  // src/command-specs/handover.js
41495
41495
  var HAND_OVER_TOOL = "LOCAL_NOTIS_HAND_OVER";
41496
41496
  var SEARCH_THREADS_TOOL = "LOCAL_NOTIS_SEARCH_CODING_AGENT_THREADS";
41497
- var ROUTES = ["notis", "auto", "codex_cloud", "claude_cloud", "codex_local", "claude_local"];
41497
+ var ROUTES = ["auto", "notis", "codex", "claude"];
41498
+ var LEGACY_ROUTES = /* @__PURE__ */ new Map([
41499
+ ["codex_cloud", "codex"],
41500
+ ["codex_local", "codex"],
41501
+ ["claude_cloud", "claude"],
41502
+ ["claude_local", "claude"]
41503
+ ]);
41504
+ var ROUTE_LABELS = { notis: "Notis", codex: "Codex", claude: "Claude" };
41498
41505
  var BRANCH_MODES = ["new", "same"];
41499
41506
  var HANDOVER_TIMEOUT_MS = 12e4;
41500
41507
  var HANDOVER_UNAVAILABLE_CODES = /* @__PURE__ */ new Set(["usage_error", "forbidden"]);
41508
+ function normalizeRoute(route) {
41509
+ return LEGACY_ROUTES.get(route) || route;
41510
+ }
41511
+ function describeRoute(route) {
41512
+ if (route === "auto") return "Notis, which picks the agent";
41513
+ return ROUTE_LABELS[route] || route;
41514
+ }
41501
41515
  function shellSingleQuote(value) {
41502
41516
  return `'${String(value).replace(/'/g, "'\\''")}'`;
41503
41517
  }
@@ -41548,8 +41562,8 @@ async function handoverStartHandler(ctx) {
41548
41562
  if (!BRANCH_MODES.includes(branchMode)) {
41549
41563
  throw usageError(`--branch-mode must be one of: ${BRANCH_MODES.join(", ")}`, { branchMode });
41550
41564
  }
41551
- const route = ctx.options.route || "notis";
41552
- if (!ROUTES.includes(route)) {
41565
+ const route = ctx.options.route || "auto";
41566
+ if (!ROUTES.includes(route) && !LEGACY_ROUTES.has(route)) {
41553
41567
  throw usageError(`--route must be one of: ${ROUTES.join(", ")}`, { route });
41554
41568
  }
41555
41569
  const repository = inspectRepository(ctx.options.cwd || process.cwd());
@@ -41618,7 +41632,10 @@ async function handoverStartHandler(ctx) {
41618
41632
  branchMode,
41619
41633
  repoSlug: ctx.options.repo || null
41620
41634
  });
41621
- ctx.output.emitProgress({ phase: "handover", message: `Handing over to ${route}` });
41635
+ ctx.output.emitProgress({
41636
+ phase: "handover",
41637
+ message: `Handing over to ${describeRoute(normalizeRoute(route))}`
41638
+ });
41622
41639
  const result = await runToolCommand({
41623
41640
  runtime: {
41624
41641
  ...ctx.runtime,
@@ -41646,14 +41663,16 @@ async function handoverStartHandler(ctx) {
41646
41663
  branch_mode: branchMode,
41647
41664
  head: repository.head,
41648
41665
  wip_commit: wipCommit,
41649
- agent_routing: payload.agent_routing || route,
41666
+ // The server answers with auto, notis, codex or claude. An older server
41667
+ // may echo a legacy value back, so map it here too.
41668
+ agent_routing: normalizeRoute(payload.agent_routing || route),
41650
41669
  interaction_id: payload.interaction_id || null,
41651
41670
  thread_id: payload.thread_id || null
41652
41671
  };
41653
41672
  return ctx.output.emitSuccess({
41654
41673
  command: "handover start",
41655
41674
  data,
41656
- humanSummary: `Handed ${data.branch} over to ${data.agent_routing} (${branchMode === "same" ? "continuing the branch" : "new branch from it"}).`,
41675
+ humanSummary: `Handed ${data.branch} over to ${describeRoute(data.agent_routing)} (${branchMode === "same" ? "continuing the branch" : "new branch from it"}).`,
41657
41676
  hints: [
41658
41677
  { command: "notis handover status", reason: "See what the agent is doing" },
41659
41678
  {
@@ -41693,7 +41712,7 @@ var handoverCommandSpecs = [
41693
41712
  {
41694
41713
  command_path: ["handover", "start"],
41695
41714
  summary: "Hand the current branch to a Notis agent and keep working.",
41696
- when_to_use: "Use this when you want Notis to continue work on the branch you are on -- long refactors, test fixing, or anything that should keep running after you close the laptop. Pick the agent with --route.",
41715
+ when_to_use: "Use this when you want Notis to continue work on the branch you are on -- long refactors, test fixing, or anything that should keep running after you close the laptop. Notis picks the agent unless you name one with --route.",
41697
41716
  args_schema: {
41698
41717
  arguments: [{ token: "<task>", description: "What the agent should do, in plain language." }],
41699
41718
  options: [
@@ -41704,7 +41723,7 @@ var handoverCommandSpecs = [
41704
41723
  },
41705
41724
  {
41706
41725
  flags: "--route <target>",
41707
- description: "Which agent runs it: notis (hosted, default), codex_cloud, claude_cloud, codex_local, claude_local, or auto."
41726
+ description: "Which agent runs it: auto (default, Notis picks the agent), notis, codex or claude."
41708
41727
  },
41709
41728
  { flags: "--repo <slug>", description: "Configured repository slug on the cloud computer, when you know it." },
41710
41729
  {
@@ -41715,11 +41734,11 @@ var handoverCommandSpecs = [
41715
41734
  },
41716
41735
  examples: [
41717
41736
  'notis handover start "fix the failing auth tests"',
41718
- 'notis handover start "finish the migration" --branch-mode same --route codex_cloud',
41719
- 'notis handover start "add integration tests" --route claude_cloud',
41720
- 'notis handover start "review and clean up this branch" --route claude_local'
41737
+ 'notis handover start "finish the migration" --branch-mode same --route codex',
41738
+ 'notis handover start "add integration tests" --route claude',
41739
+ 'notis handover start "review and clean up this branch" --route notis'
41721
41740
  ],
41722
- output_schema: "Returns the branch, the resolved routing target, and the interaction/thread ids of the started run.",
41741
+ output_schema: "Returns the branch, the agent routing (auto when Notis picks, otherwise notis, codex or claude), and the interaction/thread ids of the started run.",
41723
41742
  mutates: true,
41724
41743
  idempotent: false,
41725
41744
  require_auth: true,
@@ -42518,7 +42537,6 @@ init_errors();
42518
42537
 
42519
42538
  // config/portal-route-roots.json
42520
42539
  var portal_route_roots_default = [
42521
- ".well-known",
42522
42540
  "api",
42523
42541
  "apps",
42524
42542
  "auth",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notis_ai/cli",
3
- "version": "0.2.0-beta.196.1",
3
+ "version": "0.2.0-beta.197.1",
4
4
  "description": "Agent-first Notis CLI for apps and generic tool execution",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@ Relevant Notis long-term memory may be injected into a turn inside `<notis_relev
15
15
  4. Execute: `notis tools exec <TOOL> --arguments '<json>'`; batch independent calls with `notis tools exec-parallel '<json-array>'`.
16
16
  5. If an integration is not connected, `notis tools link <toolkit>` prints a connection URL to give the user.
17
17
 
18
- Tool name shapes: `LOCAL_NOTIS_*` (native Notis), `LOCAL_NOTIS_DATABASE_*` (databases and notes), `LOCAL_MCP_*` (the user's connected MCP servers), and integration tools such as `GMAIL_*`, `NOTION_*`, and `GOOGLECALENDAR_*`.
18
+ Tool name shapes: `LOCAL_NOTIS_*` (native Notis), `LOCAL_NOTIS_DATABASE_*` (databases and notes), `CUSTOM_*` (the user's remote MCP servers), `LOCAL_MCP_*` (MCP servers on the user's computer), and integration tools such as `GMAIL_*`, `NOTION_*`, and `GOOGLECALENDAR_*`.
19
19
 
20
20
  ### Main features
21
21
 
@@ -2,9 +2,10 @@
2
2
  * `notis handover` -- give the branch you are on to a Notis agent.
3
3
  *
4
4
  * The coding agent already sitting in the user's terminal is the caller here.
5
- * It pushes the branch, then hands the task to whichever agent the user picked:
6
- * the hosted Notis agent, or their own Codex/Claude Code running in the Notis
7
- * cloud sandbox or on their Mac.
5
+ * It pushes the branch, then hands the task to Notis. By default (`auto`) Notis
6
+ * picks the agent itself; `--route notis|codex|claude` names one instead, and
7
+ * the server turns that into a plain sentence in the task ("Use Codex for this
8
+ * task."), so the user's choice wins like it does in a chat message.
8
9
  *
9
10
  * The CLI deliberately does not create the cloud workspace itself. Doing so
10
11
  * would hard-code the Conductor app's database schema and script paths into the
@@ -28,7 +29,18 @@ import { fetchToolSchema, nextIdempotencyKey, runToolCommand } from './helpers.j
28
29
  const HAND_OVER_TOOL = 'LOCAL_NOTIS_HAND_OVER';
29
30
  const SEARCH_THREADS_TOOL = 'LOCAL_NOTIS_SEARCH_CODING_AGENT_THREADS';
30
31
 
31
- const ROUTES = ['notis', 'auto', 'codex_cloud', 'claude_cloud', 'codex_local', 'claude_local'];
32
+ // What --route accepts and advertises. `auto` lets Notis pick the agent.
33
+ const ROUTES = ['auto', 'notis', 'codex', 'claude'];
34
+ // Values from before Notis picked the agent itself. Still accepted, so scripts
35
+ // and agents that learned them keep working, but never shown in help, examples
36
+ // or errors. They are sent as typed; the server maps them to codex or claude.
37
+ const LEGACY_ROUTES = new Map([
38
+ ['codex_cloud', 'codex'],
39
+ ['codex_local', 'codex'],
40
+ ['claude_cloud', 'claude'],
41
+ ['claude_local', 'claude'],
42
+ ]);
43
+ const ROUTE_LABELS = { notis: 'Notis', codex: 'Codex', claude: 'Claude' };
32
44
  const BRANCH_MODES = ['new', 'same'];
33
45
 
34
46
  // A cloud coding agent takes minutes to start, and the hand-over POST itself
@@ -44,6 +56,17 @@ const HANDOVER_TIMEOUT_MS = 120_000;
44
56
  */
45
57
  const HANDOVER_UNAVAILABLE_CODES = new Set(['usage_error', 'forbidden']);
46
58
 
59
+ /** A legacy route as the agent it now means; anything else unchanged. */
60
+ function normalizeRoute(route) {
61
+ return LEGACY_ROUTES.get(route) || route;
62
+ }
63
+
64
+ /** Who the hand-over went to, in words, for progress lines and the summary. */
65
+ function describeRoute(route) {
66
+ if (route === 'auto') return 'Notis, which picks the agent';
67
+ return ROUTE_LABELS[route] || route;
68
+ }
69
+
47
70
  /**
48
71
  * Quote a value for the command line the receiving agent is told to run.
49
72
  *
@@ -121,8 +144,8 @@ async function handoverStartHandler(ctx) {
121
144
  throw usageError(`--branch-mode must be one of: ${BRANCH_MODES.join(', ')}`, { branchMode });
122
145
  }
123
146
 
124
- const route = ctx.options.route || 'notis';
125
- if (!ROUTES.includes(route)) {
147
+ const route = ctx.options.route || 'auto';
148
+ if (!ROUTES.includes(route) && !LEGACY_ROUTES.has(route)) {
126
149
  throw usageError(`--route must be one of: ${ROUTES.join(', ')}`, { route });
127
150
  }
128
151
 
@@ -223,7 +246,10 @@ async function handoverStartHandler(ctx) {
223
246
  repoSlug: ctx.options.repo || null,
224
247
  });
225
248
 
226
- ctx.output.emitProgress({ phase: 'handover', message: `Handing over to ${route}` });
249
+ ctx.output.emitProgress({
250
+ phase: 'handover',
251
+ message: `Handing over to ${describeRoute(normalizeRoute(route))}`,
252
+ });
227
253
  const result = await runToolCommand({
228
254
  runtime: {
229
255
  ...ctx.runtime,
@@ -255,7 +281,9 @@ async function handoverStartHandler(ctx) {
255
281
  branch_mode: branchMode,
256
282
  head: repository.head,
257
283
  wip_commit: wipCommit,
258
- agent_routing: payload.agent_routing || route,
284
+ // The server answers with auto, notis, codex or claude. An older server
285
+ // may echo a legacy value back, so map it here too.
286
+ agent_routing: normalizeRoute(payload.agent_routing || route),
259
287
  interaction_id: payload.interaction_id || null,
260
288
  thread_id: payload.thread_id || null,
261
289
  };
@@ -264,7 +292,7 @@ async function handoverStartHandler(ctx) {
264
292
  command: 'handover start',
265
293
  data,
266
294
  humanSummary:
267
- `Handed ${data.branch} over to ${data.agent_routing} ` +
295
+ `Handed ${data.branch} over to ${describeRoute(data.agent_routing)} ` +
268
296
  `(${branchMode === 'same' ? 'continuing the branch' : 'new branch from it'}).`,
269
297
  hints: [
270
298
  { command: 'notis handover status', reason: 'See what the agent is doing' },
@@ -313,8 +341,8 @@ export const handoverCommandSpecs = [
313
341
  summary: 'Hand the current branch to a Notis agent and keep working.',
314
342
  when_to_use:
315
343
  'Use this when you want Notis to continue work on the branch you are on -- long refactors, ' +
316
- 'test fixing, or anything that should keep running after you close the laptop. Pick the agent ' +
317
- 'with --route.',
344
+ 'test fixing, or anything that should keep running after you close the laptop. Notis picks ' +
345
+ 'the agent unless you name one with --route.',
318
346
  args_schema: {
319
347
  arguments: [{ token: '<task>', description: 'What the agent should do, in plain language.' }],
320
348
  options: [
@@ -327,7 +355,7 @@ export const handoverCommandSpecs = [
327
355
  {
328
356
  flags: '--route <target>',
329
357
  description:
330
- 'Which agent runs it: notis (hosted, default), codex_cloud, claude_cloud, codex_local, claude_local, or auto.',
358
+ 'Which agent runs it: auto (default, Notis picks the agent), notis, codex or claude.',
331
359
  },
332
360
  { flags: '--repo <slug>', description: 'Configured repository slug on the cloud computer, when you know it.' },
333
361
  {
@@ -338,12 +366,13 @@ export const handoverCommandSpecs = [
338
366
  },
339
367
  examples: [
340
368
  'notis handover start "fix the failing auth tests"',
341
- 'notis handover start "finish the migration" --branch-mode same --route codex_cloud',
342
- 'notis handover start "add integration tests" --route claude_cloud',
343
- 'notis handover start "review and clean up this branch" --route claude_local',
369
+ 'notis handover start "finish the migration" --branch-mode same --route codex',
370
+ 'notis handover start "add integration tests" --route claude',
371
+ 'notis handover start "review and clean up this branch" --route notis',
344
372
  ],
345
373
  output_schema:
346
- 'Returns the branch, the resolved routing target, and the interaction/thread ids of the started run.',
374
+ 'Returns the branch, the agent routing (auto when Notis picks, otherwise notis, codex or claude), ' +
375
+ 'and the interaction/thread ids of the started run.',
347
376
  mutates: true,
348
377
  idempotent: false,
349
378
  require_auth: true,