@qvac/core 0.2.1 → 0.2.2

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 (263) hide show
  1. package/.claude/skills/compaction/SKILL.md +9 -4
  2. package/.claude/skills/pr-create/SKILL.md +24 -3
  3. package/.claude/skills/pr-review/SKILL.md +248 -40
  4. package/CLAUDE.md +1 -3
  5. package/README.md +3 -1
  6. package/dist-lib/client.js +1 -1
  7. package/dist-lib/index.js +8 -8
  8. package/dist-lib/lib/api/agents.d.ts +1 -1
  9. package/dist-lib/lib/api/agents.js +10 -9
  10. package/dist-lib/lib/api/app-config.js +1 -1
  11. package/dist-lib/lib/api/approval-rules.js +9 -5
  12. package/dist-lib/lib/api/attachments.js +25 -3
  13. package/dist-lib/lib/api/chat-groups.d.ts +1 -1
  14. package/dist-lib/lib/api/chat-groups.js +5 -4
  15. package/dist-lib/lib/api/chat.js +8 -8
  16. package/dist-lib/lib/api/chunks.js +11 -11
  17. package/dist-lib/lib/api/config.js +1 -1
  18. package/dist-lib/lib/api/custom-models.js +2 -2
  19. package/dist-lib/lib/api/devices.d.ts +1 -1
  20. package/dist-lib/lib/api/devices.js +9 -9
  21. package/dist-lib/lib/api/diagnostics.js +1 -1
  22. package/dist-lib/lib/api/effective-ctx-size.js +1 -1
  23. package/dist-lib/lib/api/execution.js +4 -4
  24. package/dist-lib/lib/api/files.js +2 -2
  25. package/dist-lib/lib/api/index.d.ts +1 -0
  26. package/dist-lib/lib/api/index.js +33 -33
  27. package/dist-lib/lib/api/instrument.js +1 -1
  28. package/dist-lib/lib/api/knowledge.js +4 -4
  29. package/dist-lib/lib/api/logs.js +1 -1
  30. package/dist-lib/lib/api/members.d.ts +4 -1
  31. package/dist-lib/lib/api/members.js +88 -18
  32. package/dist-lib/lib/api/mesh.d.ts +13 -3
  33. package/dist-lib/lib/api/mesh.js +25 -2
  34. package/dist-lib/lib/api/model-download.js +1 -1
  35. package/dist-lib/lib/api/network.js +1 -1
  36. package/dist-lib/lib/api/notifications.js +3 -3
  37. package/dist-lib/lib/api/rag.js +7 -7
  38. package/dist-lib/lib/api/sync.js +1 -1
  39. package/dist-lib/lib/api/tool-activity.js +4 -4
  40. package/dist-lib/lib/api/tool-configs.js +5 -5
  41. package/dist-lib/lib/api/watchable.js +1 -1
  42. package/dist-lib/lib/assistant/fetch-body.d.ts +5 -0
  43. package/dist-lib/lib/assistant/fetch-body.js +36 -0
  44. package/dist-lib/lib/assistant/harness.d.ts +225 -0
  45. package/dist-lib/lib/assistant/harness.js +154 -0
  46. package/dist-lib/lib/assistant/history.d.ts +32 -0
  47. package/dist-lib/lib/assistant/history.js +232 -0
  48. package/dist-lib/lib/assistant/message.d.ts +45 -0
  49. package/dist-lib/lib/assistant/message.js +47 -0
  50. package/dist-lib/lib/assistant/skill-encode.d.ts +21 -0
  51. package/dist-lib/lib/assistant/skill-encode.js +71 -0
  52. package/dist-lib/lib/assistant-client.js +2 -2
  53. package/dist-lib/lib/assistant-tree.js +10 -4
  54. package/dist-lib/lib/assistant.d.ts +25 -285
  55. package/dist-lib/lib/assistant.js +250 -637
  56. package/dist-lib/lib/audio-format.js +2 -2
  57. package/dist-lib/lib/client.js +2 -2
  58. package/dist-lib/lib/collabora/convert.js +1 -1
  59. package/dist-lib/lib/collabora/entry.js +1 -1
  60. package/dist-lib/lib/collabora/worker.js +1 -1
  61. package/dist-lib/lib/compaction.d.ts +1 -2
  62. package/dist-lib/lib/compaction.js +8 -6
  63. package/dist-lib/lib/constants.js +1 -1
  64. package/dist-lib/lib/core/account-recovery.d.ts +19 -0
  65. package/dist-lib/lib/core/account-recovery.js +50 -0
  66. package/dist-lib/lib/core/agent.js +8 -4
  67. package/dist-lib/lib/core/app-build.d.ts +1 -1
  68. package/dist-lib/lib/core/approval-rules.d.ts +1 -0
  69. package/dist-lib/lib/core/approval-rules.js +3 -1
  70. package/dist-lib/lib/core/archived-mesh.d.ts +25 -0
  71. package/dist-lib/lib/core/archived-mesh.js +162 -0
  72. package/dist-lib/lib/core/chat-activity.js +1 -1
  73. package/dist-lib/lib/core/chat-group.d.ts +1 -0
  74. package/dist-lib/lib/core/chat-group.js +24 -4
  75. package/dist-lib/lib/core/chat-search.js +2 -2
  76. package/dist-lib/lib/core/chat.js +5 -5
  77. package/dist-lib/lib/core/chunk.d.ts +1 -1
  78. package/dist-lib/lib/core/chunk.js +4 -4
  79. package/dist-lib/lib/core/contract/agents.js +1 -1
  80. package/dist-lib/lib/core/contract/approval-rules.js +6 -4
  81. package/dist-lib/lib/core/contract/attestations.js +1 -1
  82. package/dist-lib/lib/core/contract/chat-group.js +1 -1
  83. package/dist-lib/lib/core/contract/chat.js +1 -1
  84. package/dist-lib/lib/core/contract/chunks.js +2 -2
  85. package/dist-lib/lib/core/contract/compute.d.ts +11 -0
  86. package/dist-lib/lib/core/contract/compute.js +45 -0
  87. package/dist-lib/lib/core/contract/devices.js +16 -3
  88. package/dist-lib/lib/core/contract/index.d.ts +3 -1
  89. package/dist-lib/lib/core/contract/index.js +19 -16
  90. package/dist-lib/lib/core/contract/indexing.js +2 -2
  91. package/dist-lib/lib/core/contract/joined-meshes.js +1 -1
  92. package/dist-lib/lib/core/contract/knowledge.js +2 -2
  93. package/dist-lib/lib/core/contract/members.js +2 -2
  94. package/dist-lib/lib/core/contract/seal.d.ts +2 -0
  95. package/dist-lib/lib/core/contract/seal.js +8 -0
  96. package/dist-lib/lib/core/contract/seed-defaults.js +1 -1
  97. package/dist-lib/lib/core/contract/tool-activity.js +1 -1
  98. package/dist-lib/lib/core/contract/tool-configs.js +3 -3
  99. package/dist-lib/lib/core/contract/writers.js +66 -42
  100. package/dist-lib/lib/core/departures.js +1 -1
  101. package/dist-lib/lib/core/device-invites.js +1 -1
  102. package/dist-lib/lib/core/document-attachment.js +2 -2
  103. package/dist-lib/lib/core/files/attachments.js +3 -3
  104. package/dist-lib/lib/core/files/index.d.ts +2 -2
  105. package/dist-lib/lib/core/files/index.js +19 -19
  106. package/dist-lib/lib/core/files/knowledge.js +3 -3
  107. package/dist-lib/lib/core/files/preview/image.js +1 -1
  108. package/dist-lib/lib/core/files/preview/index.js +6 -6
  109. package/dist-lib/lib/core/files/processing/claims.js +1 -1
  110. package/dist-lib/lib/core/files/processing/document.js +5 -5
  111. package/dist-lib/lib/core/files/processing/index.js +8 -8
  112. package/dist-lib/lib/core/files/processing/ownership.js +1 -1
  113. package/dist-lib/lib/core/files/processing/protocol.js +3 -3
  114. package/dist-lib/lib/core/files/processing/source.js +1 -1
  115. package/dist-lib/lib/core/files/rag/artifact/codec.js +1 -1
  116. package/dist-lib/lib/core/files/rag/artifact/id.js +1 -1
  117. package/dist-lib/lib/core/files/rag/artifact/types.d.ts +4 -4
  118. package/dist-lib/lib/core/files/rag/build.js +2 -2
  119. package/dist-lib/lib/core/files/rag/chunk/chunking.js +2 -2
  120. package/dist-lib/lib/core/files/rag/document-types.d.ts +3 -3
  121. package/dist-lib/lib/core/files/rag/extract/document-types.d.ts +9 -9
  122. package/dist-lib/lib/core/files/rag/extract/extract.js +7 -7
  123. package/dist-lib/lib/core/files/rag/extract/html-text.js +1 -1
  124. package/dist-lib/lib/core/files/rag/extract/office-collabora.js +2 -2
  125. package/dist-lib/lib/core/files/rag/extract/pdf-platform.js +1 -1
  126. package/dist-lib/lib/core/files/rag/extract/pdf-text.js +1 -1
  127. package/dist-lib/lib/core/files/rag/extract/text-decoding.js +1 -1
  128. package/dist-lib/lib/core/files/rag/extract/types.d.ts +2 -2
  129. package/dist-lib/lib/core/files/rag/index.js +22 -22
  130. package/dist-lib/lib/core/files/rag/load.js +5 -5
  131. package/dist-lib/lib/core/files/rag/policy.js +2 -2
  132. package/dist-lib/lib/core/files/rag/produce.js +5 -5
  133. package/dist-lib/lib/core/files/rag/retrieval/coverage.js +2 -2
  134. package/dist-lib/lib/core/files/rag/retrieval/diversity.js +1 -1
  135. package/dist-lib/lib/core/files/rag/retrieval/floor.js +2 -2
  136. package/dist-lib/lib/core/files/rag/retrieval/format.js +1 -1
  137. package/dist-lib/lib/core/files/rag/retrieval/full-text.js +18 -11
  138. package/dist-lib/lib/core/files/rag/retrieval/knowledge.js +5 -5
  139. package/dist-lib/lib/core/files/rag/retrieval/scoring.js +2 -2
  140. package/dist-lib/lib/core/files/rag/retrieval/search.js +4 -4
  141. package/dist-lib/lib/core/files/rag/retrieval/selection.js +2 -2
  142. package/dist-lib/lib/core/files/rag/retrieval/sources.js +2 -2
  143. package/dist-lib/lib/core/files/rag/retrieval/terms.js +1 -1
  144. package/dist-lib/lib/core/files/rag/retrieval/web-sources.js +1 -1
  145. package/dist-lib/lib/core/files/records/chunks.js +1 -1
  146. package/dist-lib/lib/core/files/records/index.js +8 -8
  147. package/dist-lib/lib/core/files/records/knowledge.js +2 -2
  148. package/dist-lib/lib/core/files/records/output.js +1 -1
  149. package/dist-lib/lib/core/files/records/reclaim.js +5 -5
  150. package/dist-lib/lib/core/files/records/routing.js +7 -7
  151. package/dist-lib/lib/core/files/store/blob.js +2 -2
  152. package/dist-lib/lib/core/files/store/index.js +7 -7
  153. package/dist-lib/lib/core/files/store/reference.js +2 -2
  154. package/dist-lib/lib/core/files/store/server.js +1 -1
  155. package/dist-lib/lib/core/files/store/sweep.js +1 -1
  156. package/dist-lib/lib/core/files/upload-input.js +2 -2
  157. package/dist-lib/lib/core/files/upload.d.ts +1 -1
  158. package/dist-lib/lib/core/files/upload.js +6 -6
  159. package/dist-lib/lib/core/harness-loan.d.ts +29 -0
  160. package/dist-lib/lib/core/harness-loan.js +187 -0
  161. package/dist-lib/lib/core/helpers/index.d.ts +2 -1
  162. package/dist-lib/lib/core/helpers/index.js +4 -4
  163. package/dist-lib/lib/core/hosted-agents.js +2 -2
  164. package/dist-lib/lib/core/identity.d.ts +2 -0
  165. package/dist-lib/lib/core/identity.js +4 -2
  166. package/dist-lib/lib/core/invite.d.ts +1 -0
  167. package/dist-lib/lib/core/invite.js +4 -2
  168. package/dist-lib/lib/core/local/index.d.ts +12 -3
  169. package/dist-lib/lib/core/local/index.js +75 -16
  170. package/dist-lib/lib/core/membership.d.ts +3 -0
  171. package/dist-lib/lib/core/membership.js +15 -1
  172. package/dist-lib/lib/core/mesh-seed-handoff.js +1 -1
  173. package/dist-lib/lib/core/mesh.d.ts +9 -3
  174. package/dist-lib/lib/core/mesh.js +41 -26
  175. package/dist-lib/lib/core/migrations/agent-catalog.js +1 -1
  176. package/dist-lib/lib/core/migrations/index.js +5 -3
  177. package/dist-lib/lib/core/migrations/membership.js +2 -2
  178. package/dist-lib/lib/core/migrations/seal.d.ts +3 -0
  179. package/dist-lib/lib/core/migrations/seal.js +30 -0
  180. package/dist-lib/lib/core/next-frame.js +1 -1
  181. package/dist-lib/lib/core/notification.js +1 -1
  182. package/dist-lib/lib/core/ota-config.js +1 -1
  183. package/dist-lib/lib/core/secret-handoff.js +1 -1
  184. package/dist-lib/lib/core/send.js +3 -3
  185. package/dist-lib/lib/core/skill-overlay-handoff.js +1 -1
  186. package/dist-lib/lib/core/skill-overlay-receiver.js +2 -2
  187. package/dist-lib/lib/core/skill-secrets.js +3 -3
  188. package/dist-lib/lib/core/sync/devices.js +1 -1
  189. package/dist-lib/lib/core/sync/index.js +8 -5
  190. package/dist-lib/lib/core/sync-status.js +1 -1
  191. package/dist-lib/lib/core/system-info.js +1 -1
  192. package/dist-lib/lib/core/tool-activity.js +2 -2
  193. package/dist-lib/lib/core/tool-configs.js +2 -2
  194. package/dist-lib/lib/core.d.ts +41 -3
  195. package/dist-lib/lib/core.js +525 -90
  196. package/dist-lib/lib/credential-pusher.js +4 -4
  197. package/dist-lib/lib/deadline.js +1 -1
  198. package/dist-lib/lib/fs-drive-bridge.js +4 -2
  199. package/dist-lib/lib/integrations/index.js +3 -3
  200. package/dist-lib/lib/integrations/oauth-providers.js +1 -1
  201. package/dist-lib/lib/integrations/setup-routes.d.ts +5 -5
  202. package/dist-lib/lib/integrations/setup-routes.js +3 -3
  203. package/dist-lib/lib/knowledge-search.js +1 -1
  204. package/dist-lib/lib/log.js +3 -3
  205. package/dist-lib/lib/mesh-scoped-engine.d.ts +3 -0
  206. package/dist-lib/lib/mesh-scoped-engine.js +96 -0
  207. package/dist-lib/lib/model-context.d.ts +2 -2
  208. package/dist-lib/lib/model-context.js +1 -1
  209. package/dist-lib/lib/model-download.js +6 -6
  210. package/dist-lib/lib/oauth/asana.js +3 -3
  211. package/dist-lib/lib/oauth/browser-connect.js +1 -1
  212. package/dist-lib/lib/oauth/client.js +2 -2
  213. package/dist-lib/lib/oauth/common.d.ts +1 -1
  214. package/dist-lib/lib/oauth/common.js +1 -1
  215. package/dist-lib/lib/oauth/flow-core.js +3 -3
  216. package/dist-lib/lib/oauth/flow.js +2 -2
  217. package/dist-lib/lib/oauth/google.js +4 -4
  218. package/dist-lib/lib/oauth/host.js +3 -3
  219. package/dist-lib/lib/oauth/loopback.js +1 -1
  220. package/dist-lib/lib/oauth/notion.js +3 -3
  221. package/dist-lib/lib/oauth/providers.js +1 -1
  222. package/dist-lib/lib/oauth/resolve.js +1 -1
  223. package/dist-lib/lib/oauth/spotify.js +3 -3
  224. package/dist-lib/lib/oauth/token-exchange.js +1 -1
  225. package/dist-lib/lib/oauth.client.js +2 -2
  226. package/dist-lib/lib/oauth.js +12 -12
  227. package/dist-lib/lib/run-notices.d.ts +7 -7
  228. package/dist-lib/lib/run-transcript.js +1 -1
  229. package/dist-lib/schema/build.js +12 -6
  230. package/dist-lib/schema/content.d.ts +11 -11
  231. package/dist-lib/schema/engine.js +193 -30
  232. package/dist-lib/schema/field-order.js +2 -2
  233. package/dist-lib/schema/local.js +18 -4
  234. package/dist-lib/schema/qvac.js +15 -6
  235. package/dist-lib/spec/bind.js +41 -0
  236. package/dist-lib/spec/calls.js +12 -0
  237. package/dist-lib/spec/capabilities.d.ts +36 -12
  238. package/dist-lib/spec/hrpc/hrpc.json +161 -5
  239. package/dist-lib/spec/hrpc/index.js +154 -9
  240. package/dist-lib/spec/hrpc/messages.js +549 -129
  241. package/dist-lib/spec/hyperschema/index.js +549 -129
  242. package/dist-lib/spec/hyperschema/schema.json +370 -40
  243. package/dist-lib/spec/hyperschema/types.d.ts +85 -1
  244. package/dist-lib/spec/local/hyperdb/db.json +15 -0
  245. package/dist-lib/spec/local/hyperdb/index.js +70 -1
  246. package/dist-lib/spec/local/hyperdb/messages.js +300 -117
  247. package/dist-lib/spec/local/hyperschema/index.js +97 -4
  248. package/dist-lib/spec/local/hyperschema/schema.json +58 -1
  249. package/dist-lib/spec/local/hyperschema/types.d.ts +14 -0
  250. package/dist-lib/spec/mesh/hyperdb/messages.js +393 -288
  251. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +6 -0
  252. package/dist-lib/spec/mesh/hyperdispatch/index.js +18 -1
  253. package/dist-lib/spec/mesh/hyperdispatch/messages.js +176 -85
  254. package/dist-lib/spec/mesh/hyperschema/index.js +176 -85
  255. package/dist-lib/spec/mesh/hyperschema/schema.json +71 -21
  256. package/dist-lib/spec/mesh/hyperschema/types.d.ts +14 -1
  257. package/package.json +15 -9
  258. package/tui/README.md +7 -0
  259. package/tui/app.mjs +311 -14
  260. package/tui/lib/busy-words.mjs +57 -5
  261. package/tui/lib/export.mjs +1 -0
  262. package/tui/lib/render.mjs +9 -2
  263. package/tui/main.mjs +5 -2
@@ -1,9 +1,9 @@
1
- import { OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from "./obsidian-key.js";
2
- import { resolveAsanaCredential, resolveGoogleCredential, resolveNotionCredential, resolveSpotifyCredential, scopedKey } from "./oauth.js";
3
- import { OAUTH_KEY_SPECS, oauthStateKeyFor as specStateKeyFor } from "./oauth/keys.js";
1
+ import { OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from './obsidian-key.js';
2
+ import { resolveAsanaCredential, resolveGoogleCredential, resolveNotionCredential, resolveSpotifyCredential, scopedKey } from './oauth.js';
3
+ import { OAUTH_KEY_SPECS, oauthStateKeyFor as specStateKeyFor } from './oauth/keys.js';
4
4
  import ScopeLock from 'scope-lock';
5
5
  import { credentialSlots } from '@qvac/harness/lib/tools/skills/credential-slots.ts';
6
- import { REFRESH_SKEW_MS } from "./oauth/common.js";
6
+ import { REFRESH_SKEW_MS } from './oauth/common.js';
7
7
  const RESOLVE_BY_PROVIDER = {
8
8
  google: resolveGoogleCredential,
9
9
  spotify: resolveSpotifyCredential,
@@ -1,4 +1,4 @@
1
- import { unref } from "./unref.js";
1
+ import { unref } from './unref.js';
2
2
  export class DeadlineScheduler {
3
3
  _onFire;
4
4
  _timer = null;
@@ -1,6 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { pipelinePromise, Readable } from 'streamx';
4
+ import { AbortController } from 'bare-abort-controller';
4
5
  import { STAGING_DIR as HARNESS_STAGING_DIR } from '@qvac/harness/lib/staging.ts';
5
6
  import { userTmpPath } from '@qvac/harness/lib/tmp-path.ts';
6
7
  import { MAX_DRIVE_BYTES } from '@qvac/harness/lib/tools/fs/remote.ts';
@@ -22,8 +23,9 @@ function withDeadline(op, ms, task) {
22
23
  const controller = new AbortController();
23
24
  const { promise, resolve, reject } = Promise.withResolvers();
24
25
  const timer = setTimeout(() => {
25
- controller.abort();
26
- reject(new Error(`drive ${op} timed out on the host`));
26
+ const err = new Error(`drive ${op} timed out on the host`);
27
+ controller.abort(err);
28
+ reject(err);
27
29
  }, ms);
28
30
  task(controller.signal).then((value) => {
29
31
  clearTimeout(timer);
@@ -1,3 +1,3 @@
1
- export { isMcpTokenProvider, MCP_TOKEN_PROVIDERS, resolveMcpProvider } from "./mcp-providers.js";
2
- export { OAUTH_PROVIDERS, resolveOAuthProviderByCredentialKey } from "./oauth-providers.js";
3
- export { deriveSetupRoutes, SETUP_ROUTE_KIND } from "./setup-routes.js";
1
+ export { isMcpTokenProvider, MCP_TOKEN_PROVIDERS, resolveMcpProvider } from './mcp-providers.js';
2
+ export { OAUTH_PROVIDERS, resolveOAuthProviderByCredentialKey } from './oauth-providers.js';
3
+ export { deriveSetupRoutes, SETUP_ROUTE_KIND } from './setup-routes.js';
@@ -1,4 +1,4 @@
1
- import { ASANA_MCP_CREDENTIAL_KEY, GMAIL_CREDENTIAL_KEY, GOOGLE_CALENDAR_CREDENTIAL_KEY, GOOGLE_DOCS_CREDENTIAL_KEY, GOOGLE_DRIVE_CREDENTIAL_KEY, GOOGLE_SHEETS_CREDENTIAL_KEY, NOTION_MCP_CREDENTIAL_KEY, SPOTIFY_CREDENTIAL_KEY } from "../oauth/keys.js";
1
+ import { ASANA_MCP_CREDENTIAL_KEY, GMAIL_CREDENTIAL_KEY, GOOGLE_CALENDAR_CREDENTIAL_KEY, GOOGLE_DOCS_CREDENTIAL_KEY, GOOGLE_DRIVE_CREDENTIAL_KEY, GOOGLE_SHEETS_CREDENTIAL_KEY, NOTION_MCP_CREDENTIAL_KEY, SPOTIFY_CREDENTIAL_KEY } from '../oauth/keys.js';
2
2
  const OAUTH_CLIENT_FIELDS = [
3
3
  {
4
4
  key: 'clientId',
@@ -1,10 +1,10 @@
1
1
  import type { SkillEntry, SkillSetup } from '../skill-types.ts';
2
2
  export declare const SETUP_ROUTE_KIND: {
3
- readonly oauth: "oauth";
4
- readonly token: "token";
5
- readonly install: "install";
6
- readonly picker: "picker";
7
- readonly instructions: "instructions";
3
+ readonly oauth: 'oauth';
4
+ readonly token: 'token';
5
+ readonly install: 'install';
6
+ readonly picker: 'picker';
7
+ readonly instructions: 'instructions';
8
8
  };
9
9
  export type DeriveSetupOptions = {
10
10
  readonly sandboxed?: boolean;
@@ -1,6 +1,6 @@
1
- import { OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from "../obsidian-key.js";
2
- import { MCP_TOKEN_PROVIDERS } from "./mcp-providers.js";
3
- import { resolveOAuthProviderByCredentialKey } from "./oauth-providers.js";
1
+ import { OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from '../obsidian-key.js';
2
+ import { MCP_TOKEN_PROVIDERS } from './mcp-providers.js';
3
+ import { resolveOAuthProviderByCredentialKey } from './oauth-providers.js';
4
4
  const UNSUPPORTED_STATE = 'unsupported';
5
5
  export const SETUP_ROUTE_KIND = {
6
6
  oauth: 'oauth',
@@ -1,4 +1,4 @@
1
- import { isWholeDocumentQuery, referencedDocuments } from "./core/files/index.js";
1
+ import { isWholeDocumentQuery, referencedDocuments } from './core/files/index.js';
2
2
  import { raceAbort } from '@qvac/harness/race-abort';
3
3
  export async function searchKnowledge(engine, request, options) {
4
4
  const { signal, preparing } = options;
@@ -2,9 +2,9 @@ import fs from 'fs';
2
2
  import { dirname } from 'path';
3
3
  import FileLog from 'bare-file-logger';
4
4
  import SystemLog from 'bare-system-logger';
5
- import { LogBuffer } from "./log-buffer.js";
6
- import { LEVELS } from "./log-levels.js";
7
- export { LEVELS } from "./log-levels.js";
5
+ import { LogBuffer } from './log-buffer.js';
6
+ import { LEVELS } from './log-levels.js';
7
+ export { LEVELS } from './log-levels.js';
8
8
  const SCOPE = 'qvac-app-core';
9
9
  const LOG_BUFFER_CAP = 1000;
10
10
  export function isLogLevel(value) {
@@ -0,0 +1,3 @@
1
+ import type { Capabilities } from './api/index.ts';
2
+ export declare const MESH_SCOPED: ReadonlySet<keyof Capabilities>;
3
+ export declare function meshScoped(engine: Capabilities, meshId?: string | null): Capabilities;
@@ -0,0 +1,96 @@
1
+ export const MESH_SCOPED = new Set([
2
+ 'getAgent',
3
+ 'agentsWatch',
4
+ 'getChat',
5
+ 'appendChunk',
6
+ 'updateChunk',
7
+ 'listChunks',
8
+ 'chunksWatch',
9
+ 'resolveApproval',
10
+ 'listApprovalRules',
11
+ 'recordToolActivity',
12
+ 'renameChat',
13
+ 'listToolConfigs',
14
+ 'ragSearch',
15
+ 'fileStatusWatch',
16
+ 'fileRead',
17
+ 'listDevices',
18
+ 'devicesWatch',
19
+ 'listMembers',
20
+ 'membersWatch',
21
+ 'listChats',
22
+ 'chatsWatch',
23
+ 'listAgents',
24
+ 'deleteChat',
25
+ 'deleteAgent'
26
+ ]);
27
+ const DEVICE_LOCAL = new Set([
28
+ 'configGet',
29
+ 'configSet',
30
+ 'configWatch',
31
+ 'getConfig',
32
+ 'setConfig',
33
+ 'setModelPaused',
34
+ 'configWatchTyped',
35
+ 'modelDownloadsWatch',
36
+ 'setModelDownloadStatus',
37
+ 'clearModelDownload',
38
+ 'retryModelDownload',
39
+ 'beginModelTransfer',
40
+ 'completeModelTransfer',
41
+ 'customModelsWatch',
42
+ 'addCustomModel',
43
+ 'removeCustomModel',
44
+ 'deviceInfo',
45
+ 'storeIdentityPhrase',
46
+ 'suspend',
47
+ 'resume',
48
+ 'listModels',
49
+ 'deleteModel',
50
+ 'modelCatalogWatch',
51
+ 'clearKvCache',
52
+ 'deleteChatKvCache',
53
+ 'transcribe',
54
+ 'speak',
55
+ 'speakStream',
56
+ 'transcodeImage',
57
+ 'tools',
58
+ 'logsWatch',
59
+ 'writeLog',
60
+ 'diagnostics',
61
+ 'diagnosticsWatch',
62
+ 'networkWatch',
63
+ 'meshStatusWatch',
64
+ 'listMeshes',
65
+ 'meshesWatch',
66
+ 'openMesh',
67
+ 'selectMesh',
68
+ 'closeMesh',
69
+ 'leaveMesh',
70
+ 'acknowledgeKicked',
71
+ 'joinMesh',
72
+ 'cancelMeshJoin',
73
+ 'meshInvite',
74
+ 'setMeshLabel',
75
+ 'createRoom'
76
+ ]);
77
+ export function meshScoped(engine, meshId) {
78
+ if (!meshId)
79
+ return engine;
80
+ return new Proxy(engine, {
81
+ get(target, prop) {
82
+ const value = Reflect.get(target, prop, target);
83
+ if (typeof value !== 'function')
84
+ return value;
85
+ const name = prop;
86
+ if (MESH_SCOPED.has(name)) {
87
+ return (input = {}) => value.call(target, { ...input, meshId });
88
+ }
89
+ if (DEVICE_LOCAL.has(name))
90
+ return value.bind(target);
91
+ return () => {
92
+ throw new Error(`${String(prop)} is not mesh-scoped: it cannot answer for mesh ${meshId}`);
93
+ };
94
+ }
95
+ });
96
+ }
@@ -1,7 +1,7 @@
1
1
  export declare const MOBILE_CONTEXT_SIZE = 12288;
2
2
  export declare const MODEL_CONTEXT_TARGET: {
3
- readonly desktop: "desktop";
4
- readonly mobile: "mobile";
3
+ readonly desktop: 'desktop';
4
+ readonly mobile: 'mobile';
5
5
  };
6
6
  export type ModelContextTarget = (typeof MODEL_CONTEXT_TARGET)[keyof typeof MODEL_CONTEXT_TARGET];
7
7
  export declare function modelContextTargetForPlatform(platform: string | null | undefined): ModelContextTarget | null;
@@ -1,4 +1,4 @@
1
- import { QWEN_35_2B, QWEN_35_4B, QWEN_35_9B, QWEN_36_27B, QWEN_36_35B_A3B, QWEN_38_27B, MEDPSY_1_7B, MEDPSY_4B } from "./llm-model-names.js";
1
+ import { QWEN_35_2B, QWEN_35_4B, QWEN_35_9B, QWEN_36_27B, QWEN_36_35B_A3B, QWEN_38_27B, MEDPSY_1_7B, MEDPSY_4B } from './llm-model-names.js';
2
2
  const QWEN_35_MAX_CONTEXT = 262_144;
3
3
  const QWEN_36_MAX_CONTEXT = 262_144;
4
4
  const QWEN_38_MAX_CONTEXT = 262_144;
@@ -1,13 +1,13 @@
1
1
  import { AbortController } from 'bare-abort-controller';
2
2
  import { skillModelsForAgent } from '@qvac/harness/lib/models/model-catalog.ts';
3
3
  import { GENERATE_MUSIC_TOOL, MUSIC_MODEL_CHOICES } from '@qvac/harness/music-catalog';
4
- import { DeadlineScheduler } from "./deadline.js";
4
+ import { DeadlineScheduler } from './deadline.js';
5
5
  import { DownloadSpeedSampler, progressBytes, transferProgress } from '@qvac/harness/model-progress';
6
- import { isMeshTransition } from "./api/current-mesh.js";
7
- import { runnableModelName } from "./model-clamp.js";
8
- import { ModelDownloadStatus } from "./model-download-status.js";
9
- import { RetryBudget } from "./retry-budget.js";
10
- import { unref } from "./unref.js";
6
+ import { isMeshTransition } from './api/current-mesh.js';
7
+ import { runnableModelName } from './model-clamp.js';
8
+ import { ModelDownloadStatus } from './model-download-status.js';
9
+ import { RetryBudget } from './retry-budget.js';
10
+ import { unref } from './unref.js';
11
11
  const WATCH_RETRY_MS = 30_000;
12
12
  const LOCAL_PROGRESS_INTERVAL_MS = 750;
13
13
  const LOCAL_PROGRESS_PERCENTAGE_STEP = 1;
@@ -1,8 +1,8 @@
1
1
  import { URLSearchParams } from 'url';
2
2
  import defaultFetch from '#fetch';
3
- import { runBrowserConnect } from "./browser-connect.js";
4
- import { oauthRedirectUri, tokenRequest } from "./common.js";
5
- import { resolveOAuthCredential } from "./resolve.js";
3
+ import { runBrowserConnect } from './browser-connect.js';
4
+ import { oauthRedirectUri, tokenRequest } from './common.js';
5
+ import { resolveOAuthCredential } from './resolve.js';
6
6
  export const ASANA_MCP_CREDENTIAL_KEY = 'asana_mcp_access_token';
7
7
  export const ASANA_OAUTH_STATE_KEY = 'asana_oauth';
8
8
  export const ASANA_OAUTH_PORT = 18981;
@@ -1,7 +1,7 @@
1
1
  import { randomBytes as defaultRandomBytes } from 'crypto';
2
2
  import { createServer } from 'http';
3
3
  import { URL } from 'url';
4
- import { base64url, CALLBACK_PATH, createPkce, DEFAULT_TIMEOUT_MS } from "./common.js";
4
+ import { base64url, CALLBACK_PATH, createPkce, DEFAULT_TIMEOUT_MS } from './common.js';
5
5
  export function waitForOAuthCallback(opts) {
6
6
  const { port, state, timeoutMs = DEFAULT_TIMEOUT_MS, onListening } = opts;
7
7
  return new Promise((resolve, reject) => {
@@ -1,5 +1,5 @@
1
- import { runOAuthFlowWithRuntime } from "./flow-core.js";
2
- import { isTokenExpired, refreshOAuthTokensWithFetch } from "./token-exchange-core.js";
1
+ import { runOAuthFlowWithRuntime } from './flow-core.js';
2
+ import { isTokenExpired, refreshOAuthTokensWithFetch } from './token-exchange-core.js';
3
3
  export function createOAuthClient(runtime) {
4
4
  return {
5
5
  runOAuthFlow: (config, deps) => runOAuthFlowWithRuntime(config, deps, runtime),
@@ -32,7 +32,7 @@ export declare function base64url(bytes: Buffer | Uint8Array): string;
32
32
  export declare function createPkce(randomBytes?: RandomBytes): {
33
33
  verifier: string;
34
34
  challenge: string;
35
- method: "S256";
35
+ method: 'S256';
36
36
  };
37
37
  export declare function oauthRedirectUri(port: number): string;
38
38
  export declare function tokenRequest(fetchImpl: Fetch, tokenUrl: string, body: URLSearchParams, label: string): Promise<OAuthTokens>;
@@ -1,6 +1,6 @@
1
1
  import { Buffer } from 'buffer';
2
2
  import { createHash, randomBytes as defaultRandomBytes } from 'crypto';
3
- export { scopedKey } from "./keys.js";
3
+ export { scopedKey } from './keys.js';
4
4
  export const CALLBACK_PATH = '/callback';
5
5
  export const DEFAULT_TIMEOUT_MS = 120_000;
6
6
  export const REFRESH_SKEW_MS = 60_000;
@@ -1,6 +1,6 @@
1
- import { generateRuntimePkceChallenge } from "./pkce-runtime.js";
2
- import { resolveDynamicClientId } from "./register.js";
3
- import { exchangeCodeWithFetch } from "./token-exchange-core.js";
1
+ import { generateRuntimePkceChallenge } from './pkce-runtime.js';
2
+ import { resolveDynamicClientId } from './register.js';
3
+ import { exchangeCodeWithFetch } from './token-exchange-core.js';
4
4
  function buildAuthParams(config, clientId, redirectUri, state, pkce) {
5
5
  const params = new URLSearchParams({
6
6
  ...(config.extraAuthParams ?? {}),
@@ -1,8 +1,8 @@
1
1
  import { abortOAuthLoopback, startOAuthLoopback } from '#oauth-loopback';
2
2
  import { randomBase64Url, sha256Base64Url } from '@qvac/core/oauth/runtime/crypto';
3
3
  import defaultFetch from '@qvac/core/oauth/runtime/fetch';
4
- import { runOAuthFlowWithRuntime } from "./flow-core.js";
5
- import { OAUTH_PROVIDER_PORTS } from "./keys.js";
4
+ import { runOAuthFlowWithRuntime } from './flow-core.js';
5
+ import { OAUTH_PROVIDER_PORTS } from './keys.js';
6
6
  export function cancelOAuthFlow(provider) {
7
7
  return abortOAuthLoopback(OAUTH_PROVIDER_PORTS[provider]);
8
8
  }
@@ -1,9 +1,9 @@
1
1
  import { URLSearchParams } from 'url';
2
2
  import defaultFetch from '#fetch';
3
- import { runBrowserConnect } from "./browser-connect.js";
4
- import { oauthRedirectUri, tokenRequest } from "./common.js";
5
- import { OAUTH_PROVIDER_PORTS, oauthKeySpec } from "./keys.js";
6
- import { resolveOAuthCredential } from "./resolve.js";
3
+ import { runBrowserConnect } from './browser-connect.js';
4
+ import { oauthRedirectUri, tokenRequest } from './common.js';
5
+ import { OAUTH_PROVIDER_PORTS, oauthKeySpec } from './keys.js';
6
+ import { resolveOAuthCredential } from './resolve.js';
7
7
  export const GOOGLE_OAUTH_PORT = OAUTH_PROVIDER_PORTS.google;
8
8
  const REDIRECT_URI = oauthRedirectUri(GOOGLE_OAUTH_PORT);
9
9
  const AUTH_URL = 'https://accounts.google.com/o/oauth2/v2/auth';
@@ -1,3 +1,3 @@
1
- export { buildProviderConfig, providerRequiresSecret, providerSupportsDcr, providerSupportsSharedIosSession } from "./providers.js";
2
- export { isTokenExpired, refreshOAuthTokens } from "./token-exchange.js";
3
- export { cancelOAuthFlow, runOAuthFlow } from "./flow.js";
1
+ export { buildProviderConfig, providerRequiresSecret, providerSupportsDcr, providerSupportsSharedIosSession } from './providers.js';
2
+ export { isTokenExpired, refreshOAuthTokens } from './token-exchange.js';
3
+ export { cancelOAuthFlow, runOAuthFlow } from './flow.js';
@@ -1,5 +1,5 @@
1
1
  import { createServer } from 'http';
2
- import { OAUTH_CALLBACK_PATH, OAUTH_WAIT_FOR_CODE_TIMEOUT_MS, oauthRedirectUri } from "./keys.js";
2
+ import { OAUTH_CALLBACK_PATH, OAUTH_WAIT_FOR_CODE_TIMEOUT_MS, oauthRedirectUri } from './keys.js';
3
3
  const activeLoopbacks = new Map();
4
4
  function closeServer(server) {
5
5
  return new Promise((resolve) => {
@@ -1,8 +1,8 @@
1
1
  import { URLSearchParams } from 'url';
2
2
  import defaultFetch from '#fetch';
3
- import { runBrowserConnect } from "./browser-connect.js";
4
- import { oauthRedirectUri, tokenRequest } from "./common.js";
5
- import { resolveOAuthCredential } from "./resolve.js";
3
+ import { runBrowserConnect } from './browser-connect.js';
4
+ import { oauthRedirectUri, tokenRequest } from './common.js';
5
+ import { resolveOAuthCredential } from './resolve.js';
6
6
  export const NOTION_MCP_CREDENTIAL_KEY = 'notion_mcp_access_token';
7
7
  export const NOTION_OAUTH_STATE_KEY = 'notion_oauth';
8
8
  export const NOTION_OAUTH_PORT = 18982;
@@ -1,4 +1,4 @@
1
- import { OAUTH_PROVIDER_PORTS, oauthKeySpec } from "./keys.js";
1
+ import { OAUTH_PROVIDER_PORTS, oauthKeySpec } from './keys.js';
2
2
  const ASANA_MCP_RESOURCE = 'https://mcp.asana.com/v2';
3
3
  export function providerRequiresSecret(provider) {
4
4
  return provider === 'google' || provider === 'asana';
@@ -1,4 +1,4 @@
1
- import { REFRESH_SKEW_MS, scopedKey } from "./common.js";
1
+ import { REFRESH_SKEW_MS, scopedKey } from './common.js';
2
2
  const inFlightRefresh = new Map();
3
3
  export async function resolveOAuthCredential(opts) {
4
4
  const { engine, agentId, credentialKey, stateKey, refresh, requireClientSecret = false } = opts;
@@ -1,8 +1,8 @@
1
1
  import { URLSearchParams } from 'url';
2
2
  import defaultFetch from '#fetch';
3
- import { runBrowserConnect } from "./browser-connect.js";
4
- import { oauthRedirectUri, tokenRequest } from "./common.js";
5
- import { resolveOAuthCredential } from "./resolve.js";
3
+ import { runBrowserConnect } from './browser-connect.js';
4
+ import { oauthRedirectUri, tokenRequest } from './common.js';
5
+ import { resolveOAuthCredential } from './resolve.js';
6
6
  export const SPOTIFY_CREDENTIAL_KEY = 'spotify_access_token';
7
7
  export const SPOTIFY_OAUTH_STATE_KEY = 'spotify_oauth';
8
8
  export const SPOTIFY_OAUTH_PORT = 18974;
@@ -1,5 +1,5 @@
1
1
  import defaultFetch from '@qvac/core/oauth/runtime/fetch';
2
- import { exchangeCodeWithFetch, isTokenExpired, refreshOAuthTokensWithFetch } from "./token-exchange-core.js";
2
+ import { exchangeCodeWithFetch, isTokenExpired, refreshOAuthTokensWithFetch } from './token-exchange-core.js';
3
3
  export function exchangeCode(config, clientId, redirectUri, code, verifier, deps) {
4
4
  return exchangeCodeWithFetch(config, clientId, redirectUri, code, verifier, deps, defaultFetch);
5
5
  }
@@ -1,2 +1,2 @@
1
- export { createOAuthClient, isTokenExpired } from "./oauth/client.js";
2
- export { buildProviderConfig, providerRequiresSecret, providerSupportsDcr, providerSupportsSharedIosSession } from "./oauth/providers.js";
1
+ export { createOAuthClient, isTokenExpired } from './oauth/client.js';
2
+ export { buildProviderConfig, providerRequiresSecret, providerSupportsDcr, providerSupportsSharedIosSession } from './oauth/providers.js';
@@ -1,12 +1,12 @@
1
- export { createPkce, scopedKey } from "./oauth/common.js";
2
- export { waitForOAuthCallback } from "./oauth/browser-connect.js";
3
- export { buildGoogleAuthUrl, connectGoogle, exchangeGoogleCode, GOOGLE_OAUTH_PORT, refreshGoogleToken, resolveGoogleCredential } from "./oauth/google.js";
4
- export { buildNotionAuthUrl, connectNotion, exchangeNotionCode, NOTION_MCP_CREDENTIAL_KEY, NOTION_OAUTH_PORT, NOTION_OAUTH_STATE_KEY, refreshNotionToken, registerNotionClient, resolveNotionCredential } from "./oauth/notion.js";
5
- export { buildAsanaAuthUrl, connectAsana, exchangeAsanaCode, ASANA_MCP_CREDENTIAL_KEY, ASANA_OAUTH_PORT, ASANA_OAUTH_STATE_KEY, refreshAsanaToken, resolveAsanaCredential } from "./oauth/asana.js";
6
- export { buildSpotifyAuthUrl, connectSpotify, exchangeSpotifyCode, refreshSpotifyToken, resolveSpotifyCredential, SPOTIFY_CREDENTIAL_KEY, SPOTIFY_OAUTH_PORT, SPOTIFY_OAUTH_STATE_KEY } from "./oauth/spotify.js";
7
- export { cancelOAuthFlow, runOAuthFlow } from "./oauth/flow.js";
8
- export { defaultCredentialKeyFor, GMAIL_CREDENTIAL_KEY, GOOGLE_CALENDAR_CREDENTIAL_KEY, GOOGLE_CREDENTIAL_KEYS, GOOGLE_DOCS_CREDENTIAL_KEY, GOOGLE_DRIVE_CREDENTIAL_KEY, GOOGLE_SHEETS_CREDENTIAL_KEY, LEGACY_GOOGLE_CREDENTIAL_KEY, OAUTH_KEY_SPECS, oauthKeySpec, oauthStateKeyFor } from "./oauth/keys.js";
9
- export { generatePkceChallenge } from "./oauth/pkce.js";
10
- export { buildProviderConfig, providerRequiresSecret, providerSupportsDcr, providerSupportsSharedIosSession } from "./oauth/providers.js";
11
- export { registerOAuthClient, resolveDynamicClientId } from "./oauth/register.js";
12
- export { isTokenExpired, refreshOAuthTokens } from "./oauth/token-exchange.js";
1
+ export { createPkce, scopedKey } from './oauth/common.js';
2
+ export { waitForOAuthCallback } from './oauth/browser-connect.js';
3
+ export { buildGoogleAuthUrl, connectGoogle, exchangeGoogleCode, GOOGLE_OAUTH_PORT, refreshGoogleToken, resolveGoogleCredential } from './oauth/google.js';
4
+ export { buildNotionAuthUrl, connectNotion, exchangeNotionCode, NOTION_MCP_CREDENTIAL_KEY, NOTION_OAUTH_PORT, NOTION_OAUTH_STATE_KEY, refreshNotionToken, registerNotionClient, resolveNotionCredential } from './oauth/notion.js';
5
+ export { buildAsanaAuthUrl, connectAsana, exchangeAsanaCode, ASANA_MCP_CREDENTIAL_KEY, ASANA_OAUTH_PORT, ASANA_OAUTH_STATE_KEY, refreshAsanaToken, resolveAsanaCredential } from './oauth/asana.js';
6
+ export { buildSpotifyAuthUrl, connectSpotify, exchangeSpotifyCode, refreshSpotifyToken, resolveSpotifyCredential, SPOTIFY_CREDENTIAL_KEY, SPOTIFY_OAUTH_PORT, SPOTIFY_OAUTH_STATE_KEY } from './oauth/spotify.js';
7
+ export { cancelOAuthFlow, runOAuthFlow } from './oauth/flow.js';
8
+ export { defaultCredentialKeyFor, GMAIL_CREDENTIAL_KEY, GOOGLE_CALENDAR_CREDENTIAL_KEY, GOOGLE_CREDENTIAL_KEYS, GOOGLE_DOCS_CREDENTIAL_KEY, GOOGLE_DRIVE_CREDENTIAL_KEY, GOOGLE_SHEETS_CREDENTIAL_KEY, LEGACY_GOOGLE_CREDENTIAL_KEY, OAUTH_KEY_SPECS, oauthKeySpec, oauthStateKeyFor } from './oauth/keys.js';
9
+ export { generatePkceChallenge } from './oauth/pkce.js';
10
+ export { buildProviderConfig, providerRequiresSecret, providerSupportsDcr, providerSupportsSharedIosSession } from './oauth/providers.js';
11
+ export { registerOAuthClient, resolveDynamicClientId } from './oauth/register.js';
12
+ export { isTokenExpired, refreshOAuthTokens } from './oauth/token-exchange.js';
@@ -1,14 +1,14 @@
1
1
  export declare const RUN_ABORT_REASONS: {
2
- readonly suspended: "suspended";
3
- readonly ownershipLost: "ownership-lost";
4
- readonly runSettled: "run-settled";
5
- readonly runnerDied: "runner-died";
6
- readonly runnerClosed: "runner-closed";
2
+ readonly suspended: 'suspended';
3
+ readonly ownershipLost: 'ownership-lost';
4
+ readonly runSettled: 'run-settled';
5
+ readonly runnerDied: 'runner-died';
6
+ readonly runnerClosed: 'runner-closed';
7
7
  };
8
8
  export type RunAbortReason = (typeof RUN_ABORT_REASONS)[keyof typeof RUN_ABORT_REASONS];
9
9
  export declare const RUN_FAILURE_REASONS: {
10
- readonly harnessDied: "the model runtime died";
11
- readonly runtimeEndedTurn: "the model runtime ended this turn";
10
+ readonly harnessDied: 'the model runtime died';
11
+ readonly runtimeEndedTurn: 'the model runtime ended this turn';
12
12
  };
13
13
  export type AbortOutcome = {
14
14
  readonly kind: 'replay';
@@ -1,4 +1,4 @@
1
- import { WriteQueue } from "./write-queue.js";
1
+ import { WriteQueue } from './write-queue.js';
2
2
  const COALESCE_CAP = 8192;
3
3
  const FLUSH_INTERVAL_MS = 250;
4
4
  const SLOW_WRITE_MS = 5000;
@@ -9,12 +9,12 @@ import Hyperschema from 'hyperschema';
9
9
  import HyperschemaTS from 'hyperschema-ts';
10
10
  import HyperDB from 'hyperdb/builder';
11
11
  import { resetHrpcIds, rewindSpec, unstageSpec } from '@qvac/harness/schema/baseline';
12
- import { assertFieldOrder } from "./field-order.js";
13
- import { VENDORED_MIN_SUPPORTED_VERSION, registerConfigTypes } from "./config.js";
14
- import { registerEngineApi, registerEngineTypes } from "./engine.js";
12
+ import { assertFieldOrder } from './field-order.js';
13
+ import { VENDORED_MIN_SUPPORTED_VERSION, registerConfigTypes } from './config.js';
14
+ import { registerEngineApi, registerEngineTypes } from './engine.js';
15
15
  import { writeBind, writeCapabilities, writeClient, writeConfigTypes } from '@qvac/harness/schema/generate';
16
- import { registerLocalCollections, registerLocalTypes } from "./local.js";
17
- import { registerQvacCollections, registerQvacDispatch, registerQvacTypes } from "./qvac.js";
16
+ import { registerLocalCollections, registerLocalTypes } from './local.js';
17
+ import { registerQvacCollections, registerQvacDispatch, registerQvacTypes } from './qvac.js';
18
18
  const dir = path.dirname(fileURLToPath(import.meta.url));
19
19
  const ROOT = path.join(dir, '..');
20
20
  const SPEC_DIR = path.join(dir, '..', 'spec');
@@ -67,7 +67,13 @@ const builder = HRPCBuilder.from(SCHEMA_DIR, HRPC_DIR);
67
67
  registerEngineApi(builder.namespace('assistant'));
68
68
  HRPCBuilder.toDisk(builder);
69
69
  writeBind(builder, path.join(SPEC_DIR, 'bind.js'));
70
- const callSites = { optionalRequests: new Set(['@assistant/empty', '@assistant/mesh-scope']) };
70
+ const callSites = {
71
+ optionalRequests: new Set([
72
+ '@assistant/empty',
73
+ '@assistant/mesh-scope',
74
+ '@assistant/create-room-request'
75
+ ])
76
+ };
71
77
  writeClient(builder, path.join(SPEC_DIR, 'calls.js'), callSites);
72
78
  writeCapabilities(builder, path.join(SPEC_DIR, 'capabilities.d.ts'), callSites);
73
79
  const localSchema = Hyperschema.from(LOCAL_SCHEMA_DIR);
@@ -2,17 +2,17 @@ export declare const CHUNK_TYPES: string[];
2
2
  export declare const RUN_STATES: string[];
3
3
  export declare const APPROVAL_STATUSES: string[];
4
4
  export declare const CHUNK_PAYLOAD_FIELDS: {
5
- readonly 'user-message': "userMessage";
6
- readonly content: "content";
7
- readonly thinking: "thinking";
8
- readonly 'tool-call': "toolCall";
9
- readonly 'tool-result': "toolResult";
10
- readonly attachment: "attachment";
11
- readonly 'approval-request': "approvalRequest";
12
- readonly 'run-status': "runStatus";
13
- readonly 'run-request': "runRequest";
14
- readonly sources: "sources";
15
- readonly compaction: "compaction";
5
+ readonly 'user-message': 'userMessage';
6
+ readonly content: 'content';
7
+ readonly thinking: 'thinking';
8
+ readonly 'tool-call': 'toolCall';
9
+ readonly 'tool-result': 'toolResult';
10
+ readonly attachment: 'attachment';
11
+ readonly 'approval-request': 'approvalRequest';
12
+ readonly 'run-status': 'runStatus';
13
+ readonly 'run-request': 'runRequest';
14
+ readonly sources: 'sources';
15
+ readonly compaction: 'compaction';
16
16
  };
17
17
  export type ChunkType = keyof typeof CHUNK_PAYLOAD_FIELDS;
18
18
  export type ChunkPayloadField = (typeof CHUNK_PAYLOAD_FIELDS)[ChunkType];