@todoforai/tfa-surface 0.1.3 → 0.1.4

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/cli.js +8 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -116,7 +116,7 @@ function resolveToken(opts = {}) {
116
116
  // package.json
117
117
  var package_default = {
118
118
  name: "@todoforai/tfa-surface",
119
- version: "0.1.3",
119
+ version: "0.1.4",
120
120
  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
121
  type: "module",
122
122
  bin: {
@@ -163,7 +163,8 @@ Discovery:
163
163
 
164
164
  Surfaces — a ref is a todo id, <todoId>:<alias> (a shown artifact, live) or an http(s) url:
165
165
  open overlay <todoId> The full-page todo (todos only).
166
- open window <ref> A floating preview window (any ref).
166
+ open window <ref> [--detached] A floating preview window (any ref); --detached: out of
167
+ the grid, own size, resizable. connect:/stream: refs always are.
167
168
  open panel <view> [--todo <id>] [--url <url>]
168
169
  A todo's side panel: changes|agents|preview|browser|terminal
169
170
  (--todo defaults to $TODOFORAI_TODO_ID).
@@ -206,6 +207,7 @@ Examples:
206
207
  tfa-surface card add kpi-tile dashboards/kpi.html --title "KPI tile"
207
208
  tfa-surface open window 3f2a91...
208
209
  tfa-surface open window $TODOFORAI_TODO_ID:kpi # a shown artifact, in its own window
210
+ tfa-surface open window connect:<deviceId>/zele # a sign-in card for the user
209
211
  tfa-surface open card $TODOFORAI_TODO_ID:kpi --title "Weekly KPIs" --group marketing
210
212
  tfa-surface open panel browser --url https://example.com
211
213
  tfa-surface close card weekly-kpis
@@ -291,7 +293,7 @@ function printDescribe(d) {
291
293
  console.log(`sidebar: ${d.sidebar}`);
292
294
  console.log(d.surfaces.length ? "surfaces:" : "surfaces: []");
293
295
  for (const s of d.surfaces) {
294
- const flags = [s.focused ? "focused" : "", s.docked ? "docked" : "", s.view ?? "", s.group ? `in ${s.group}` : ""].filter(Boolean).join(", ");
296
+ const flags = [s.focused ? "focused" : "", s.docked ? "docked" : "", s.size ? `detached ${s.size.w}x${s.size.h}` : "", s.view ?? "", s.group ? `in ${s.group}` : ""].filter(Boolean).join(", ");
295
297
  const id = s.kind === "overlay" || s.id === s.ref ? "" : ` ${s.id}`;
296
298
  console.log(` ${s.kind}${id}: ${s.ref}${flags ? ` ${flags}` : ""}${s.title ? ` # ${s.title}` : ""}`);
297
299
  if (s.browser)
@@ -319,6 +321,7 @@ async function main() {
319
321
  "api-url": { type: "string" },
320
322
  "api-token": { type: "string" },
321
323
  json: { type: "boolean", default: false },
324
+ detached: { type: "boolean", default: false },
322
325
  help: { type: "boolean", short: "h", default: false },
323
326
  version: { type: "boolean", default: false }
324
327
  },
@@ -356,11 +359,11 @@ async function main() {
356
359
  }
357
360
  case "open": {
358
361
  const [kind, arg] = args;
359
- const usage = "usage: tfa-surface open overlay <todoId> | window <ref> | panel <view> [--todo <id>] [--url <url>] | card <ref> [--id <id>] [--title <t>] [--group <slug>]";
362
+ const usage = "usage: tfa-surface open overlay <todoId> | window <ref> [--detached] | panel <view> [--todo <id>] [--url <url>] | card <ref> [--id <id>] [--title <t>] [--group <slug>]";
360
363
  if (kind === "overlay" || kind === "window") {
361
364
  if (!arg)
362
365
  die(usage);
363
- const result = await uiCall(ctx, "surface.open", { kind, ref: arg });
366
+ const result = await uiCall(ctx, "surface.open", { kind, ref: arg, ...values.detached && { detached: true } });
364
367
  console.log(ctx.json ? JSON.stringify(result) : `${result.created ? "opened" : "already open"} (${kind})`);
365
368
  } else if (kind === "panel") {
366
369
  if (!arg)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todoforai/tfa-surface",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
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": {