@crossworks/client-types 0.239.47 → 0.239.51
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 +1 -1
- package/src/app-nav.ts +14 -0
- package/src/dto/agent-graph.ts +9 -2
- package/src/dto/member-apps.ts +7 -1
- package/src/dto/member-mcp.ts +15 -0
- package/src/dto/rows.ts +14 -2
- package/src/index.ts +1 -1
package/package.json
CHANGED
package/src/app-nav.ts
CHANGED
|
@@ -100,6 +100,13 @@ export type AppOpenStat = { n: number; at: string };
|
|
|
100
100
|
|
|
101
101
|
/** Slim app row for navigation surfaces: everything the tree needs to render
|
|
102
102
|
* and search, nothing it doesn't. */
|
|
103
|
+
/**
|
|
104
|
+
* What the VIEWER may do with an app's data (team apps Phase 3): read only,
|
|
105
|
+
* or read and change. The brain works it out per viewer with the same rule
|
|
106
|
+
* its database brokers apply; a client only shows it (the R and R/W pill).
|
|
107
|
+
*/
|
|
108
|
+
export type AppDataAccess = 'read' | 'read_write';
|
|
109
|
+
|
|
103
110
|
export type AppNavItem = {
|
|
104
111
|
id: string;
|
|
105
112
|
title: string;
|
|
@@ -111,6 +118,13 @@ export type AppNavItem = {
|
|
|
111
118
|
* Differs from AppRow.hasBuild, which is published-only. */
|
|
112
119
|
hasBuild: boolean;
|
|
113
120
|
updatedAt: string;
|
|
121
|
+
/** What the admin viewing the sidebar may do with the app's data: the
|
|
122
|
+
* owner broker always writes, so 'read_write'. Absent from an older brain
|
|
123
|
+
* (show no pill). */
|
|
124
|
+
dataAccess?: AppDataAccess;
|
|
125
|
+
/** The app's MCP access switch (team apps Phase 1): members' and clients'
|
|
126
|
+
* MCP may reach its data. Absent from an older brain. */
|
|
127
|
+
mcpAccess?: boolean;
|
|
114
128
|
};
|
|
115
129
|
|
|
116
130
|
/** GET /api/app-nav — the whole sidebar in one round-trip. `nav` is already
|
package/src/dto/agent-graph.ts
CHANGED
|
@@ -84,7 +84,10 @@ export interface ToolDTO {
|
|
|
84
84
|
/** "External access" on an outside tool (mcp or http): everyone a shared
|
|
85
85
|
* app that declares it reaches (members, clients, contacts on a contact
|
|
86
86
|
* link) may call it. Null when off. Set it with
|
|
87
|
-
* `PUT /api/tools/:id/external-access`.
|
|
87
|
+
* `PUT /api/tools/:id/external-access`. On a CONNECTOR tool (mcp) since
|
|
88
|
+
* team apps Phase 2 it is the READ-ONLY MARK: the connector's level
|
|
89
|
+
* decides who may use the tool, and on = a read, off = a write (apps
|
|
90
|
+
* may write; a login's MCP needs its Write switch). */
|
|
88
91
|
externalAccess?: ToolExternalAccessDTO | null;
|
|
89
92
|
createdAt: string;
|
|
90
93
|
updatedAt: string;
|
|
@@ -196,7 +199,11 @@ export interface ToolGroupDTO {
|
|
|
196
199
|
enabled: boolean;
|
|
197
200
|
/** The group's level: an agent or a team app may hold it only at or above
|
|
198
201
|
* it, and team apps call only built-in tools in an enabled group at team
|
|
199
|
-
* level or below
|
|
202
|
+
* level or below. A CONNECTOR group's level also decides who may use its
|
|
203
|
+
* tools in apps and over their own MCP (team apps Phase 2): members at
|
|
204
|
+
* team level or lower, clients at client level, contact links at
|
|
205
|
+
* public; single http tools follow External access. Absent from servers
|
|
206
|
+
* before it shipped. Set it with
|
|
200
207
|
* `PATCH /api/access/tool-groups/:slug { audience }`. */
|
|
201
208
|
audience?: AccessLevel;
|
|
202
209
|
createdAt: string;
|
package/src/dto/member-apps.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* shares one. A CLIENT login runs apps at client level only (client logins
|
|
7
7
|
* C6, /api/client/apps).
|
|
8
8
|
*/
|
|
9
|
-
import type { AppTint } from '../app-nav';
|
|
9
|
+
import type { AppDataAccess, AppTint } from '../app-nav';
|
|
10
10
|
import type { AccessLevel } from './access';
|
|
11
11
|
|
|
12
12
|
/** The app levels a member may run: team and below (never admin). */
|
|
@@ -27,6 +27,9 @@ export type MemberAppCard = {
|
|
|
27
27
|
* app answers 403 `{ ok: false, error, reason: 'read-only' }`. Absent from
|
|
28
28
|
* an older brain: read as `audience !== 'team'`. */
|
|
29
29
|
dataReadOnly?: boolean;
|
|
30
|
+
/** The same, as the R and R/W pill shows it (team apps Phase 3). Absent
|
|
31
|
+
* from an older brain: show no pill. */
|
|
32
|
+
dataAccess?: AppDataAccess;
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
/**
|
|
@@ -71,6 +74,9 @@ export type ClientAppCard = {
|
|
|
71
74
|
description: string | null;
|
|
72
75
|
updatedAt: string;
|
|
73
76
|
dataReadOnly: boolean;
|
|
77
|
+
/** What the client may do with the app's data, as the R and R/W pill
|
|
78
|
+
* shows it (team apps Phase 3). Absent from an older brain. */
|
|
79
|
+
dataAccess?: AppDataAccess;
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
/** GET /api/client/apps: the apps a client may run, by title. The run routes
|
package/src/dto/member-mcp.ts
CHANGED
|
@@ -27,4 +27,19 @@ export type MemberMcpView = {
|
|
|
27
27
|
access: { enabled: boolean; writeEnabled: boolean };
|
|
28
28
|
/** The clients this member connected, never another login's. */
|
|
29
29
|
clients: MemberMcpClient[];
|
|
30
|
+
/** The connectors (outside data sources) open at the member's level (team
|
|
31
|
+
* apps Phase 2): their MCP and their apps may use these tools. Read
|
|
32
|
+
* tools carry the admin's read-only mark; write tools need Write on
|
|
33
|
+
* over MCP. Absent from a brain before Phase 2. */
|
|
34
|
+
connectors?: MemberMcpConnector[];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** One connector open to the member. */
|
|
38
|
+
export type MemberMcpConnector = {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
/** The connector's level: team, client or public. */
|
|
42
|
+
level: string;
|
|
43
|
+
readTools: number;
|
|
44
|
+
writeTools: number;
|
|
30
45
|
};
|
package/src/dto/rows.ts
CHANGED
|
@@ -198,6 +198,18 @@ export type AppRow = {
|
|
|
198
198
|
* `{ mcpAccess }`. Absent from an older brain: read as false (and the
|
|
199
199
|
* switch is not shown). */
|
|
200
200
|
mcpAccess?: boolean;
|
|
201
|
+
/** The author ceiling (team apps Phase 3, migration 0235): 'team' = the
|
|
202
|
+
* app runs its tools at team rules for every runner, admins too (a
|
|
203
|
+
* member wrote it, or its code came from a copy, an import or a
|
|
204
|
+
* member-era restore). An admin lifts it with PATCH /api/apps/:id
|
|
205
|
+
* `{ trustTools: true }` after reading its tools. Absent from an older
|
|
206
|
+
* brain: read as 'admin'. */
|
|
207
|
+
authorLevel?: 'admin' | 'team';
|
|
208
|
+
/** True once the app ever ran at the ceiling (a member built it, or a
|
|
209
|
+
* copy, an import or a restore capped it): the admin's "Trust its tools"
|
|
210
|
+
* switch shows on its page, on or off (migration 0236). Absent from an
|
|
211
|
+
* older brain. */
|
|
212
|
+
authorCeilingSeen?: boolean;
|
|
201
213
|
createdAt: string;
|
|
202
214
|
updatedAt: string;
|
|
203
215
|
};
|
|
@@ -238,7 +250,7 @@ export type AppSnapshot = {
|
|
|
238
250
|
| 'pre_mcp_write';
|
|
239
251
|
kind: 'version' | 'snapshot';
|
|
240
252
|
note: string | null;
|
|
241
|
-
actor: 'owner' | 'agent' | 'mcp' | 'system';
|
|
253
|
+
actor: 'owner' | 'agent' | 'mcp' | 'system' | 'member';
|
|
242
254
|
createdAt: string;
|
|
243
255
|
/** The seq this one's content was restored from, when it was. */
|
|
244
256
|
restoredFrom: number | null;
|
|
@@ -266,7 +278,7 @@ export type TableSnapshot = {
|
|
|
266
278
|
seq: number;
|
|
267
279
|
trigger: 'commit' | 'manual';
|
|
268
280
|
note: string | null;
|
|
269
|
-
actor: 'owner' | 'agent' | 'mcp' | 'system';
|
|
281
|
+
actor: 'owner' | 'agent' | 'mcp' | 'system' | 'member';
|
|
270
282
|
createdAt: string;
|
|
271
283
|
/** The table's version the copy holds (it counts commits). */
|
|
272
284
|
tableVersion: number | null;
|
package/src/index.ts
CHANGED
|
@@ -120,7 +120,7 @@ export type {
|
|
|
120
120
|
MemberInviteRow,
|
|
121
121
|
MemberInviteState,
|
|
122
122
|
} from './dto/member-invites';
|
|
123
|
-
export type { MemberMcpClient, MemberMcpView } from './dto/member-mcp';
|
|
123
|
+
export type { MemberMcpClient, MemberMcpConnector, MemberMcpView } from './dto/member-mcp';
|
|
124
124
|
export type { MemberItemKind, ClientItemKind, ClientItemFilter } from './member-kinds';
|
|
125
125
|
export type {
|
|
126
126
|
LoginKind,
|