@qvac/core 1.0.0-rc.6 → 1.0.0-rc.7

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 (48) hide show
  1. package/dist-lib/lib/api/agents.js +5 -2
  2. package/dist-lib/lib/api/approval-rules.js +8 -5
  3. package/dist-lib/lib/api/chat.d.ts +1 -2
  4. package/dist-lib/lib/api/chat.js +4 -18
  5. package/dist-lib/lib/api/index.d.ts +0 -1
  6. package/dist-lib/lib/api/index.js +1 -2
  7. package/dist-lib/lib/api/mesh.d.ts +1 -1
  8. package/dist-lib/lib/api/mesh.js +1 -1
  9. package/dist-lib/lib/api/sync.js +12 -2
  10. package/dist-lib/lib/assistant.d.ts +0 -1
  11. package/dist-lib/lib/assistant.js +10 -13
  12. package/dist-lib/lib/core/archived-mesh.d.ts +1 -0
  13. package/dist-lib/lib/core/archived-mesh.js +11 -14
  14. package/dist-lib/lib/core/chat-copy.d.ts +0 -1
  15. package/dist-lib/lib/core/chat-copy.js +1 -2
  16. package/dist-lib/lib/core/chat-move.d.ts +3 -1
  17. package/dist-lib/lib/core/chat-move.js +5 -2
  18. package/dist-lib/lib/core/contract/joined-meshes.js +2 -1
  19. package/dist-lib/lib/core/local/index.d.ts +2 -1
  20. package/dist-lib/lib/core/local/index.js +3 -2
  21. package/dist-lib/lib/core/public-mesh.d.ts +6 -8
  22. package/dist-lib/lib/core/public-mesh.js +19 -29
  23. package/dist-lib/lib/core/sync/index.js +1 -1
  24. package/dist-lib/lib/core.d.ts +15 -8
  25. package/dist-lib/lib/core.js +219 -203
  26. package/dist-lib/lib/errors.d.ts +4 -12
  27. package/dist-lib/lib/errors.js +4 -12
  28. package/dist-lib/schema/engine.js +10 -3
  29. package/dist-lib/schema/local.js +4 -2
  30. package/dist-lib/schema/qvac.js +2 -1
  31. package/dist-lib/spec/capabilities.d.ts +2 -2
  32. package/dist-lib/spec/hrpc/hrpc.json +1 -1
  33. package/dist-lib/spec/hrpc/index.js +1 -1
  34. package/dist-lib/spec/hrpc/messages.js +273 -250
  35. package/dist-lib/spec/hyperschema/index.js +273 -250
  36. package/dist-lib/spec/hyperschema/schema.json +27 -6
  37. package/dist-lib/spec/hyperschema/types.d.ts +7 -1
  38. package/dist-lib/spec/local/hyperdb/messages.js +26 -12
  39. package/dist-lib/spec/local/hyperschema/index.js +13 -6
  40. package/dist-lib/spec/local/hyperschema/schema.json +10 -0
  41. package/dist-lib/spec/local/hyperschema/types.d.ts +2 -0
  42. package/dist-lib/spec/mesh/hyperdb/messages.js +30 -6
  43. package/dist-lib/spec/mesh/hyperdispatch/messages.js +15 -3
  44. package/dist-lib/spec/mesh/hyperschema/index.js +15 -3
  45. package/dist-lib/spec/mesh/hyperschema/schema.json +5 -0
  46. package/dist-lib/spec/mesh/hyperschema/types.d.ts +1 -0
  47. package/package.json +1 -1
  48. package/tui/app.mjs +47 -12
@@ -131,18 +131,14 @@ declare const DEFINITIONS: {
131
131
  readonly code: 100127;
132
132
  readonly message: (max: number) => string;
133
133
  };
134
- readonly OWN_WORKSPACE_INVITE_REFUSED: {
135
- readonly code: 100128;
136
- readonly message: () => string;
137
- };
138
- readonly OWN_WORKSPACE_LEAVE_REFUSED: {
139
- readonly code: 100129;
140
- readonly message: () => string;
141
- };
142
134
  readonly COMPUTE_MESH_RETIRED: {
143
135
  readonly code: 100130;
144
136
  readonly message: () => string;
145
137
  };
138
+ readonly ROUTE_NEEDS_WORKSPACE: {
139
+ readonly code: 100131;
140
+ readonly message: (route: string) => string;
141
+ };
146
142
  readonly INVITE_INVALID: {
147
143
  readonly code: 100201;
148
144
  readonly message: () => string;
@@ -487,10 +483,6 @@ declare const DEFINITIONS: {
487
483
  readonly code: 100726;
488
484
  readonly message: (chunkId: string) => string;
489
485
  };
490
- readonly CHAT_PROJECT_OTHER_WORKSPACE: {
491
- readonly code: 100727;
492
- readonly message: () => string;
493
- };
494
486
  readonly CHAT_AGENT_SWITCH_NO_DEVICE: {
495
487
  readonly code: 100728;
496
488
  readonly message: () => string;
@@ -105,18 +105,14 @@ const DEFINITIONS = {
105
105
  code: 100127,
106
106
  message: (max) => `A project order holds at most ${max} projects`
107
107
  },
108
- OWN_WORKSPACE_INVITE_REFUSED: {
109
- code: 100128,
110
- message: () => 'Your own workspace is yours alone: invite people into another workspace'
111
- },
112
- OWN_WORKSPACE_LEAVE_REFUSED: {
113
- code: 100129,
114
- message: () => 'Your own workspace cannot be left'
115
- },
116
108
  COMPUTE_MESH_RETIRED: {
117
109
  code: 100130,
118
110
  message: () => 'Compute meshes are retired: a model runs on the device that asks'
119
111
  },
112
+ ROUTE_NEEDS_WORKSPACE: {
113
+ code: 100131,
114
+ message: (route) => `${route} reads and writes a workspace: name a workspace's meshId, not the account's`
115
+ },
120
116
  INVITE_INVALID: { code: 100201, message: () => 'Invalid mesh invite' },
121
117
  MESH_JOIN_CANCELED: { code: 100202, message: () => 'Mesh join canceled' },
122
118
  JOIN_NOT_PERMITTED: {
@@ -401,10 +397,6 @@ const DEFINITIONS = {
401
397
  code: 100726,
402
398
  message: (chunkId) => `model-request ${chunkId} has already ended`
403
399
  },
404
- CHAT_PROJECT_OTHER_WORKSPACE: {
405
- code: 100727,
406
- message: () => "a chat links only projects of its own workspace: start one in the project's"
407
- },
408
400
  CHAT_AGENT_SWITCH_NO_DEVICE: {
409
401
  code: 100728,
410
402
  message: () => "this device has no identity yet, so it cannot switch a chat's agent"
@@ -2015,8 +2015,7 @@ export function registerEngineTypes(ns) {
2015
2015
  fields: [
2016
2016
  { name: 'meshId', type: 'string' },
2017
2017
  { name: 'writable', type: 'bool', required: true },
2018
- { name: 'displayName', type: 'string' },
2019
- { name: 'ownWorkspace', type: 'string' }
2018
+ { name: 'displayName', type: 'string' }
2020
2019
  ]
2021
2020
  });
2022
2021
  ns.register({
@@ -2100,10 +2099,18 @@ export function registerEngineTypes(ns) {
2100
2099
  { name: 'knowledge', type: 'uint', required: true }
2101
2100
  ]
2102
2101
  });
2102
+ ns.register({
2103
+ name: 'migrate-archived-mesh-request',
2104
+ fields: [
2105
+ { name: 'meshId', type: 'string', required: true },
2106
+ { name: 'workspaceId', type: 'string', required: true }
2107
+ ]
2108
+ });
2103
2109
  ns.register({
2104
2110
  name: 'archived-mesh-migration',
2105
2111
  fields: [
2106
2112
  { name: 'meshId', type: 'string', required: true },
2113
+ { name: 'workspaceId', type: 'string', required: true },
2107
2114
  { name: 'migrated', type: 'bool', required: true },
2108
2115
  { name: 'migratedAt', type: 'uint', required: true },
2109
2116
  { name: 'chats', type: 'uint', required: true },
@@ -3226,7 +3233,7 @@ export function registerEngineApi(api) {
3226
3233
  });
3227
3234
  api.register({
3228
3235
  name: 'migrate-archived-mesh',
3229
- request: { name: '@assistant/mesh-target', stream: false },
3236
+ request: { name: '@assistant/migrate-archived-mesh-request', stream: false },
3230
3237
  response: { name: '@assistant/archived-mesh-migration', stream: false }
3231
3238
  });
3232
3239
  api.register({
@@ -126,7 +126,8 @@ export function registerLocalTypes(ns) {
126
126
  { name: 'workspaceKey', type: 'fixed32' },
127
127
  { name: 'joinedAt', type: 'uint' },
128
128
  { name: 'kicked', type: 'bool' },
129
- { name: 'retiredUnder', type: 'fixed32' }
129
+ { name: 'retiredUnder', type: 'fixed32' },
130
+ { name: 'initial', type: 'bool' }
130
131
  ]);
131
132
  versioned('member-proof', [
132
133
  { name: 'meshKey', type: 'fixed32', required: true },
@@ -169,7 +170,8 @@ export function registerLocalTypes(ns) {
169
170
  { name: 'restartRunId', type: 'string' },
170
171
  { name: 'startedAt', type: 'uint', required: true },
171
172
  { name: 'completedAt', type: 'uint' },
172
- { name: 'failure', type: 'string' }
173
+ { name: 'failure', type: 'string' },
174
+ { name: 'targetMeshId', type: 'string' }
173
175
  ]);
174
176
  ns.register({ name: 'capability-profile', enum: CAPABILITY_PROFILES, strings: true });
175
177
  versioned('mesh-update', [
@@ -556,7 +556,8 @@ export function registerQvacTypes(ns) {
556
556
  { name: 'shared', type: 'bool' },
557
557
  { name: 'sharedAt', type: 'uint' },
558
558
  { name: 'workspace', type: 'bool' },
559
- { name: 'kicked', type: 'bool' }
559
+ { name: 'kicked', type: 'bool' },
560
+ { name: 'initial', type: 'bool' }
560
561
  ]);
561
562
  versioned('put-joined-mesh-operation', [
562
563
  { name: 'room', type: '@qvac/joined-mesh', required: true }
@@ -160,7 +160,7 @@ export interface Capabilities {
160
160
  updateMember(input: T.AssistantUpdateMemberRequest): Promise<T.AssistantMember>
161
161
  removeMember(input: T.AssistantRemoveMemberRequest): Promise<T.AssistantOkResponse>
162
162
  archivedMeshContents(input: T.AssistantMeshTarget): Promise<T.AssistantArchivedMeshContents>
163
- migrateArchivedMesh(input: T.AssistantMeshTarget): Promise<T.AssistantArchivedMeshMigration>
163
+ migrateArchivedMesh(input: T.AssistantMigrateArchivedMeshRequest): Promise<T.AssistantArchivedMeshMigration>
164
164
  listArchivedMeshes(input?: T.AssistantEmpty): Promise<T.AssistantArchivedMeshList>
165
165
  accountRecoverable(input?: T.AssistantEmpty): Promise<T.AssistantAccountRecoveryState>
166
166
  recoveryPublish(input: T.AssistantIdentityPhrase): Promise<T.AssistantAccountRecoveryState>
@@ -366,7 +366,7 @@ export interface CapabilityHandlers {
366
366
  updateMember(input: T.AssistantUpdateMemberRequest): T.AssistantMember | Promise<T.AssistantMember>
367
367
  removeMember(input: T.AssistantRemoveMemberRequest): T.AssistantOkResponse | Promise<T.AssistantOkResponse>
368
368
  archivedMeshContents(input: T.AssistantMeshTarget): T.AssistantArchivedMeshContents | Promise<T.AssistantArchivedMeshContents>
369
- migrateArchivedMesh(input: T.AssistantMeshTarget): T.AssistantArchivedMeshMigration | Promise<T.AssistantArchivedMeshMigration>
369
+ migrateArchivedMesh(input: T.AssistantMigrateArchivedMeshRequest): T.AssistantArchivedMeshMigration | Promise<T.AssistantArchivedMeshMigration>
370
370
  listArchivedMeshes(input?: T.AssistantEmpty): T.AssistantArchivedMeshList | Promise<T.AssistantArchivedMeshList>
371
371
  accountRecoverable(input?: T.AssistantEmpty): T.AssistantAccountRecoveryState | Promise<T.AssistantAccountRecoveryState>
372
372
  recoveryPublish(input: T.AssistantIdentityPhrase): T.AssistantAccountRecoveryState | Promise<T.AssistantAccountRecoveryState>
@@ -1721,7 +1721,7 @@
1721
1721
  "id": 132,
1722
1722
  "name": "@assistant/migrate-archived-mesh",
1723
1723
  "request": {
1724
- "name": "@assistant/mesh-target",
1724
+ "name": "@assistant/migrate-archived-mesh-request",
1725
1725
  "stream": false
1726
1726
  },
1727
1727
  "response": {
@@ -551,7 +551,7 @@ class HRPC {
551
551
  ['@assistant/update-member', getEncoding('@assistant/update-member-request')],
552
552
  ['@assistant/remove-member', getEncoding('@assistant/remove-member-request')],
553
553
  ['@assistant/archived-mesh-contents', getEncoding('@assistant/mesh-target')],
554
- ['@assistant/migrate-archived-mesh', getEncoding('@assistant/mesh-target')],
554
+ ['@assistant/migrate-archived-mesh', getEncoding('@assistant/migrate-archived-mesh-request')],
555
555
  ['@assistant/list-archived-meshes', getEncoding('@assistant/empty')],
556
556
  ['@assistant/account-recoverable', getEncoding('@assistant/empty')],
557
557
  ['@assistant/recovery-publish', getEncoding('@assistant/identity-phrase')],