@sunasteriskrnd/takumi 1.0.0-dev.67 → 1.0.0-dev.69

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 +33 -21
  2. package/package.json +1 -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.67",
19818
+ version: "1.0.0-dev.69",
19819
19819
  description: "CLI tool for bootstrapping and managing Takumi projects",
19820
19820
  type: "module",
19821
19821
  repository: {
@@ -20012,7 +20012,7 @@ function getLegacyManifestPath(providerRoot) {
20012
20012
  return join4(providerRoot, LEGACY_MANIFEST_FILENAME);
20013
20013
  }
20014
20014
  function getCliVersion() {
20015
- return "1.0.0-dev.67"?.trim() || process.env.npm_package_version?.trim() || "unknown";
20015
+ return "1.0.0-dev.69"?.trim() || process.env.npm_package_version?.trim() || "unknown";
20016
20016
  }
20017
20017
  function getCliUserAgent() {
20018
20018
  return `${TAKUMI_CLI_NPM_PACKAGE_NAME}/${getCliVersion()}`;
@@ -22756,6 +22756,7 @@ var init_takumi_config = __esm(() => {
22756
22756
  effort: exports_external.string().optional()
22757
22757
  });
22758
22758
  ModelTierMapSchema = exports_external.object({
22759
+ flagship: ResolvedModelConfigSchema.optional(),
22759
22760
  heavy: ResolvedModelConfigSchema.optional(),
22760
22761
  balanced: ResolvedModelConfigSchema.optional(),
22761
22762
  light: ResolvedModelConfigSchema.optional()
@@ -42289,18 +42290,19 @@ function resolveModel(sourceModel, targetProvider) {
42289
42290
  }
42290
42291
  var CODEX_REASONING_EFFORTS, SOURCE_TIER_MAP, DEFAULT_PROVIDER_MODEL_MAP, userOverrides;
42291
42292
  var init_model_taxonomy = __esm(() => {
42292
- CODEX_REASONING_EFFORTS = ["minimal", "low", "medium", "high", "xhigh"];
42293
+ CODEX_REASONING_EFFORTS = ["low", "medium", "high", "max", "xhigh", "ultra"];
42293
42294
  SOURCE_TIER_MAP = {
42294
- fable: "heavy",
42295
+ fable: "flagship",
42295
42296
  opus: "heavy",
42296
42297
  sonnet: "balanced",
42297
42298
  haiku: "light"
42298
42299
  };
42299
42300
  DEFAULT_PROVIDER_MODEL_MAP = {
42300
42301
  codex: {
42301
- heavy: { model: "gpt-5.6-sol", effort: "xhigh" },
42302
- balanced: { model: "gpt-5.6-terra", effort: "high" },
42303
- light: { model: "gpt-5.6-luna", effort: "medium" }
42302
+ flagship: { model: "gpt-6-astra", effort: "high" },
42303
+ heavy: { model: "gpt-6-sol", effort: "high" },
42304
+ balanced: { model: "gpt-6-luna", effort: "max" },
42305
+ light: { model: "gpt-6-luna", effort: "low" }
42304
42306
  }
42305
42307
  };
42306
42308
  });
@@ -42393,18 +42395,13 @@ function convertFmToCodexToml(item) {
42393
42395
  }
42394
42396
  if (modelResult.resolved) {
42395
42397
  lines.push(`model = ${JSON.stringify(modelResult.resolved.model)}`);
42396
- const rawEffort = item.frontmatter.codexReasoningEffort;
42397
- if (typeof rawEffort === "string") {
42398
- const effort = rawEffort.trim();
42399
- if (effort) {
42400
- if (isValidCodexEffort(effort)) {
42401
- lines.push(`model_reasoning_effort = ${JSON.stringify(effort)}`);
42402
- } else {
42403
- warnings.push(`Ignored invalid codexReasoningEffort "${effort}" (allowed: ${CODEX_REASONING_EFFORTS.join(", ")})`);
42404
- }
42398
+ const effort = modelResult.resolved.effort?.trim();
42399
+ if (effort) {
42400
+ if (isValidCodexEffort(effort)) {
42401
+ lines.push(`model_reasoning_effort = ${JSON.stringify(effort)}`);
42402
+ } else {
42403
+ warnings.push(`Ignored invalid reasoning effort "${effort}" for "${modelResult.resolved.model}" (allowed: ${CODEX_REASONING_EFFORTS.join(", ")})`);
42405
42404
  }
42406
- } else if (rawEffort !== undefined && rawEffort !== null) {
42407
- warnings.push(`Ignored non-string codexReasoningEffort frontmatter (${typeof rawEffort})`);
42408
42405
  }
42409
42406
  } else if (typeof item.frontmatter.model === "string" && item.frontmatter.model.trim().length > 0 && item.frontmatter.model.trim() !== "inherit") {
42410
42407
  lines.push(`# model = ${JSON.stringify(item.frontmatter.model.trim())}`);
@@ -54130,9 +54127,11 @@ import { promises as fs8 } from "node:fs";
54130
54127
 
54131
54128
  class ArtifactApiError extends Error {
54132
54129
  status;
54133
- constructor(status, message) {
54130
+ code;
54131
+ constructor(status, message, code) {
54134
54132
  super(message);
54135
54133
  this.status = status;
54134
+ this.code = code;
54136
54135
  this.name = "ArtifactApiError";
54137
54136
  }
54138
54137
  }
@@ -54254,7 +54253,7 @@ async function presignDownload(token, uuid, version3, paths) {
54254
54253
  });
54255
54254
  if (!res.ok) {
54256
54255
  const msg = await parseErrorMessage(res);
54257
- throw new ArtifactApiError(res.status, `Presign-download failed (HTTP ${res.status}): ${msg}`);
54256
+ throw new ArtifactApiError(res.status, `Presign-download failed (HTTP ${res.status}): ${msg}`, msg);
54258
54257
  }
54259
54258
  return await res.json();
54260
54259
  }
@@ -55036,6 +55035,10 @@ function printUploadSummary(entries) {
55036
55035
  }
55037
55036
 
55038
55037
  // src/commands/artifact/download-command.ts
55038
+ var DOWNLOAD_NOT_ALLOWED = "download_not_allowed";
55039
+ function printDownloadNotAllowed() {
55040
+ console.error("The artifact owner has not allowed you to download this artifact.");
55041
+ }
55039
55042
  function deriveSlug(title, uuid) {
55040
55043
  const slug = (title ?? "").trim().replace(/[/\\:*?"<>|.]/g, " ").split("").map((c2) => c2.charCodeAt(0) < 32 ? " " : c2).join("").replace(/\s+/g, "-").replace(/^[.\-]+|[.\-]+$/g, "").slice(0, 80);
55041
55044
  return slug || uuid;
@@ -55060,6 +55063,11 @@ async function artifactDownload(ref, opts) {
55060
55063
  process.exitCode = 1;
55061
55064
  return;
55062
55065
  }
55066
+ if (manifestRes.can_download === false) {
55067
+ printDownloadNotAllowed();
55068
+ process.exitCode = 1;
55069
+ return;
55070
+ }
55063
55071
  const destDir = opts.output ? resolve18(opts.output) : resolve18(deriveSlug(manifestRes.title, uuid));
55064
55072
  try {
55065
55073
  const stat7 = await fs12.stat(destDir);
@@ -55087,7 +55095,11 @@ async function artifactDownload(ref, opts) {
55087
55095
  try {
55088
55096
  presignRes = await presignDownload(token, uuid, manifestRes.version);
55089
55097
  } catch (err) {
55090
- printApiError(err);
55098
+ if (err instanceof ArtifactApiError && err.status === 403 && err.code === DOWNLOAD_NOT_ALLOWED) {
55099
+ printDownloadNotAllowed();
55100
+ } else {
55101
+ printApiError(err);
55102
+ }
55091
55103
  process.exitCode = 1;
55092
55104
  return;
55093
55105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunasteriskrnd/takumi",
3
- "version": "1.0.0-dev.67",
3
+ "version": "1.0.0-dev.69",
4
4
  "description": "CLI tool for bootstrapping and managing Takumi projects",
5
5
  "type": "module",
6
6
  "repository": {