@crossworks/client-types 0.500.35 → 0.500.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossworks/client-types",
3
- "version": "0.500.35",
3
+ "version": "0.500.37",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/agent-ui.ts CHANGED
@@ -23,9 +23,30 @@ export const AGENT_UI_CALL_TTL_MS = 15_000;
23
23
  /** The largest result the window may answer with: its JSON, in bytes. */
24
24
  export const AGENT_UI_RESULT_MAX_BYTES = 64 * 1024;
25
25
 
26
+ /** The largest result that carries a picture (`ui_look`): its JSON, in
27
+ * bytes. The picture itself is at most AGENT_UI_LOOK_IMAGE_MAX_BYTES. */
28
+ export const AGENT_UI_LOOK_MAX_BYTES = 1.5 * 1024 * 1024;
29
+
30
+ /** The largest picture `ui_look` hands the model, decoded bytes. */
31
+ export const AGENT_UI_LOOK_IMAGE_MAX_BYTES = 1024 * 1024;
32
+
33
+ /** The picture's size: the long side at most this many pixels... */
34
+ export const AGENT_UI_LOOK_MAX_SIDE = 1568;
35
+ /** ...and at most this many pixels in all (about 1,500 image tokens on
36
+ * Claude, which resizes anything larger; never scaled up). */
37
+ export const AGENT_UI_LOOK_MAX_PIXELS = 1_150_000;
38
+
39
+ /** What `ui_look` pictures: the main work area (the default), the whole
40
+ * window, or one element by its `ui_screen` ref. */
41
+ export type AgentUiLookScope = 'work' | 'window' | 'ref';
42
+
43
+ /** The picture in a `look` result. */
44
+ export type AgentUiLookImage = { mimeType: 'image/png' | 'image/jpeg'; base64: string };
45
+
26
46
  /** The actions a ui tool asks of the window (the tool is `ui_<action>`). */
27
47
  export const AGENT_UI_ACTIONS = [
28
48
  'screen',
49
+ 'look',
29
50
  'navigate',
30
51
  'click',
31
52
  'type',
@@ -99,7 +99,7 @@ export interface ToolExternalAccessDTO {
99
99
  /** When the admin confirmed the tool only reads (ISO time). */
100
100
  confirmedReadOnlyAt: string;
101
101
  /** Who switched it on. */
102
- by: { via: 'web' | 'mcp' | 'dev-tools'; actorId?: string; actorEmail?: string };
102
+ by: { via: 'web' | 'mcp' | 'dev-tools' | 'pending'; actorId?: string; actorEmail?: string };
103
103
  }
104
104
 
105
105
  /** `PUT /api/tools/:id/external-access` body. Switching on needs
package/src/dto/shell.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * /api/client/shell answer 410 code gone.
7
7
  */
8
8
  import type { TreeKind } from '../tree';
9
+ import type { AppTint } from '../app-nav';
9
10
  import type { LoginRole } from '../role-names';
10
11
  import type { ShellWorkspace, WorkspaceArea } from './workspaces';
11
12
 
@@ -52,8 +53,13 @@ export type Shell = {
52
53
  noAutoTables?: boolean;
53
54
  displayName: string | null;
54
55
  email: string | null;
55
- /** The login's starred screens. [] when none. */
56
+ /** The login's starred screens. [] when none. An entry is a screen's
57
+ * href, or `/n/<id>` for a workspace item. */
56
58
  navFavorites: string[];
59
+ /** The `/n/<id>` entries of navFavorites that the login can open now,
60
+ * with what the rail shows. An entry not here is hidden (deleted, or no
61
+ * longer read). Absent from a brain before it: screens only. */
62
+ navFavoriteItems?: NavFavoriteItem[];
57
63
  /** The kinds served as the item tree: the admin tree (/api/tree/:kind) for
58
64
  * an admin, the reader tree for a member or a client. */
59
65
  treeKinds: TreeKind[];
@@ -71,3 +77,15 @@ export type Shell = {
71
77
  logoVersion: string | null;
72
78
  logoDarkVersion: string | null;
73
79
  };
80
+
81
+ /** One favorite workspace item, as the rail shows it. */
82
+ export type NavFavoriteItem = {
83
+ /** The stored entry: `/n/<id>`. */
84
+ href: string;
85
+ id: string;
86
+ kind: TreeKind;
87
+ title: string;
88
+ /** An emoji or `lucide:<name>`; null = the kind's icon. */
89
+ icon: string | null;
90
+ color: AppTint | null;
91
+ };
package/src/dto/turns.ts CHANGED
@@ -176,8 +176,8 @@ export interface AskHumanForm {
176
176
  questions: AskHumanFormQuestion[];
177
177
  }
178
178
 
179
- /** One answered sub-question, as submitted to `PATCH /api/pending/:id` and
180
- * `pending_approve`. `question` is the form question's `id`. */
179
+ /** One answered sub-question, as submitted to `PATCH /api/pending/:id`.
180
+ * `question` is the form question's `id`. */
181
181
  export interface AskHumanFormAnswer {
182
182
  question: string;
183
183
  selected: string[];
package/src/index.ts CHANGED
@@ -269,7 +269,7 @@ export type {
269
269
  WorkspaceUsersResponse,
270
270
  } from './dto/workspaces';
271
271
  // GET /api/shell: the one shell, for every login.
272
- export type { Shell, ShellFeatures, ShellRole } from './dto/shell';
272
+ export type { NavFavoriteItem, Shell, ShellFeatures, ShellRole } from './dto/shell';
273
273
  // GET and PUT /api/profile/home-desk: the login's Desk, compare-and-set.
274
274
  export type { HomeDesk, HomeDeskItem, HomeDeskPutBody, HomeDeskState } from './dto/home-desk';
275
275
  export type {