@neta-art/cohub-cli 10.28.0 → 10.28.1

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/build.json CHANGED
@@ -1 +1 @@
1
- {"commit":"f563e3c","rootCommands":[["auth","Authentication management"],["boards","Read, write, animate and export Boards (by id or .board path)"],["profile","Manage your profile"],["me","Account-level data across your spaces"],["prompt [options] [content...]","Send or schedule a prompt in a space"],["completion [options] [content...]","Raw LLM completion with full message control"],["decision [options] [state...]","Answer yes/no, choice and score questions about text or images"],["spaces","Space management"],["labels","Manage personal labels"],["runtime","Connect a local workspace"],["generate [options] [prompt]","Generate multimodal outputs"],["models","List available LLM and multimodal models"],["prompts","Prompt template management"],["public","Upload and manage public Space files"],["skills","Skill management"],["search [options] [query]","Search spaces, chats, and label items"],["references","Inspect resource references (forks, mentions, tool calls, mods, file access)"],["referrals [options]","View and manage your referral link"],["tasks","Task runs"],["cron-jobs","Scheduled jobs"],["apps|works","App management"],["rooms","Take part in App rooms: join, read and publish events, set presence"],["feedback [options] [message...]","Send feedback or a bug report to the Cohub team"],["desktop","Drive the Cohub desktop that started this chat"],["version [options]","This CLI, the cohub on PATH, and the versions running Runtimes serve"]]}
1
+ {"commit":"ffe5450","rootCommands":[["auth","Authentication management"],["boards","Read, write, animate and export Boards (by id or .board path)"],["profile","Manage your profile"],["me","Account-level data across your spaces"],["prompt [options] [content...]","Send or schedule a prompt in a space"],["completion [options] [content...]","Raw LLM completion with full message control"],["decision [options] [state...]","Answer yes/no, choice and score questions about text or images"],["spaces","Space management"],["labels","Manage personal labels"],["runtime","Connect a local workspace"],["generate [options] [prompt]","Generate multimodal outputs"],["models","List available LLM and multimodal models"],["prompts","Prompt template management"],["public","Upload and manage public Space files"],["skills","Skill management"],["search [options] [query]","Search spaces, chats, and label items"],["references","Inspect resource references (forks, mentions, tool calls, mods, file access)"],["referrals [options]","View and manage your referral link"],["tasks","Task runs"],["cron-jobs","Scheduled jobs"],["apps|works","App management"],["rooms","Take part in App rooms: join, read and publish events, set presence"],["feedback [options] [message...]","Send feedback or a bug report to the Cohub team"],["desktop","Drive the Cohub desktop that started this chat"],["version [options]","This CLI, the cohub on PATH, and the versions running Runtimes serve"]]}
@@ -37969,7 +37969,7 @@ function diffBoardEdits(from, to, ids) {
37969
37969
  const BOARD_INPUT = {
37970
37970
  dragSlop: {
37971
37971
  mouse: 4,
37972
- touch: 8,
37972
+ touch: 12,
37973
37973
  pen: 8
37974
37974
  },
37975
37975
  tapMs: 300,
@@ -37984,6 +37984,7 @@ const BOARD_INPUT = {
37984
37984
  flingSampleMs: 80,
37985
37985
  flingDecay: .95,
37986
37986
  flingStop: .02,
37987
+ flingCatch: .1,
37987
37988
  swipeDistance: .2,
37988
37989
  swipeVelocity: .4,
37989
37990
  edgeZone: 32,
@@ -38854,8 +38855,9 @@ function createCameraModule(ctx) {
38854
38855
  motion = next;
38855
38856
  if (!frame) frame = requestAnimationFrame(step);
38856
38857
  }
38858
+ /** True when it halted a fling still fast enough that a press should only catch it. */
38857
38859
  function stop() {
38858
- const flinging = motion?.kind === "fling";
38860
+ const flinging = motion?.kind === "fling" && Math.hypot(motion.vx, motion.vy) >= BOARD_INPUT.flingCatch;
38859
38861
  motion = null;
38860
38862
  if (frame) cancelAnimationFrame(frame);
38861
38863
  frame = 0;
@@ -40005,6 +40007,7 @@ function createInteractionModule(ctx) {
40005
40007
  let travelled = false;
40006
40008
  let samples = [];
40007
40009
  let penSeen = false;
40010
+ let touchAway = false;
40008
40011
  function transformEnd(gesture, cancelled) {
40009
40012
  if (!transformListeners.size || !("moved" in gesture) || !gesture.moved) return;
40010
40013
  let event;
@@ -40022,7 +40025,7 @@ function createInteractionModule(ctx) {
40022
40025
  for (const listener of transformListeners) listener(event);
40023
40026
  }
40024
40027
  function activate(itemId, at, pointerType, selected) {
40025
- if (performance.now() - at > BOARD_INPUT.tapMs || !state.scene.get(itemId)) return;
40028
+ if (performance.now() - at > BOARD_INPUT.longPressMs || !state.scene.get(itemId)) return;
40026
40029
  for (const listener of activationListeners) listener({
40027
40030
  itemId,
40028
40031
  pointerType,
@@ -40035,8 +40038,11 @@ function createInteractionModule(ctx) {
40035
40038
  function movable(item) {
40036
40039
  return Boolean(item && !ctx.query.isLocked(item) && registry.capabilities(item).canMove);
40037
40040
  }
40038
- function opensOnTap(item) {
40039
- return registry.activation(item, browsing()) === "tap";
40041
+ function opensOnTap(item, pointerType = state.hoverPointerType) {
40042
+ return registry.activation(item, browsing(), pointerType) === "tap";
40043
+ }
40044
+ function handPicks(pointerType) {
40045
+ return isTouchLikePointer(pointerType) || options.readonly === true || options.handClick === "pick";
40040
40046
  }
40041
40047
  function holdsFrame(pointerType) {
40042
40048
  const view = ctx.frames.view();
@@ -40227,10 +40233,14 @@ function createInteractionModule(ctx) {
40227
40233
  function plainPrimary(event) {
40228
40234
  return event.button === 0 && !event.shiftKey && !event.metaKey && !event.ctrlKey && !event.altKey;
40229
40235
  }
40230
- function pressCard(event) {
40236
+ function opensNow(item, pointerType, hand) {
40237
+ if (!hand) return options.readonly === true || !ctx.selection.carries(item.id);
40238
+ return pointerType !== "mouse" || options.handClick !== "pick" || state.selection.includes(item.id);
40239
+ }
40240
+ function pressCard(event, hand = false) {
40231
40241
  if (!plainPrimary(event)) return false;
40232
40242
  const item = ctx.query.pickAt(event.world, event.pointerType);
40233
- if (!item || !options.readonly && ctx.selection.carries(item.id) || !opensOnTap(item)) return false;
40243
+ if (!item || !opensOnTap(item, event.pointerType) || !opensNow(item, event.pointerType, hand)) return false;
40234
40244
  state.interaction = {
40235
40245
  type: "pressing",
40236
40246
  itemId: item.id,
@@ -40248,7 +40258,7 @@ function createInteractionModule(ctx) {
40248
40258
  const dx = event.screen.x - gesture.start.x;
40249
40259
  const dy = event.screen.y - gesture.start.y;
40250
40260
  const item = state.scene.get(gesture.itemId);
40251
- if (!(!options.readonly && !ctx.frames.view()?.present && (state.tool === "select" || state.tool === "play") && movable(item))) {
40261
+ if (!(!touchAway && !options.readonly && !ctx.frames.view()?.present && (state.tool === "select" || state.tool === "play") && movable(item))) {
40252
40262
  state.interaction = {
40253
40263
  type: "panning",
40254
40264
  start: gesture.start,
@@ -40285,6 +40295,7 @@ function createInteractionModule(ctx) {
40285
40295
  const id = gesture.type === "pressing" ? gesture.itemId : gesture.type === "panning" && !gesture.moved ? gesture.tapSelection?.targetId : null;
40286
40296
  const item = id ? state.scene.get(id) : null;
40287
40297
  if (!movable(item)) return null;
40298
+ if (touchAway) ctx.chosenTool = null;
40288
40299
  state.selection = [item.id];
40289
40300
  state.tool = "select";
40290
40301
  state.interaction = {
@@ -40306,10 +40317,13 @@ function createInteractionModule(ctx) {
40306
40317
  const reach = portHitRadius("touch") / zoom;
40307
40318
  return visiblePorts().some((port) => Math.hypot(port.point.x - point.x, port.point.y - point.y) <= reach);
40308
40319
  }
40309
- function browseByTouch(event) {
40310
- if (options.readonly || event.pointerType !== "touch" || state.tool !== "select") return;
40311
- if (keepsSelection(event.world)) return;
40312
- if (ctx.chosenTool === "select" && state.selection.length === 0) return;
40320
+ /** A touch away from the selection browses like the hand; only a tap there drops the selection. */
40321
+ function touchesAway(event) {
40322
+ if (options.readonly || event.pointerType !== "touch" || state.tool !== "select") return false;
40323
+ if (keepsSelection(event.world)) return false;
40324
+ return ctx.chosenTool !== "select" || state.selection.length > 0;
40325
+ }
40326
+ function returnToHand() {
40313
40327
  state.selection = [];
40314
40328
  state.tool = "hand";
40315
40329
  ctx.chosenTool = null;
@@ -40369,6 +40383,7 @@ function createInteractionModule(ctx) {
40369
40383
  pointerType: event.pointerType
40370
40384
  };
40371
40385
  travelled = false;
40386
+ touchAway = false;
40372
40387
  samples = [];
40373
40388
  if (event.pointerType === "pen") penSeen = true;
40374
40389
  const touch = isTouchLikePointer(event.pointerType);
@@ -40392,14 +40407,15 @@ function createInteractionModule(ctx) {
40392
40407
  };
40393
40408
  return;
40394
40409
  }
40395
- browseByTouch(event);
40410
+ touchAway = touchesAway(event);
40396
40411
  const { tool, spaceHeld } = state;
40397
40412
  if (tool === "play") return play(event);
40398
40413
  const additive = event.shiftKey || event.metaKey || event.ctrlKey;
40399
- if (!spaceHeld && (tool === "hand" || options.readonly) && pressCard(event)) return;
40414
+ const hand = tool === "hand" || touchAway;
40415
+ if (!spaceHeld && (hand || options.readonly) && pressCard(event, hand)) return;
40400
40416
  const fingerOnPenCanvas = tool === "draw" && event.pointerType === "touch" && penSeen;
40401
- if (tool === "hand" || spaceHeld || event.button === 1 || fingerOnPenCanvas) {
40402
- const picks = tool === "hand" && !spaceHeld && event.button === 0 && (touch || options.readonly);
40417
+ if (hand || spaceHeld || event.button === 1 || fingerOnPenCanvas) {
40418
+ const picks = hand && !spaceHeld && event.button === 0 && handPicks(event.pointerType);
40403
40419
  state.interaction = {
40404
40420
  type: "panning",
40405
40421
  start: event.screen,
@@ -40540,7 +40556,7 @@ function createInteractionModule(ctx) {
40540
40556
  at,
40541
40557
  select: [item.id]
40542
40558
  };
40543
- if (plainPrimary(event) && opensOnTap(item) && (!selected || selection.length === 1)) tap = {
40559
+ if (plainPrimary(event) && opensOnTap(item, event.pointerType) && (!selected || selection.length === 1)) tap = {
40544
40560
  at,
40545
40561
  activate: item.id
40546
40562
  };
@@ -40867,6 +40883,7 @@ function createInteractionModule(ctx) {
40867
40883
  if (Math.abs(state.camera.zoom / gesture.origin.zoom - 1) > .01) ctx.frames.refit(true);
40868
40884
  else ctx.frames.swipe(event.screen.x - gesture.start.x, event.screen.y - gesture.start.y, vx, vy);
40869
40885
  } else if (tap && !gesture.moved) {
40886
+ if (touchAway) returnToHand();
40870
40887
  const target = tap.targetId && state.scene.get(tap.targetId) ? tap.targetId : null;
40871
40888
  if (tap.additive && target) ctx.selection.toggle(target);
40872
40889
  else state.selection = target ? [target] : [];
@@ -40878,7 +40895,8 @@ function createInteractionModule(ctx) {
40878
40895
  break;
40879
40896
  }
40880
40897
  case "pressing":
40881
- activate(gesture.itemId, gesture.at, gesture.pointerType, false);
40898
+ if (touchAway) returnToHand();
40899
+ activate(gesture.itemId, gesture.at, gesture.pointerType, state.selection.includes(gesture.itemId));
40882
40900
  break;
40883
40901
  case "translating":
40884
40902
  if (gesture.moved) land(gesture);
@@ -40957,6 +40975,7 @@ function createInteractionModule(ctx) {
40957
40975
  } : null;
40958
40976
  }),
40959
40977
  opensOnTap,
40978
+ handPicks,
40960
40979
  pointerDown,
40961
40980
  pointerMove,
40962
40981
  pointerUp,
@@ -42240,6 +42259,7 @@ function createBoardEditor(options) {
42240
42259
  itemAt: tracked(["scene", "camera"], query.itemAt),
42241
42260
  pickAt: tracked(["scene", "camera"], query.pickAt),
42242
42261
  opensOnTap: tracked(["scene"], interaction.opensOnTap),
42262
+ handPicks: interaction.handPicks,
42243
42263
  itemById: tracked(["scene"], query.itemById),
42244
42264
  labelItemAt: tracked([
42245
42265
  "scene",
@@ -11252,7 +11252,7 @@ attach: attachAppEmbed },
11252
11252
  };
11253
11253
  }
11254
11254
  };
11255
- const USERNAME_PATTERN = /^(?!-)(?!.*--)[a-z0-9-]{1,39}(?<!-)$/;
11255
+ const USERNAME_PATTERN = /^(?!.*--)[a-z0-9](?:[a-z0-9-]{0,37}[a-z0-9])?$/;
11256
11256
  const SPACE_SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9_-]{0,78}[a-z0-9])?$/;
11257
11257
  /**
11258
11258
  * Platform-owned path segments that must not be newly assigned to public
@@ -1,5 +1,5 @@
1
1
  import { C as MODEL_THINKING_LEVELS, i as isApprovalMode, t as APPROVAL_MODES, w as isModelThinkingLevel, x as harnessSchema } from "./runtime.js";
2
- import { C as error, Ct as splitDisplayText, D as json, E as handleHttp, M as truncateText, N as warn, O as jsonRequested, St as normalizeDisplayPoint, T as formatLocalDateTime, _ as failSpaceTarget, _t as displayActStepSchema, b as resolveSpace, bt as DISPLAY_SYSTEM_ACTIONS, ct as buildSpaceInvitePath, dt as localWorkspaceHttpError, g as explicitSpace, gt as DISPLAY_RECORDINGS_DIR, ht as DISPLAY_HANDOVER_WAIT_MS, j as table, k as ok, mt as DISPLAY_HANDOVER_MAX_MS, pt as DISPLAY_HANDOVER_DEFAULT_MS, r as createRealtimeClient, t as createClient, ut as LocalWorkspaceUnavailableError, vt as DISPLAY_ELEMENT_REF_PATTERN, w as formatEpochMs, x as resolveSpaceRef, yt as DISPLAY_ELEMENT_ROLES } from "./client.js";
2
+ import { C as error, Ct as splitDisplayText, D as json, E as handleHttp, L as authSource, M as truncateText, N as warn, O as jsonRequested, St as normalizeDisplayPoint, T as formatLocalDateTime, _ as failSpaceTarget, _t as displayActStepSchema, b as resolveSpace, bt as DISPLAY_SYSTEM_ACTIONS, ct as buildSpaceInvitePath, dt as localWorkspaceHttpError, g as explicitSpace, gt as DISPLAY_RECORDINGS_DIR, ht as DISPLAY_HANDOVER_WAIT_MS, j as table, k as ok, mt as DISPLAY_HANDOVER_MAX_MS, pt as DISPLAY_HANDOVER_DEFAULT_MS, r as createRealtimeClient, t as createClient, ut as LocalWorkspaceUnavailableError, vt as DISPLAY_ELEMENT_REF_PATTERN, w as formatEpochMs, x as resolveSpaceRef, yt as DISPLAY_ELEMENT_ROLES } from "./client.js";
3
3
  import { n as uploadChatImageAsset, o as UPLOAD_MAX_FILE_BYTES, r as uploadLikeStickerAsset, t as uploadAvatarAsset } from "./avatar.js";
4
4
  import { o as mimeTypeForPath } from "./id.js";
5
5
  import { d as normalizeRequestSource, l as joinApiUrl, p as isUuidLike } from "./app-realtime.js";
@@ -1536,6 +1536,7 @@ function registerSpaceWallet(spaces) {
1536
1536
  ]);
1537
1537
  console.log(`Public funding: ${value.publicFunding ? "on" : "off"}`);
1538
1538
  if (value.transfer) console.log(`Transferable balance: ${usd(value.transfer.allowanceUsd)} (whole dollars, ${usd(value.transfer.minUsd)}–${usd(value.transfer.maxUsd)})`);
1539
+ else console.log(authSource() === "execution-token" ? "Transferable balance: requires a signed-in user session (unset COHUB_EXECUTION_TOKEN, then run `cohub auth login`)" : "Transferable balance: unavailable");
1539
1540
  } catch (cause) {
1540
1541
  handleHttp(cause);
1541
1542
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub-cli",
3
- "version": "10.28.0",
3
+ "version": "10.28.1",
4
4
  "description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -33,7 +33,7 @@
33
33
  "@fontsource-variable/figtree": "^5.3.0",
34
34
  "@fontsource-variable/geist": "^5.3.0",
35
35
  "@fontsource-variable/geist-mono": "^5.3.0",
36
- "@neta-art/cohub": "13.19.0",
36
+ "@neta-art/cohub": "13.20.0",
37
37
  "@types/node": "26.6.4",
38
38
  "@types/ws": "^8.18.1",
39
39
  "commander": "^15.0.0",