stitchkit 0.124.4 → 0.124.5

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/CHANGELOG.md CHANGED
@@ -15,6 +15,15 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.124.5] - 2026-11-19
19
+
20
+ ### Fixed
21
+
22
+ - `stitchkit/cli` honours `--quiet` for the default sole-profile notice, including
23
+ when profile selection happens before command discovery. Profile errors still
24
+ report their cause and exit code.
25
+ **Affects:** `stitchkit/cli` behaviour
26
+
18
27
  ## [0.124.4] - 2026-11-18
19
28
 
20
29
  ### Fixed
@@ -12,12 +12,13 @@ import {
12
12
  cliInvocationResult2,
13
13
  createCliInvoker2,
14
14
  routeCliArgv2,
15
+ writeCliNotice,
15
16
  parseCliArgs2,
16
17
  extractCliGlobalOptions2,
17
18
  renderCliView2,
18
19
  pollUntilDone2,
19
20
  createCli2
20
- } from "../index-a3ekss9t.js";
21
+ } from "../index-p1mwqkgh.js";
21
22
  import"../index-ndjzbt2v.js";
22
23
  import"../index-5dmk54h9.js";
23
24
  import"../index-rk7m4j7r.js";
@@ -252,7 +253,7 @@ function assertProfileName(name) {
252
253
  }
253
254
  }
254
255
  function createCliProfileStore(config) {
255
- const announce = config.announce ?? ((line) => process.stderr.write(`${line}
256
+ const announce = config.announce ?? ((line) => writeCliNotice(`${line}
256
257
  `));
257
258
  const pathFor = (name) => {
258
259
  assertProfileName(name);
@@ -11,7 +11,7 @@ import {
11
11
  } from "../../index-2ds89z96.js";
12
12
  import {
13
13
  createCli2
14
- } from "../../index-a3ekss9t.js";
14
+ } from "../../index-p1mwqkgh.js";
15
15
  import"../../index-332d0m9g.js";
16
16
  import"../../index-sqc6ezrb.js";
17
17
  import"../../index-gy9x38a2.js";
@@ -943,6 +943,194 @@ function createCliIo(config) {
943
943
  return { stdout, stdoutWhileOpen, stderr, exit, readStdin };
944
944
  }
945
945
 
946
+ // src/tools/cli/notices.ts
947
+ import { AsyncLocalStorage } from "node:async_hooks";
948
+
949
+ // src/tools/cli/args-route.ts
950
+ function isOptionToken(token) {
951
+ return token.startsWith("--") || /^-[A-Za-z](?:=|$)/.test(token);
952
+ }
953
+ function looksLikeOption(token) {
954
+ return token.startsWith("--") || /^-[A-Za-z]/.test(token);
955
+ }
956
+ var BOOL_OPTIONS = new Set([
957
+ "json",
958
+ "wait",
959
+ "quiet",
960
+ "dry-run",
961
+ "help",
962
+ "schema",
963
+ "ascending"
964
+ ]);
965
+ var VIEW_OPTIONS = new Set(["count-by", "sum", "by", "top", "table", "sort"]);
966
+ var VALUE_OPTIONS = new Set(["wait-timeout", "output-dir", ...VIEW_OPTIONS]);
967
+ var RESERVED_CLI_OPTIONS = new Set([...BOOL_OPTIONS, ...VALUE_OPTIONS]);
968
+ function classifyLongOptionToken(token) {
969
+ if (!token.startsWith("--") || token === "--")
970
+ return;
971
+ const equals = token.indexOf("=");
972
+ const name = equals >= 0 ? token.slice(2, equals) : token.slice(2);
973
+ return {
974
+ name,
975
+ value: equals >= 0 ? token.slice(equals + 1) : undefined,
976
+ inline: equals >= 0,
977
+ globalKind: BOOL_OPTIONS.has(name) ? "boolean" : VALUE_OPTIONS.has(name) ? "value" : undefined
978
+ };
979
+ }
980
+ function readCliBooleanFlag(argv, name) {
981
+ for (const [index, token] of argv.entries()) {
982
+ if (token === "--")
983
+ break;
984
+ if (token === undefined)
985
+ continue;
986
+ const option = classifyLongOptionToken(token);
987
+ if (option?.name !== name || option.globalKind !== "boolean")
988
+ continue;
989
+ return option.value === undefined ? separateBoolValue(argv[index + 1]) ?? true : isReservedBoolWord(option.value) && parseReservedBool(name, option.value);
990
+ }
991
+ return false;
992
+ }
993
+ var HELP_TOKENS = new Set(["--help", "-h", "help"]);
994
+ function helpFilterFrom(token, rest) {
995
+ if (token?.startsWith("--help=")) {
996
+ const value = token.slice("--help=".length).trim();
997
+ if (value.length === 0 || isReservedBoolWord(value))
998
+ return;
999
+ return value;
1000
+ }
1001
+ if (token === undefined || !HELP_TOKENS.has(token))
1002
+ return;
1003
+ const next = rest[0];
1004
+ return next !== undefined && !next.startsWith("-") ? next : undefined;
1005
+ }
1006
+ function routeCliArgv2(argv, defaultCommand) {
1007
+ if (defaultCommand === undefined) {
1008
+ const [command, ...commandArgv] = argv;
1009
+ const helpFilter = helpFilterFrom(command, commandArgv);
1010
+ return {
1011
+ command,
1012
+ commandArgv,
1013
+ topLevelHelp: false,
1014
+ version: false,
1015
+ ...helpFilter !== undefined && { helpFilter }
1016
+ };
1017
+ }
1018
+ const globals = [];
1019
+ let index = 0;
1020
+ while (index < argv.length) {
1021
+ const token = argv[index];
1022
+ if (token === undefined)
1023
+ break;
1024
+ if (token === "--") {
1025
+ return {
1026
+ commandArgv: [],
1027
+ topLevelHelp: false,
1028
+ version: false,
1029
+ error: 'A command is required before "--"'
1030
+ };
1031
+ }
1032
+ const inlineHelpFilter = token.startsWith("--help=") && !isReservedBoolWord(token.slice("--help=".length));
1033
+ if (token === "--help" || token === "-h" || inlineHelpFilter) {
1034
+ const helpFilter = helpFilterFrom(token, argv.slice(index + 1));
1035
+ return {
1036
+ commandArgv: [],
1037
+ topLevelHelp: true,
1038
+ version: false,
1039
+ ...helpFilter !== undefined && { helpFilter }
1040
+ };
1041
+ }
1042
+ if (token === "--version" || token === "version") {
1043
+ return { commandArgv: [], topLevelHelp: false, version: true };
1044
+ }
1045
+ if (!token.startsWith("-") || token === "-") {
1046
+ return {
1047
+ command: token,
1048
+ commandArgv: [...globals, ...argv.slice(index + 1)],
1049
+ topLevelHelp: false,
1050
+ version: false
1051
+ };
1052
+ }
1053
+ if (!token.startsWith("--")) {
1054
+ return {
1055
+ command: defaultCommand,
1056
+ commandArgv: [...globals, ...argv.slice(index)],
1057
+ topLevelHelp: false,
1058
+ version: false
1059
+ };
1060
+ }
1061
+ const option = classifyLongOptionToken(token);
1062
+ if (!option) {
1063
+ return {
1064
+ command: defaultCommand,
1065
+ commandArgv: [...globals, ...argv.slice(index)],
1066
+ topLevelHelp: false,
1067
+ version: false
1068
+ };
1069
+ }
1070
+ if (option.globalKind === "boolean") {
1071
+ globals.push(token);
1072
+ index += 1;
1073
+ const next = argv[index];
1074
+ if (option.value === undefined && next !== undefined && separateBoolValue(next) !== undefined) {
1075
+ globals.push(next);
1076
+ index += 1;
1077
+ }
1078
+ continue;
1079
+ }
1080
+ if (option.globalKind === "value") {
1081
+ globals.push(token);
1082
+ if (!option.inline) {
1083
+ const value = argv[index + 1];
1084
+ if (value === "--help" || value === "-h") {
1085
+ const helpFilter = helpFilterFrom(value, argv.slice(index + 2));
1086
+ return {
1087
+ commandArgv: [],
1088
+ topLevelHelp: true,
1089
+ version: false,
1090
+ ...helpFilter !== undefined && { helpFilter }
1091
+ };
1092
+ }
1093
+ if (value === "--version" || value === "version") {
1094
+ return { commandArgv: [], topLevelHelp: false, version: true };
1095
+ }
1096
+ if (value !== undefined)
1097
+ globals.push(value);
1098
+ index += value === undefined ? 1 : 2;
1099
+ } else {
1100
+ index += 1;
1101
+ }
1102
+ continue;
1103
+ }
1104
+ return {
1105
+ command: defaultCommand,
1106
+ commandArgv: [...globals, ...argv.slice(index)],
1107
+ topLevelHelp: false,
1108
+ version: false
1109
+ };
1110
+ }
1111
+ return {
1112
+ command: defaultCommand,
1113
+ commandArgv: globals,
1114
+ topLevelHelp: false,
1115
+ version: false
1116
+ };
1117
+ }
1118
+
1119
+ // src/tools/cli/notices.ts
1120
+ var invocationNotices = new AsyncLocalStorage;
1121
+ function withCliNotices(quiet, stderr, run) {
1122
+ return invocationNotices.run({ quiet, stderr }, run);
1123
+ }
1124
+ function writeCliNotice(text) {
1125
+ const invocation = invocationNotices.getStore();
1126
+ if (invocation !== undefined) {
1127
+ if (!invocation.quiet)
1128
+ invocation.stderr(text);
1129
+ } else if (!readCliBooleanFlag(process.argv.slice(2), "quiet")) {
1130
+ process.stderr.write(text);
1131
+ }
1132
+ }
1133
+
946
1134
  // src/tools/cli/download.ts
947
1135
  import { createHash } from "node:crypto";
948
1136
  import { basename as basename2, resolve } from "node:path";
@@ -1350,163 +1538,6 @@ function renderCommandHelp(name, command, descriptor, applicationOptions = []) {
1350
1538
  `;
1351
1539
  }
1352
1540
 
1353
- // src/tools/cli/args-route.ts
1354
- function isOptionToken(token) {
1355
- return token.startsWith("--") || /^-[A-Za-z](?:=|$)/.test(token);
1356
- }
1357
- function looksLikeOption(token) {
1358
- return token.startsWith("--") || /^-[A-Za-z]/.test(token);
1359
- }
1360
- var BOOL_OPTIONS = new Set([
1361
- "json",
1362
- "wait",
1363
- "quiet",
1364
- "dry-run",
1365
- "help",
1366
- "schema",
1367
- "ascending"
1368
- ]);
1369
- var VIEW_OPTIONS = new Set(["count-by", "sum", "by", "top", "table", "sort"]);
1370
- var VALUE_OPTIONS = new Set(["wait-timeout", "output-dir", ...VIEW_OPTIONS]);
1371
- var RESERVED_CLI_OPTIONS = new Set([...BOOL_OPTIONS, ...VALUE_OPTIONS]);
1372
- function classifyLongOptionToken(token) {
1373
- if (!token.startsWith("--") || token === "--")
1374
- return;
1375
- const equals = token.indexOf("=");
1376
- const name = equals >= 0 ? token.slice(2, equals) : token.slice(2);
1377
- return {
1378
- name,
1379
- value: equals >= 0 ? token.slice(equals + 1) : undefined,
1380
- inline: equals >= 0,
1381
- globalKind: BOOL_OPTIONS.has(name) ? "boolean" : VALUE_OPTIONS.has(name) ? "value" : undefined
1382
- };
1383
- }
1384
- var HELP_TOKENS = new Set(["--help", "-h", "help"]);
1385
- function helpFilterFrom(token, rest) {
1386
- if (token?.startsWith("--help=")) {
1387
- const value = token.slice("--help=".length).trim();
1388
- if (value.length === 0 || isReservedBoolWord(value))
1389
- return;
1390
- return value;
1391
- }
1392
- if (token === undefined || !HELP_TOKENS.has(token))
1393
- return;
1394
- const next = rest[0];
1395
- return next !== undefined && !next.startsWith("-") ? next : undefined;
1396
- }
1397
- function routeCliArgv2(argv, defaultCommand) {
1398
- if (defaultCommand === undefined) {
1399
- const [command, ...commandArgv] = argv;
1400
- const helpFilter = helpFilterFrom(command, commandArgv);
1401
- return {
1402
- command,
1403
- commandArgv,
1404
- topLevelHelp: false,
1405
- version: false,
1406
- ...helpFilter !== undefined && { helpFilter }
1407
- };
1408
- }
1409
- const globals = [];
1410
- let index = 0;
1411
- while (index < argv.length) {
1412
- const token = argv[index];
1413
- if (token === undefined)
1414
- break;
1415
- if (token === "--") {
1416
- return {
1417
- commandArgv: [],
1418
- topLevelHelp: false,
1419
- version: false,
1420
- error: 'A command is required before "--"'
1421
- };
1422
- }
1423
- const inlineHelpFilter = token.startsWith("--help=") && !isReservedBoolWord(token.slice("--help=".length));
1424
- if (token === "--help" || token === "-h" || inlineHelpFilter) {
1425
- const helpFilter = helpFilterFrom(token, argv.slice(index + 1));
1426
- return {
1427
- commandArgv: [],
1428
- topLevelHelp: true,
1429
- version: false,
1430
- ...helpFilter !== undefined && { helpFilter }
1431
- };
1432
- }
1433
- if (token === "--version" || token === "version") {
1434
- return { commandArgv: [], topLevelHelp: false, version: true };
1435
- }
1436
- if (!token.startsWith("-") || token === "-") {
1437
- return {
1438
- command: token,
1439
- commandArgv: [...globals, ...argv.slice(index + 1)],
1440
- topLevelHelp: false,
1441
- version: false
1442
- };
1443
- }
1444
- if (!token.startsWith("--")) {
1445
- return {
1446
- command: defaultCommand,
1447
- commandArgv: [...globals, ...argv.slice(index)],
1448
- topLevelHelp: false,
1449
- version: false
1450
- };
1451
- }
1452
- const option = classifyLongOptionToken(token);
1453
- if (!option) {
1454
- return {
1455
- command: defaultCommand,
1456
- commandArgv: [...globals, ...argv.slice(index)],
1457
- topLevelHelp: false,
1458
- version: false
1459
- };
1460
- }
1461
- if (option.globalKind === "boolean") {
1462
- globals.push(token);
1463
- index += 1;
1464
- const next = argv[index];
1465
- if (option.value === undefined && next !== undefined && separateBoolValue(next) !== undefined) {
1466
- globals.push(next);
1467
- index += 1;
1468
- }
1469
- continue;
1470
- }
1471
- if (option.globalKind === "value") {
1472
- globals.push(token);
1473
- if (!option.inline) {
1474
- const value = argv[index + 1];
1475
- if (value === "--help" || value === "-h") {
1476
- const helpFilter = helpFilterFrom(value, argv.slice(index + 2));
1477
- return {
1478
- commandArgv: [],
1479
- topLevelHelp: true,
1480
- version: false,
1481
- ...helpFilter !== undefined && { helpFilter }
1482
- };
1483
- }
1484
- if (value === "--version" || value === "version") {
1485
- return { commandArgv: [], topLevelHelp: false, version: true };
1486
- }
1487
- if (value !== undefined)
1488
- globals.push(value);
1489
- index += value === undefined ? 1 : 2;
1490
- } else {
1491
- index += 1;
1492
- }
1493
- continue;
1494
- }
1495
- return {
1496
- command: defaultCommand,
1497
- commandArgv: [...globals, ...argv.slice(index)],
1498
- topLevelHelp: false,
1499
- version: false
1500
- };
1501
- }
1502
- return {
1503
- command: defaultCommand,
1504
- commandArgv: globals,
1505
- topLevelHelp: false,
1506
- version: false
1507
- };
1508
- }
1509
-
1510
1541
  // src/tools/cli/command-shape.ts
1511
1542
  function commandShapeIssue(name, descriptor, exists, passthroughField, applicationGlobals = new Set) {
1512
1543
  assertUniqueToolName(name, exists, "CLI command");
@@ -2138,6 +2169,7 @@ function resolveCliRoute(session, argv) {
2138
2169
  command,
2139
2170
  commandArgv,
2140
2171
  beforeSeparator,
2172
+ quiet: readCliBooleanFlag(route.topLevelHelp ? routableArgv : commandArgv, "quiet"),
2141
2173
  helpRequested,
2142
2174
  schemaRequested
2143
2175
  };
@@ -2269,20 +2301,6 @@ function unavailableCommand(reason) {
2269
2301
  retryable: false
2270
2302
  }));
2271
2303
  }
2272
- function unavailableCommandJson(argv) {
2273
- for (let i = 0;i < argv.length; i++) {
2274
- const token = argv[i];
2275
- if (token === "--")
2276
- break;
2277
- if (token === undefined)
2278
- continue;
2279
- const option = classifyLongOptionToken(token);
2280
- if (option?.name !== "json")
2281
- continue;
2282
- return option.value === undefined ? separateBoolValue(argv[i + 1]) ?? true : isReservedBoolWord(option.value) && parseReservedBool("json", option.value);
2283
- }
2284
- return false;
2285
- }
2286
2304
 
2287
2305
  // src/tools/cli/view.ts
2288
2306
  var ABSENT = "(absent)";
@@ -2578,7 +2596,7 @@ async function runManagedCommand(session, route, command, managed) {
2578
2596
  return exit(0);
2579
2597
  }
2580
2598
  if (descriptor.unavailableReason !== undefined) {
2581
- return exit(emitResult2(unavailableCommand(descriptor.unavailableReason), { stdout, stderr }, emitOptionsFor(config, unavailableCommandJson(route.commandArgv), command)));
2599
+ return exit(emitResult2(unavailableCommand(descriptor.unavailableReason), { stdout, stderr }, emitOptionsFor(config, readCliBooleanFlag(route.commandArgv, "json"), command)));
2582
2600
  }
2583
2601
  const stream = managed.streams.get(command);
2584
2602
  const tool = managed.tools.get(command);
@@ -2779,12 +2797,14 @@ async function createCli2(config) {
2779
2797
  const route = resolveCliRoute(session, argv);
2780
2798
  if (route === undefined)
2781
2799
  return;
2782
- const { command } = route;
2783
- const native = command === undefined ? undefined : session.nativeCommands.get(command);
2784
- if (native && command !== undefined) {
2785
- return runNativeCommand2(session, route, command, native);
2786
- }
2787
- return runManagedInvocation(session, route);
2800
+ return withCliNotices(route.quiet, io.stderr, () => {
2801
+ const { command } = route;
2802
+ const native = command === undefined ? undefined : session.nativeCommands.get(command);
2803
+ if (native && command !== undefined) {
2804
+ return runNativeCommand2(session, route, command, native);
2805
+ }
2806
+ return runManagedInvocation(session, route);
2807
+ });
2788
2808
  }
2789
2809
 
2790
- export { DEFAULT_EXIT_CODES2, cliExitCode2, emitResult2, defineCliResult2, defineCliCommand2, CliArgumentError2, cliInvocationResult2, createCliInvoker2, routeCliArgv2, parseCliArgs2, extractCliGlobalOptions2, renderCliView2, pollUntilDone2, createCli2 };
2810
+ export { DEFAULT_EXIT_CODES2, cliExitCode2, emitResult2, defineCliResult2, defineCliCommand2, CliArgumentError2, cliInvocationResult2, createCliInvoker2, routeCliArgv2, writeCliNotice, parseCliArgs2, extractCliGlobalOptions2, renderCliView2, pollUntilDone2, createCli2 };
@@ -29,6 +29,8 @@ export interface CliLongOptionToken {
29
29
  }
30
30
  /** One source of truth for long-option token shape and framework-global ownership. */
31
31
  export declare function classifyLongOptionToken(token: string): CliLongOptionToken | undefined;
32
+ /** Read a reserved boolean for presentation before command arguments can be validated. */
33
+ export declare function readCliBooleanFlag(argv: readonly string[], name: string): boolean;
32
34
  export interface CliArgvRoute {
33
35
  command?: string;
34
36
  commandArgv: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"args-route.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args-route.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD;AAWD,eAAO,MAAM,YAAY,aAA6D,CAAC;AAEvF,eAAO,MAAM,oBAAoB,aAA+C,CAAC;AAEjF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAClC;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAcrF;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+BD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,YAAY,CAuHlF"}
1
+ {"version":3,"file":"args-route.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args-route.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD;AAWD,eAAO,MAAM,YAAY,aAA6D,CAAC;AAEvF,eAAO,MAAM,oBAAoB,aAA+C,CAAC;AAEjF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAClC;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAcrF;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAWjF;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+BD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,YAAY,CAuHlF"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-cli.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/create-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS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AS,CAC7B,KAAK,GAAG,OAAO,EACf,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,QAAQ,SAAS,SAAS,GAAG,SAAS,EACtC,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB7D"}
@@ -0,0 +1,5 @@
1
+ import type { CliIo } from './io.js';
2
+ export declare function withCliNotices<T>(quiet: boolean, stderr: CliIo['stderr'], run: () => T): T;
3
+ /** Profile selection can happen during discovery, before the CLI invocation starts. */
4
+ export declare function writeCliNotice(text: string): void;
5
+ //# sourceMappingURL=notices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notices.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/notices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAOlC,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAE1F;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAOjD"}
@@ -15,7 +15,7 @@ export interface CliProfileStoreConfig<TSchema extends z.ZodType> {
15
15
  * that creates it leaves the reader to guess the file format.
16
16
  */
17
17
  createHint?: (name: string, path: string) => string;
18
- /** Where the substitution notice goes; default stderr. */
18
+ /** App-owned announcement. The default writes to stderr and honours `--quiet`. */
19
19
  announce?: (line: string) => void;
20
20
  }
21
21
  export interface ResolvedCliProfile<TValue> {
@@ -1 +1 @@
1
- {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/profile.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KA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O,GAAG,MAAM,CAAC;IAC5C,8EAA8E;IAC9E,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;CAC/D;AAWD,mEAAmE;AACnE,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,EAC7D,MAAM,EAAE,qBAAqB,CAAC,OAAO,CAAC,GACrC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAqFpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"run-managed.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/run-managed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAerC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EAGhB,MAAM,WAAW,CAAC;AAQnB,wFAAwF;AACxF,wBAAsB,oBAAoB,CACxC,KAAK,EACL,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxC,QAAQ,SAAS,SAAS,EAC1B,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC1F"}
1
+ {"version":3,"file":"run-managed.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/run-managed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAgBrC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EAGhB,MAAM,WAAW,CAAC;AAQnB,wFAAwF;AACxF,wBAAsB,oBAAoB,CACxC,KAAK,EACL,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxC,QAAQ,SAAS,SAAS,EAC1B,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC1F"}
@@ -27,6 +27,7 @@ export interface CliRoute<TGlobals extends ZodObject> {
27
27
  command: string | undefined;
28
28
  commandArgv: string[];
29
29
  beforeSeparator: string[];
30
+ quiet: boolean;
30
31
  helpRequested: boolean;
31
32
  /** `--schema` — answered like help: before identity, validation and the call. */
32
33
  schemaRequested: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExC,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EACL,KAAK,YAAY,EAIlB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,oBAAoB,EAAgC,MAAM,WAAW,CAAC;AAEpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAA8B,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAanF,MAAM,WAAW,UAAU,CACzB,KAAK,EACL,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxC,QAAQ,SAAS,SAAS;IAE1B,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC7C,EAAE,EAAE,KAAK,CAAC;IACV,kBAAkB,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACl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AK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAC5C,EAAE,EAAE,KAAK,GACR,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAkDvC;AAED,MAAM,WAAW,QAAQ,CAAC,QAAQ,SAAS,SAAS;IAClD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACjC,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,iFAAiF;IACjF,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EACL,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxC,QAAQ,SAAS,SAAS,EAE1B,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAC9C,IAAI,EAAE,MAAM,EAAE,GACb,QAAQ,CAAC,QAAQ,CAAC,GAAG,SAAS,CAkEhC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,sBAAsB,GACjC,MAAM,CAcR;AAED,qFAAqF;AACrF,wBAAgB,cAAc,CAC5B,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,CAAC,EAClD,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,MAAM,GACf,WAAW,CAOb"}
@@ -1,10 +1,4 @@
1
1
  import { type ToolFailure } from '../execute-result.js';
2
2
  /** One refusal for direct dispatch and a known, unavailable --wait target. */
3
3
  export declare function unavailableCommand(reason: string): ToolFailure;
4
- /**
5
- * Choose only the error's format, without admitting arguments of a command that
6
- * cannot run. Its availability refusal takes precedence over argument errors.
7
- * Reuse the framework's token/boolean vocabulary; after -- everything is data.
8
- */
9
- export declare function unavailableCommandJson(argv: readonly string[]): boolean;
10
4
  //# sourceMappingURL=unavailable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unavailable.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/unavailable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,mBAAmB,CAAC;AAI1E,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAQ9D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAYvE"}
1
+ {"version":3,"file":"unavailable.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/unavailable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,mBAAmB,CAAC;AAE1E,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAQ9D"}
package/llms/cli.txt CHANGED
@@ -886,10 +886,11 @@ wrong way round, because the unsafe version reads as kindness:
886
886
  That is correct exactly while a single profile exists. The day a second appears
887
887
  it is a command run against the wrong deployment, with nothing in the output to
888
888
  say so. **A profile named explicitly and not found is a refusal, never a
889
- substitution.** Substitution survives only where it cannot be wrong: no name was
890
- given at all and exactly one profile exists — and even then it is announced on
891
- stderr. The distinction has to be drawn at resolution; one step later, "prod" and
892
- "prod by default" are the same string.
889
+ substitution.** With no name given and exactly one profile configured, the CLI
890
+ selects it and writes a notice to stderr by default. `--quiet` suppresses that
891
+ notice, including when the app selects the profile before discovering its
892
+ commands. Profile refusals still report their cause. An app that supplies
893
+ `announce` controls its own notice.
893
894
 
894
895
  `createCliProfileStore` is that rule, plus the twenty lines every consumer of
895
896
  this shape writes:
package/llms-full.txt CHANGED
@@ -11317,10 +11317,11 @@ wrong way round, because the unsafe version reads as kindness:
11317
11317
  That is correct exactly while a single profile exists. The day a second appears
11318
11318
  it is a command run against the wrong deployment, with nothing in the output to
11319
11319
  say so. **A profile named explicitly and not found is a refusal, never a
11320
- substitution.** Substitution survives only where it cannot be wrong: no name was
11321
- given at all and exactly one profile exists — and even then it is announced on
11322
- stderr. The distinction has to be drawn at resolution; one step later, "prod" and
11323
- "prod by default" are the same string.
11320
+ substitution.** With no name given and exactly one profile configured, the CLI
11321
+ selects it and writes a notice to stderr by default. `--quiet` suppresses that
11322
+ notice, including when the app selects the profile before discovering its
11323
+ commands. Profile refusals still report their cause. An app that supplies
11324
+ `announce` controls its own notice.
11324
11325
 
11325
11326
  `createCliProfileStore` is that rule, plus the twenty lines every consumer of
11326
11327
  this shape writes:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stitchkit",
3
- "version": "0.124.4",
3
+ "version": "0.124.5",
4
4
  "description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
5
5
  "keywords": [
6
6
  "bun",