@todoforai/tfa-surface 0.1.4 → 0.1.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/dist/cli.js +6 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10,6 +10,9 @@ import { readFileSync, writeFileSync, mkdirSync, chmodSync } from "node:fs";
|
|
|
10
10
|
import { join, dirname } from "node:path";
|
|
11
11
|
import { homedir, platform } from "node:os";
|
|
12
12
|
var DEFAULT_API_URL = "https://api.todofor.ai";
|
|
13
|
+
function runActorToken() {
|
|
14
|
+
return process.env.TODOFORAI_USER_ID ? process.env.TODOFORAI_API_TOKEN || "" : "";
|
|
15
|
+
}
|
|
13
16
|
function normalizeApiUrl(url) {
|
|
14
17
|
if (url.startsWith("localhost"))
|
|
15
18
|
return `http://${url}`;
|
|
@@ -67,6 +70,8 @@ async function refreshDeviceToken(opts = {}) {
|
|
|
67
70
|
const apiUrl = normalizeApiUrl(opts.apiUrl || envUrl || stored.apiUrl || DEFAULT_API_URL);
|
|
68
71
|
if (!stored.deviceId || !stored.deviceSecret)
|
|
69
72
|
return "";
|
|
73
|
+
if (runActorToken())
|
|
74
|
+
return "";
|
|
70
75
|
if (stored.apiUrl && normalizeApiUrl(stored.apiUrl) !== apiUrl)
|
|
71
76
|
return "";
|
|
72
77
|
try {
|
|
@@ -116,7 +121,7 @@ function resolveToken(opts = {}) {
|
|
|
116
121
|
// package.json
|
|
117
122
|
var package_default = {
|
|
118
123
|
name: "@todoforai/tfa-surface",
|
|
119
|
-
version: "0.1.
|
|
124
|
+
version: "0.1.5",
|
|
120
125
|
description: "TODOforAI surface CLI — see and drive what is shown in the user's live UI (describe, todo/panel views, renderer cards, surface render, controls). Replaces tfa-frontend. Reuses bridge credentials.",
|
|
121
126
|
type: "module",
|
|
122
127
|
bin: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@todoforai/tfa-surface",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "TODOforAI surface CLI — see and drive what is shown in the user's live UI (describe, todo/panel views, renderer cards, surface render, controls). Replaces tfa-frontend. Reuses bridge credentials.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|