@todoforai/cli 0.1.35 → 0.1.36
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/dist/todoforai-cli.js +80 -7
- package/package.json +1 -1
package/dist/todoforai-cli.js
CHANGED
|
@@ -42868,6 +42868,9 @@ class ApiClient {
|
|
|
42868
42868
|
payload.groupTag = groupTag;
|
|
42869
42869
|
if (groupName)
|
|
42870
42870
|
payload.groupName = groupName;
|
|
42871
|
+
const parentTodoId = typeof process !== "undefined" ? process.env?.TODOFORAI_TODO_ID : undefined;
|
|
42872
|
+
if (parentTodoId && parentTodoId !== todoId)
|
|
42873
|
+
payload.parentTodoId = parentTodoId;
|
|
42871
42874
|
return this.request("POST", `/api/v1/projects/${projectId}/todos`, payload);
|
|
42872
42875
|
}
|
|
42873
42876
|
async registerAttachment(file, filename, opts = {}) {
|
|
@@ -43425,9 +43428,9 @@ var mimetypes_default = {
|
|
|
43425
43428
|
doc: { mime: "application/msword", type: "document" },
|
|
43426
43429
|
docx: { mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", type: "document", tags: ["docx"] },
|
|
43427
43430
|
ppt: { mime: "application/vnd.ms-powerpoint", type: "document" },
|
|
43428
|
-
pptx: { mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation", type: "document" },
|
|
43431
|
+
pptx: { mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation", type: "document", tags: ["pptx"] },
|
|
43429
43432
|
xls: { mime: "application/vnd.ms-excel", type: "spreadsheet" },
|
|
43430
|
-
xlsx: { mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", type: "spreadsheet" },
|
|
43433
|
+
xlsx: { mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", type: "spreadsheet", tags: ["xlsx"] },
|
|
43431
43434
|
zip: { mime: "application/zip", type: "archive" },
|
|
43432
43435
|
rar: { mime: "application/vnd.rar", type: "archive" },
|
|
43433
43436
|
tar: { mime: "application/x-tar", type: "archive" },
|
|
@@ -44127,8 +44130,39 @@ var OUTPUT_POLICIES = {
|
|
|
44127
44130
|
raw: { firstLimit: Infinity, lastLimit: 0, hardCap: Infinity, lineLimit: Infinity }
|
|
44128
44131
|
};
|
|
44129
44132
|
// ../packages/shared-fbe/src/toolInstallCommand.ts
|
|
44130
|
-
var PYTHON_MIN_MINOR =
|
|
44133
|
+
var PYTHON_MIN_MINOR = 11;
|
|
44131
44134
|
var PYTHON_VERSION_CHECK = `-c 'import sys; sys.exit(0 if sys.version_info[:2] >= (3, ${PYTHON_MIN_MINOR}) else 1)'`;
|
|
44135
|
+
// ../packages/shared-fbe/src/model_promos.json
|
|
44136
|
+
var model_promos_default = {
|
|
44137
|
+
_doc: [
|
|
44138
|
+
"Single source of truth for TODOforAI promotional model discounts.",
|
|
44139
|
+
"Consumed by frontend (display, bundled via getModelDiscount) and served by backend at GET /public/v1/model-promos, which the agent fetches at startup (billing: model_promos.jl).",
|
|
44140
|
+
"`family` is a regex on the normalized model id (last path segment, lowercase, dots\u2192dashes, '(level)' suffix stripped);",
|
|
44141
|
+
"'(-\\\\d+)*' trailing point versions are appended by the consumer, so 'claude-opus-5' covers claude-opus-5.2 too.",
|
|
44142
|
+
"`provider` matches the provider name instead (TODO GO / Ollama Cloud, subscription-wide).",
|
|
44143
|
+
"`rate` = fraction off. `boostable:false` = the Ultra/Team promo boost (halves the remaining price) is NOT applied.",
|
|
44144
|
+
"`ends` is the last inclusive day (UTC).",
|
|
44145
|
+
"A change here goes live with a backend + frontend deploy; agent/src/assets/model_promos.json is only the agent's offline fallback, refresh it occasionally."
|
|
44146
|
+
],
|
|
44147
|
+
boost_remaining_price_factor: 0.5,
|
|
44148
|
+
promos: [
|
|
44149
|
+
{ family: "claude-fable-5", rate: 0.3, starts: "2026-06-29", ends: "2026-09-15", boostable: false },
|
|
44150
|
+
{ family: "claude-opus-5", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44151
|
+
{ family: "claude-opus-4-[78]", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44152
|
+
{ family: "claude-sonnet-5", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44153
|
+
{ family: "claude-haiku-4-5", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44154
|
+
{ family: "claude-haiku-5", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44155
|
+
{ family: "gpt-5-5(-pro)?", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44156
|
+
{ family: "gpt-5-6-sol", rate: 0.9, starts: "2026-08-26", ends: "2026-11-21" },
|
|
44157
|
+
{ family: "gpt-5-6-terra", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44158
|
+
{ family: "gpt-5-6-luna", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
|
|
44159
|
+
{ provider: "opencode[_ -]?go|ollama[_ -]?cloud", rate: 0.5, starts: "2026-06-29", ends: "2026-09-15" }
|
|
44160
|
+
]
|
|
44161
|
+
};
|
|
44162
|
+
|
|
44163
|
+
// ../packages/shared-fbe/src/modelPromos.ts
|
|
44164
|
+
var BOOST_FACTOR = model_promos_default.boost_remaining_price_factor;
|
|
44165
|
+
var MODEL_PROMOS = model_promos_default.promos;
|
|
44132
44166
|
// ../packages/shared-fbe/src/realtime/topics.ts
|
|
44133
44167
|
var TOPICS = {
|
|
44134
44168
|
["todo:new" /* NEW_TODO */]: {
|
|
@@ -44269,7 +44303,7 @@ import { parseArgs } from "util";
|
|
|
44269
44303
|
// package.json
|
|
44270
44304
|
var package_default = {
|
|
44271
44305
|
name: "@todoforai/cli",
|
|
44272
|
-
version: "0.1.
|
|
44306
|
+
version: "0.1.36",
|
|
44273
44307
|
type: "module",
|
|
44274
44308
|
bin: {
|
|
44275
44309
|
"todoforai-cli": "bin/todoforai-cli.js",
|
|
@@ -44329,6 +44363,12 @@ Usage:
|
|
|
44329
44363
|
tfa-cli show <file|-> [todo-id] # Show a file in the chat (rendered by mimetype; - reads stdin)
|
|
44330
44364
|
# [--title T] [--alias A] [--mime M] [--card <name>] [--link] [--json]
|
|
44331
44365
|
# --link = compact chip (name+size+download) instead of inline render
|
|
44366
|
+
# The bytes get a stable, versioned site id (printed). --site <id>
|
|
44367
|
+
# pushes a new version of an existing one (from any todo);
|
|
44368
|
+
# --public serves the latest at sites.todofor.ai/<id>
|
|
44369
|
+
tfa-cli show public <site-id> [--off] # Publish / unpublish a shown file
|
|
44370
|
+
tfa-cli show get <site-id> [out] [--rev <att>] # Fetch its bytes (latest, or a given version)
|
|
44371
|
+
tfa-cli show rm <site-id> # Delete it and all its versions
|
|
44332
44372
|
tfa-cli show list [todo-id] # List show blocks (ref, title, mime/url, card)
|
|
44333
44373
|
# [--project <id>] [--card <name>] [--json]
|
|
44334
44374
|
# no todo-id + --project (or $TODOFORAI_PROJECT_ID) = every todo
|
|
@@ -44422,6 +44462,10 @@ function parseCliArgs() {
|
|
|
44422
44462
|
mime: { type: "string" },
|
|
44423
44463
|
card: { type: "string" },
|
|
44424
44464
|
link: { type: "boolean", default: false },
|
|
44465
|
+
site: { type: "string" },
|
|
44466
|
+
public: { type: "boolean", default: false },
|
|
44467
|
+
rev: { type: "string" },
|
|
44468
|
+
off: { type: "boolean", default: false },
|
|
44425
44469
|
direction: { type: "string" },
|
|
44426
44470
|
"business-context": { type: "string" },
|
|
44427
44471
|
seed: { type: "string" },
|
|
@@ -47610,7 +47654,7 @@ Cancelled by user (Ctrl+C)
|
|
|
47610
47654
|
const [, filePath, todoArg] = positionals;
|
|
47611
47655
|
const todoId = todoArg || getEnv("TODO_ID") || cfgScope.data.last_todo_id;
|
|
47612
47656
|
if (!filePath || !todoId) {
|
|
47613
|
-
process.stderr.write(`${RED}Usage: tfa-cli show <file|-> [todo-id] [--title T] [--alias A] [--mime M] [--card <name>] [--link]${RESET}
|
|
47657
|
+
process.stderr.write(`${RED}Usage: tfa-cli show <file|-> [todo-id] [--title T] [--alias A] [--mime M] [--card <name>] [--link] [--site <id>] [--public]${RESET}
|
|
47614
47658
|
`);
|
|
47615
47659
|
process.exit(2);
|
|
47616
47660
|
}
|
|
@@ -47638,12 +47682,41 @@ Cancelled by user (Ctrl+C)
|
|
|
47638
47682
|
alias: args.alias,
|
|
47639
47683
|
mime: args.mime,
|
|
47640
47684
|
card: args.card,
|
|
47641
|
-
display: args.link ? "link" : undefined
|
|
47685
|
+
display: args.link ? "link" : undefined,
|
|
47686
|
+
site: args.site,
|
|
47687
|
+
public: args.public ? true : undefined
|
|
47642
47688
|
});
|
|
47643
47689
|
if (args.json)
|
|
47644
47690
|
console.log(JSON.stringify(res, null, 2));
|
|
47645
47691
|
else
|
|
47646
|
-
console.log(res.ref);
|
|
47692
|
+
console.log(res.siteUrl ? `${res.ref} site=${res.siteId} ${res.siteUrl}` : `${res.ref} site=${res.siteId}`);
|
|
47693
|
+
return;
|
|
47694
|
+
}
|
|
47695
|
+
if (positionals[0] === "show" && ["public", "get", "rm"].includes(positionals[1] ?? "")) {
|
|
47696
|
+
const sub = positionals[1];
|
|
47697
|
+
const id = positionals[2];
|
|
47698
|
+
if (!id) {
|
|
47699
|
+
process.stderr.write(`${RED}Usage: tfa-cli show public <site-id> [--off] | get <site-id> [out] [--rev <att>] | rm <site-id>${RESET}
|
|
47700
|
+
`);
|
|
47701
|
+
process.exit(2);
|
|
47702
|
+
}
|
|
47703
|
+
if (sub === "public") {
|
|
47704
|
+
const site = await api.patchSite(id, { isPublic: !args.off });
|
|
47705
|
+
console.log(site.url ?? `${site.id} (private)`);
|
|
47706
|
+
} else if (sub === "rm") {
|
|
47707
|
+
await api.deleteSite(id);
|
|
47708
|
+
process.stderr.write(`${GREEN}\u2705 deleted ${id}${RESET}
|
|
47709
|
+
`);
|
|
47710
|
+
} else {
|
|
47711
|
+
const bytes = await api.getSiteBytes(id, args.rev);
|
|
47712
|
+
const out = positionals[3];
|
|
47713
|
+
if (out && out !== "-") {
|
|
47714
|
+
await Bun.write(resolve3(out), bytes);
|
|
47715
|
+
process.stderr.write(`${GREEN}\u2705 ${out}${RESET}
|
|
47716
|
+
`);
|
|
47717
|
+
} else
|
|
47718
|
+
process.stdout.write(new Uint8Array(bytes));
|
|
47719
|
+
}
|
|
47647
47720
|
return;
|
|
47648
47721
|
}
|
|
47649
47722
|
if (positionals[0] === "open") {
|