@sunasteriskrnd/takumi 1.0.0-dev.56 → 1.0.0-dev.58

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.
Files changed (2) hide show
  1. package/dist/index.js +148 -55
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -19815,7 +19815,7 @@ var package_default;
19815
19815
  var init_package = __esm(() => {
19816
19816
  package_default = {
19817
19817
  name: "@sunasteriskrnd/takumi",
19818
- version: "1.0.0-dev.56",
19818
+ version: "1.0.0-dev.58",
19819
19819
  description: "CLI tool for bootstrapping and managing Takumi projects",
19820
19820
  type: "module",
19821
19821
  repository: {
@@ -19836,6 +19836,7 @@ var init_package = __esm(() => {
19836
19836
  scripts: {
19837
19837
  tkm: "bun scripts/run-cli.ts --",
19838
19838
  dev: "bun scripts/run-cli.ts --config src/lib/build-config/dev.json --",
19839
+ stg: "bun scripts/run-cli.ts --config src/lib/build-config/stg.json --",
19839
19840
  build: "bun scripts/build-cli.ts",
19840
19841
  "build:dev": "bun scripts/build-cli.ts --config src/lib/build-config/dev.json",
19841
19842
  compile: "bun scripts/build-cli.ts --compile",
@@ -20011,7 +20012,7 @@ function getLegacyManifestPath(providerRoot) {
20011
20012
  return join4(providerRoot, LEGACY_MANIFEST_FILENAME);
20012
20013
  }
20013
20014
  function getCliVersion() {
20014
- return "1.0.0-dev.56"?.trim() || process.env.npm_package_version?.trim() || "unknown";
20015
+ return "1.0.0-dev.58"?.trim() || process.env.npm_package_version?.trim() || "unknown";
20015
20016
  }
20016
20017
  function getCliUserAgent() {
20017
20018
  return `${TAKUMI_CLI_NPM_PACKAGE_NAME}/${getCliVersion()}`;
@@ -42315,6 +42316,9 @@ var init_prune_deleted_hooks = __esm(() => {
42315
42316
  });
42316
42317
 
42317
42318
  // src/commands/portable/model-taxonomy.ts
42319
+ function isValidCodexEffort(value) {
42320
+ return typeof value === "string" && CODEX_REASONING_EFFORTS.includes(value);
42321
+ }
42318
42322
  function setTaxonomyOverrides(overrides) {
42319
42323
  userOverrides = overrides;
42320
42324
  }
@@ -42352,8 +42356,9 @@ function resolveModel(sourceModel, targetProvider) {
42352
42356
  }
42353
42357
  return { resolved: providerMap[tier] };
42354
42358
  }
42355
- var SOURCE_TIER_MAP, DEFAULT_PROVIDER_MODEL_MAP, userOverrides;
42359
+ var CODEX_REASONING_EFFORTS, SOURCE_TIER_MAP, DEFAULT_PROVIDER_MODEL_MAP, userOverrides;
42356
42360
  var init_model_taxonomy = __esm(() => {
42361
+ CODEX_REASONING_EFFORTS = ["minimal", "low", "medium", "high", "xhigh"];
42357
42362
  SOURCE_TIER_MAP = {
42358
42363
  fable: "heavy",
42359
42364
  opus: "heavy",
@@ -42457,8 +42462,18 @@ function convertFmToCodexToml(item) {
42457
42462
  }
42458
42463
  if (modelResult.resolved) {
42459
42464
  lines.push(`model = ${JSON.stringify(modelResult.resolved.model)}`);
42460
- if (modelResult.resolved.effort) {
42461
- lines.push(`# effort = ${JSON.stringify(modelResult.resolved.effort)}`);
42465
+ const rawEffort = item.frontmatter.codexReasoningEffort;
42466
+ if (typeof rawEffort === "string") {
42467
+ const effort = rawEffort.trim();
42468
+ if (effort) {
42469
+ if (isValidCodexEffort(effort)) {
42470
+ lines.push(`model_reasoning_effort = ${JSON.stringify(effort)}`);
42471
+ } else {
42472
+ warnings.push(`Ignored invalid codexReasoningEffort "${effort}" (allowed: ${CODEX_REASONING_EFFORTS.join(", ")})`);
42473
+ }
42474
+ }
42475
+ } else if (rawEffort !== undefined && rawEffort !== null) {
42476
+ warnings.push(`Ignored non-string codexReasoningEffort frontmatter (${typeof rawEffort})`);
42462
42477
  }
42463
42478
  } else if (typeof item.frontmatter.model === "string" && item.frontmatter.model.trim().length > 0 && item.frontmatter.model.trim() !== "inherit") {
42464
42479
  lines.push(`# model = ${JSON.stringify(item.frontmatter.model.trim())}`);
@@ -51467,75 +51482,102 @@ var init_auth_command_help = __esm(() => {
51467
51482
  };
51468
51483
  });
51469
51484
 
51470
- // src/domains/help/commands/artifact-command-help.ts
51471
- var artifactCommandHelp;
51472
- var init_artifact_command_help = __esm(() => {
51473
- artifactCommandHelp = {
51474
- name: "artifact",
51475
- description: "Upload, download, and delete Takumi artifacts (upload|download|delete)",
51476
- usage: "tkm artifact <upload <file|dir> | download <uuid|url> | delete <uuid|url>>",
51485
+ // src/domains/help/commands/artifact-action-help.ts
51486
+ var artifactUploadHelp, artifactDownloadHelp, artifactDeleteHelp;
51487
+ var init_artifact_action_help = __esm(() => {
51488
+ artifactUploadHelp = {
51489
+ name: "artifact upload",
51490
+ description: "Upload a file or directory as a new artifact (or a new version with --id)",
51491
+ usage: "tkm artifact upload <file|dir> [options]",
51477
51492
  examples: [
51478
51493
  {
51479
51494
  command: "tkm artifact upload ./report.html --title 'Weekly Report'",
51480
51495
  description: "Upload a file (or directory) as a new artifact and print its share URL"
51481
51496
  },
51482
51497
  {
51483
- command: "tkm artifact download <uuid|url> -o ./out --ver 3",
51484
- description: "Download a specific version's files into a directory"
51485
- },
51486
- {
51487
- command: "tkm artifact delete <uuid|url> --ver 2",
51488
- description: "Delete ONLY version 2 (soft delete; other versions stay). A pasted URL with ?v=2 does the same"
51498
+ command: "tkm artifact upload ./report.html --id <uuid|url> -m 'fix chart colors'",
51499
+ description: "Push a new version of an existing artifact with a change note"
51489
51500
  }
51490
51501
  ],
51491
51502
  optionGroups: [
51492
51503
  {
51493
- title: "Actions",
51504
+ title: "Options",
51494
51505
  options: [
51495
51506
  {
51496
- flags: "upload <file|dir>",
51497
- description: "Upload a file or directory as a new artifact (or new version with --id)"
51507
+ flags: "--id <uuid|url>",
51508
+ description: "Existing artifact (UUID or viewer URL) to overwrite with a new version"
51498
51509
  },
51499
51510
  {
51500
- flags: "download <uuid|url>",
51501
- description: "Download an artifact's files (latest or --ver <n>)"
51511
+ flags: "--title <title>",
51512
+ description: "Display title for the artifact (max 200 chars)"
51502
51513
  },
51503
51514
  {
51504
- flags: "delete <uuid|url>",
51505
- description: "Soft-delete the whole artifact, or one version with --ver <n>"
51515
+ flags: "-m, --message <message>",
51516
+ description: "Short note describing this version's change (max 100 chars)"
51506
51517
  }
51507
51518
  ]
51519
+ }
51520
+ ]
51521
+ };
51522
+ artifactDownloadHelp = {
51523
+ name: "artifact download",
51524
+ description: "Download an artifact's files (latest version or --ver <n>)",
51525
+ usage: "tkm artifact download <uuid|url> [options]",
51526
+ examples: [
51527
+ {
51528
+ command: "tkm artifact download <uuid|url>",
51529
+ description: "Download the latest version into slug(title) or uuid in CWD"
51508
51530
  },
51531
+ {
51532
+ command: "tkm artifact download <uuid|url> -o ./out --ver 3",
51533
+ description: "Download a specific version's files into a directory"
51534
+ }
51535
+ ],
51536
+ optionGroups: [
51509
51537
  {
51510
51538
  title: "Options",
51511
51539
  options: [
51512
- {
51513
- flags: "--id <uuid|url>",
51514
- description: "(upload) Existing artifact to overwrite with a new version"
51515
- },
51516
- {
51517
- flags: "--title <title>",
51518
- description: "(upload) Display title for the artifact (max 200 chars)"
51519
- },
51520
- {
51521
- flags: "-m, --message <message>",
51522
- description: "(upload) Short note describing this version's change (max 100 chars)"
51523
- },
51524
51540
  {
51525
51541
  flags: "-o, --output <dir>",
51526
- description: "(download) Output directory; default: slug(title) or uuid in CWD"
51542
+ description: "Output directory; default: slug(title) or uuid in CWD"
51527
51543
  },
51528
51544
  {
51529
51545
  flags: "--ver <n>",
51530
- description: "(download) Version to download | (delete) version to delete. ?v=<n> in a pasted URL works too; --ver wins when both given"
51546
+ description: "Version to download. ?v=<n> in a pasted URL works too; --ver wins when both given"
51531
51547
  },
51532
51548
  {
51533
51549
  flags: "--force",
51534
- description: "(download) Allow writing into a non-empty directory"
51550
+ description: "Allow writing into a non-empty directory"
51551
+ }
51552
+ ]
51553
+ }
51554
+ ]
51555
+ };
51556
+ artifactDeleteHelp = {
51557
+ name: "artifact delete",
51558
+ description: "Soft-delete a whole artifact, or a single version with --ver <n>",
51559
+ usage: "tkm artifact delete <uuid|url> [options]",
51560
+ examples: [
51561
+ {
51562
+ command: "tkm artifact delete <uuid|url>",
51563
+ description: "Soft-delete the whole artifact after a confirmation prompt"
51564
+ },
51565
+ {
51566
+ command: "tkm artifact delete <uuid|url> --ver 2",
51567
+ description: "Delete ONLY version 2 (soft delete; other versions stay). A pasted URL with ?v=2 does the same"
51568
+ }
51569
+ ],
51570
+ optionGroups: [
51571
+ {
51572
+ title: "Options",
51573
+ options: [
51574
+ {
51575
+ flags: "--ver <n>",
51576
+ description: "Version to delete. ?v=<n> in a pasted URL works too; --ver wins when both given"
51535
51577
  },
51536
51578
  {
51537
51579
  flags: "-y, --yes",
51538
- description: "(delete) Skip the confirmation prompt"
51580
+ description: "Skip the confirmation prompt"
51539
51581
  }
51540
51582
  ]
51541
51583
  }
@@ -51543,6 +51585,57 @@ var init_artifact_command_help = __esm(() => {
51543
51585
  };
51544
51586
  });
51545
51587
 
51588
+ // src/domains/help/commands/artifact-command-help.ts
51589
+ var artifactCommandHelp;
51590
+ var init_artifact_command_help = __esm(() => {
51591
+ init_artifact_action_help();
51592
+ artifactCommandHelp = {
51593
+ name: "artifact",
51594
+ description: "Upload, download, and delete Takumi artifacts (upload|download|delete)",
51595
+ usage: "tkm artifact <upload|download|delete> [options]",
51596
+ examples: [
51597
+ {
51598
+ command: "tkm artifact upload ./report.html --title 'Weekly Report'",
51599
+ description: "Upload a file (or directory) as a new artifact and print its share URL"
51600
+ },
51601
+ {
51602
+ command: "tkm artifact download <uuid|url> -o ./out --ver 3",
51603
+ description: "Download a specific version's files into a directory"
51604
+ }
51605
+ ],
51606
+ optionGroups: [
51607
+ {
51608
+ title: "Actions",
51609
+ options: [
51610
+ {
51611
+ flags: "upload <file|dir>",
51612
+ description: "Upload a file or directory as a new artifact (or new version with --id)"
51613
+ },
51614
+ {
51615
+ flags: "download <uuid|url>",
51616
+ description: "Download an artifact's files (latest or --ver <n>)"
51617
+ },
51618
+ {
51619
+ flags: "delete <uuid|url>",
51620
+ description: "Soft-delete the whole artifact, or one version with --ver <n>"
51621
+ }
51622
+ ]
51623
+ }
51624
+ ],
51625
+ sections: [
51626
+ {
51627
+ title: "Learn More",
51628
+ content: "Run 'tkm artifact <action> --help' for action-specific options and examples."
51629
+ }
51630
+ ],
51631
+ subcommands: {
51632
+ upload: artifactUploadHelp,
51633
+ download: artifactDownloadHelp,
51634
+ delete: artifactDeleteHelp
51635
+ }
51636
+ };
51637
+ });
51638
+
51546
51639
  // src/domains/help/commands/mcp-command-help.ts
51547
51640
  var mcpCommandHelp;
51548
51641
  var init_mcp_command_help = __esm(() => {
@@ -51620,6 +51713,7 @@ var init_commands2 = __esm(() => {
51620
51713
  init_config_command_help();
51621
51714
  init_auth_command_help();
51622
51715
  init_artifact_command_help();
51716
+ init_artifact_action_help();
51623
51717
  init_mcp_command_help();
51624
51718
  init_common_options();
51625
51719
  });
@@ -51924,6 +52018,7 @@ var init_help_renderer = __esm(() => {
51924
52018
  // src/domains/help/help-interceptor.ts
51925
52019
  var exports_help_interceptor = {};
51926
52020
  __export(exports_help_interceptor, {
52021
+ resolveHelpTarget: () => resolveHelpTarget,
51927
52022
  isHelpRequested: () => isHelpRequested,
51928
52023
  handleHelp: () => handleHelp
51929
52024
  });
@@ -51941,30 +52036,28 @@ function getHelpOptions() {
51941
52036
  noColor
51942
52037
  };
51943
52038
  }
51944
- function getCommandFromArgv() {
51945
- const argv = process.argv.slice(2);
51946
- for (const arg of argv) {
51947
- if (arg.startsWith("-")) {
51948
- continue;
51949
- }
51950
- if (hasCommand(arg)) {
51951
- return arg;
51952
- }
52039
+ function resolveHelpTarget(argv) {
52040
+ const tokens = argv.filter((arg) => !arg.startsWith("-"));
52041
+ const [command, action] = tokens;
52042
+ if (command === undefined || !hasCommand(command)) {
51953
52043
  return null;
51954
52044
  }
51955
- return null;
52045
+ const help = HELP_REGISTRY[command];
52046
+ if (action !== undefined && help.subcommands?.[action]) {
52047
+ return help.subcommands[action];
52048
+ }
52049
+ return help;
51956
52050
  }
51957
52051
  async function handleHelp(_args) {
51958
52052
  try {
51959
52053
  const options2 = getHelpOptions();
51960
- const command = getCommandFromArgv();
52054
+ const help = resolveHelpTarget(process.argv.slice(2));
51961
52055
  let output3;
51962
- if (command === null) {
52056
+ if (help === null) {
51963
52057
  output3 = renderGlobalHelp(HELP_REGISTRY, options2);
51964
52058
  } else {
51965
- const help = HELP_REGISTRY[command];
51966
52059
  output3 = renderHelp(help, {
51967
- command,
52060
+ command: help.name,
51968
52061
  globalHelp: false,
51969
52062
  options: options2
51970
52063
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunasteriskrnd/takumi",
3
- "version": "1.0.0-dev.56",
3
+ "version": "1.0.0-dev.58",
4
4
  "description": "CLI tool for bootstrapping and managing Takumi projects",
5
5
  "type": "module",
6
6
  "repository": {
@@ -21,6 +21,7 @@
21
21
  "scripts": {
22
22
  "tkm": "bun scripts/run-cli.ts --",
23
23
  "dev": "bun scripts/run-cli.ts --config src/lib/build-config/dev.json --",
24
+ "stg": "bun scripts/run-cli.ts --config src/lib/build-config/stg.json --",
24
25
  "build": "bun scripts/build-cli.ts",
25
26
  "build:dev": "bun scripts/build-cli.ts --config src/lib/build-config/dev.json",
26
27
  "compile": "bun scripts/build-cli.ts --compile",