@kivacore/cli 0.13.0 → 0.13.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/main.js CHANGED
@@ -97698,7 +97698,7 @@ function resolveDisplayName(name3, aliases) {
97698
97698
  // package.json
97699
97699
  var package_default = {
97700
97700
  name: "@kivacore/cli",
97701
- version: "0.13.0",
97701
+ version: "0.13.1",
97702
97702
  private: false,
97703
97703
  description: "KIVA API CLI",
97704
97704
  bin: {
@@ -120675,6 +120675,26 @@ var AuthStore = class _AuthStore {
120675
120675
  }
120676
120676
  };
120677
120677
 
120678
+ // src/services/barePrompt.ts
120679
+ var BARE_PROMPT_COMMAND = "work";
120680
+ var SENTENCE_RE = /\S\s+\S/u;
120681
+ function rewriteBarePromptArgv(argv) {
120682
+ for (const [index3, token] of argv.entries()) {
120683
+ if (token.startsWith("-")) {
120684
+ continue;
120685
+ }
120686
+ if (SENTENCE_RE.test(token)) {
120687
+ return [BARE_PROMPT_COMMAND, ...argv];
120688
+ }
120689
+ const previous2 = argv[index3 - 1];
120690
+ if (previous2?.startsWith("-") && !previous2.includes("=")) {
120691
+ continue;
120692
+ }
120693
+ break;
120694
+ }
120695
+ return [...argv];
120696
+ }
120697
+
120678
120698
  // src/services/environmentConfig.ts
120679
120699
  import { chmod as chmod6, mkdir as mkdir12, readFile as readFile22, writeFile as writeFile11 } from "node:fs/promises";
120680
120700
  import { dirname as dirname17 } from "node:path";
@@ -122453,6 +122473,7 @@ var ROOT_HELP_COMMANDS = [
122453
122473
  { command: "auth set-tokens --accessToken <token>", description: "Save custom access and refresh tokens" },
122454
122474
  { command: "auth accounts list", description: "List saved user accounts" },
122455
122475
  { command: "auth tenants use <uuid|tenantNo>", description: "Switch active tenant for selected user" },
122476
+ { command: '"<prompt>"', description: 'Start the Kiva Work Agent with a prompt (same as: work "<prompt>")' },
122456
122477
  { command: "work [prompt]", description: "Launch the Kiva Work Agent" },
122457
122478
  { command: "code [prompt]", description: "Launch the Kiva Coding Agent" },
122458
122479
  { command: "server", description: "Start HTTP server bridging pi agent to AI SDK useChat" },
@@ -122750,7 +122771,8 @@ function createKivaCli(params) {
122750
122771
  return cli2;
122751
122772
  }
122752
122773
  migrateLegacyBrandDirectories();
122753
- var runtimeArgs = extractGlobalFlagFromArgv(process.argv.slice(2));
122774
+ var extractedArgs = extractGlobalFlagFromArgv(process.argv.slice(2));
122775
+ var runtimeArgs = { ...extractedArgs, argv: rewriteBarePromptArgv(extractedArgs.argv) };
122754
122776
  var cli = createKivaCli({
122755
122777
  forceGlobalSettings: runtimeArgs.forceGlobal
122756
122778
  });