@crossworks/client-types 0.232.385 → 0.234.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/package.json +1 -1
- package/src/dto/agent-graph.ts +11 -10
- package/src/dto/rows.ts +60 -0
- package/src/tree.ts +4 -0
package/package.json
CHANGED
package/src/dto/agent-graph.ts
CHANGED
|
@@ -81,16 +81,17 @@ export interface ToolDTO {
|
|
|
81
81
|
handler: ToolHandler;
|
|
82
82
|
requiresConfirm: boolean;
|
|
83
83
|
enabled: boolean;
|
|
84
|
-
/** "
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
|
|
84
|
+
/** "External access" on an outside tool (mcp or http): everyone a shared
|
|
85
|
+
* app that declares it reaches (members, clients, contacts on a contact
|
|
86
|
+
* link) may call it. Null when off. Set it with
|
|
87
|
+
* `PUT /api/tools/:id/external-access`. */
|
|
88
|
+
externalAccess?: ToolExternalAccessDTO | null;
|
|
88
89
|
createdAt: string;
|
|
89
90
|
updatedAt: string;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
/** The "
|
|
93
|
-
export interface
|
|
93
|
+
/** The "External access" switch of one tool, as the server reports it. */
|
|
94
|
+
export interface ToolExternalAccessDTO {
|
|
94
95
|
/** False when the handler changed after the admin confirmed it: the switch
|
|
95
96
|
* no longer counts and must be switched on again. */
|
|
96
97
|
on: boolean;
|
|
@@ -100,9 +101,9 @@ export interface ToolTeamAppsDTO {
|
|
|
100
101
|
by: { via: 'web' | 'mcp' | 'dev-tools'; actorId?: string; actorEmail?: string };
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
/** `PUT /api/tools/:id/
|
|
104
|
+
/** `PUT /api/tools/:id/external-access` body. Switching on needs
|
|
104
105
|
* `readOnlyConfirmed: true` (the admin confirms the tool only reads). */
|
|
105
|
-
export interface
|
|
106
|
+
export interface ToolExternalAccessBody {
|
|
106
107
|
allow: boolean;
|
|
107
108
|
readOnlyConfirmed?: boolean;
|
|
108
109
|
}
|
|
@@ -194,8 +195,8 @@ export interface ToolGroupDTO {
|
|
|
194
195
|
integration: ToolGroupIntegrationDTO | null;
|
|
195
196
|
enabled: boolean;
|
|
196
197
|
/** The group's level: an agent or a team app may hold it only at or above
|
|
197
|
-
* it, and team apps call only tools in an enabled group at team
|
|
198
|
-
* below. Absent from servers before it shipped. Set it with
|
|
198
|
+
* it, and team apps call only built-in tools in an enabled group at team
|
|
199
|
+
* level or below (outside tools follow External access instead). Absent from servers before it shipped. Set it with
|
|
199
200
|
* `PATCH /api/access/tool-groups/:slug { audience }`. */
|
|
200
201
|
audience?: AccessLevel;
|
|
201
202
|
createdAt: string;
|
package/src/dto/rows.ts
CHANGED
|
@@ -38,6 +38,11 @@ export type TaskRow = {
|
|
|
38
38
|
* it is what keeps a Done column from growing without bound. Orthogonal to
|
|
39
39
|
* `status`: an archived task keeps the status it had. */
|
|
40
40
|
archivedAt: string | null;
|
|
41
|
+
/** On a done task: the status it had before it was marked done, which a
|
|
42
|
+
* reopen (`PATCH {reopen: true}`) restores. Null when the brain does not
|
|
43
|
+
* know it (the reopen then lands on 'open') and on every task that is not
|
|
44
|
+
* done. Optional: brains before this field do not send it. */
|
|
45
|
+
statusBeforeDone?: TaskStatus | null;
|
|
41
46
|
createdAt: string;
|
|
42
47
|
updatedAt: string;
|
|
43
48
|
};
|
|
@@ -196,6 +201,61 @@ export type AppDetail = AppRow & {
|
|
|
196
201
|
manifest: AppManifest;
|
|
197
202
|
draftBuild: BuildRef | null;
|
|
198
203
|
publishedBuild: BuildRef | null;
|
|
204
|
+
/** When the draft last changed (ISO), null with no draft. The editor sends
|
|
205
|
+
* it back as `baseDraftUpdatedAt` on save, and the save answers 409 when
|
|
206
|
+
* the draft changed since (an agent or another window). Optional: absent
|
|
207
|
+
* from an older brain. */
|
|
208
|
+
draftUpdatedAt?: string | null;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* One entry on an app's History line (apps snapshots, Phase 2). A VERSION
|
|
213
|
+
* (`trigger` 'publish') is the code a publish made live; a SNAPSHOT (the
|
|
214
|
+
* owner's, or one taken automatically before a restore or a schema change)
|
|
215
|
+
* also holds a copy of the app's database. `seq` is the number the owner sees
|
|
216
|
+
* (v1, v2 …).
|
|
217
|
+
*/
|
|
218
|
+
export type AppSnapshot = {
|
|
219
|
+
id: string;
|
|
220
|
+
seq: number;
|
|
221
|
+
trigger:
|
|
222
|
+
'publish' | 'manual' | 'pre_restore' | 'pre_schema' | 'pre_delete' | 'pre_import' | 'nightly';
|
|
223
|
+
kind: 'version' | 'snapshot';
|
|
224
|
+
note: string | null;
|
|
225
|
+
actor: 'owner' | 'agent' | 'mcp' | 'system';
|
|
226
|
+
createdAt: string;
|
|
227
|
+
/** The seq this one's content was restored from, when it was. */
|
|
228
|
+
restoredFrom: number | null;
|
|
229
|
+
/** Whether it holds a copy of the database (a snapshot), and its size. */
|
|
230
|
+
hasData: boolean;
|
|
231
|
+
dbBytes: number | null;
|
|
232
|
+
/** The code it holds: files and their total size. */
|
|
233
|
+
fileCount: number;
|
|
234
|
+
sourceBytes: number;
|
|
235
|
+
/** Whether an unpublished draft was saved with it. */
|
|
236
|
+
hasDraft: boolean;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
/** What a restore puts back: code into the draft, the data, or both live. */
|
|
240
|
+
export type AppRestoreMode = 'code' | 'data' | 'full';
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* One entry on a table's History line (apps first-class plan, Phase 4). A
|
|
244
|
+
* `commit` entry is the published table a commit replaced (kept by
|
|
245
|
+
* itself, the newest 20); a `manual` one the owner took. Each holds a copy
|
|
246
|
+
* of the whole workbook. `seq` is the number the owner sees (v1, v2 …).
|
|
247
|
+
*/
|
|
248
|
+
export type TableSnapshot = {
|
|
249
|
+
id: string;
|
|
250
|
+
seq: number;
|
|
251
|
+
trigger: 'commit' | 'manual';
|
|
252
|
+
note: string | null;
|
|
253
|
+
actor: 'owner' | 'agent' | 'mcp' | 'system';
|
|
254
|
+
createdAt: string;
|
|
255
|
+
/** The table's version the copy holds (it counts commits). */
|
|
256
|
+
tableVersion: number | null;
|
|
257
|
+
/** The copy's size in bytes. */
|
|
258
|
+
bytes: number | null;
|
|
199
259
|
};
|
|
200
260
|
|
|
201
261
|
export type ProfilePreferences = {
|
package/src/tree.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* `@mantle/client-types/tree` subpath.
|
|
13
13
|
*/
|
|
14
14
|
import type { AccessLevel } from './dto/access';
|
|
15
|
+
import type { TaskStatus } from './dto/rows';
|
|
15
16
|
import type { AppTint } from './app-nav';
|
|
16
17
|
|
|
17
18
|
/** The kinds the tree serves, in navigation order. */
|
|
@@ -208,6 +209,9 @@ export type TreeItemState = 'private' | 'draft' | 'submitted' | 'returned' | 'wi
|
|
|
208
209
|
export type TreeItemMeta = {
|
|
209
210
|
/** A task marked done. */
|
|
210
211
|
done?: boolean;
|
|
212
|
+
/** A done task: the status a reopen restores, when the brain knows it.
|
|
213
|
+
* Absent otherwise (a reopen then lands on 'open'). */
|
|
214
|
+
reopensTo?: TaskStatus;
|
|
211
215
|
/** A task's due instant (ISO), when it has one. */
|
|
212
216
|
due?: string | null;
|
|
213
217
|
/** An event's start (ISO). */
|