@arcforge/platform 2.0.218 → 2.0.244

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 (127) hide show
  1. package/package.json +27 -19
  2. package/src/build/blueprint/blueprint.ts +48 -64
  3. package/src/build/blueprint/cognet/abi.ts +3 -257
  4. package/src/build/blueprint/cognet/bundle-worker.ts +11 -0
  5. package/src/build/blueprint/cognet/bundle.ts +294 -89
  6. package/src/build/blueprint/cognet/cognet.ts +8 -7
  7. package/src/build/blueprint/cognet/config/config.ts +52 -0
  8. package/src/build/blueprint/cognet/config/index.ts +4 -0
  9. package/src/build/blueprint/cognet/config/literal.ts +83 -0
  10. package/src/build/blueprint/cognet/config/provider.ts +43 -0
  11. package/src/build/blueprint/cognet/config/shape.ts +183 -0
  12. package/src/build/blueprint/cognet/index.ts +4 -2
  13. package/src/build/blueprint/cognet/native/cargo.ts +31 -0
  14. package/src/build/blueprint/cognet/native/crate.ts +126 -0
  15. package/src/build/blueprint/cognet/native/index.ts +2 -0
  16. package/src/build/blueprint/cognet/native/library.ts +125 -0
  17. package/src/build/blueprint/cognet/native/manifest.ts +137 -0
  18. package/src/build/blueprint/cognet/python/index.ts +1 -0
  19. package/src/build/blueprint/cognet/python/project.ts +119 -0
  20. package/src/build/blueprint/cognet/schema/arrays.ts +23 -0
  21. package/src/build/blueprint/cognet/schema/authored.ts +273 -0
  22. package/src/build/blueprint/cognet/schema/compile.ts +78 -0
  23. package/src/build/blueprint/cognet/schema/components/external.ts +15 -0
  24. package/src/build/blueprint/cognet/schema/components/index.ts +3 -0
  25. package/src/build/blueprint/cognet/schema/components/lock.ts +58 -0
  26. package/src/build/blueprint/cognet/schema/components/model.ts +34 -0
  27. package/src/build/blueprint/cognet/schema/components/python.ts +15 -0
  28. package/src/build/blueprint/cognet/schema/components/python_source.py +69 -0
  29. package/src/build/blueprint/cognet/schema/components/rust.ts +33 -0
  30. package/src/build/blueprint/cognet/schema/components/rust_source/Cargo.lock +117 -0
  31. package/src/build/blueprint/cognet/schema/components/rust_source/Cargo.toml +11 -0
  32. package/src/build/blueprint/cognet/schema/components/rust_source/src/main.rs +104 -0
  33. package/src/build/blueprint/cognet/schema/components/source.ts +220 -0
  34. package/src/build/blueprint/cognet/schema/components/tags.ts +66 -0
  35. package/src/build/blueprint/cognet/schema/components/typescript.ts +157 -0
  36. package/src/build/blueprint/cognet/schema/index.ts +5 -0
  37. package/src/build/blueprint/cognet/schema/interfaces/index.ts +3 -0
  38. package/src/build/blueprint/cognet/schema/interfaces/source.ts +218 -0
  39. package/src/build/blueprint/cognet/schema/python.ts +260 -0
  40. package/src/build/blueprint/cognet/schema/rust.ts +316 -0
  41. package/src/build/blueprint/cognet/schema/schema.ts +248 -0
  42. package/src/build/blueprint/cognet/schema/typescript.ts +352 -0
  43. package/src/build/blueprint/index.ts +1 -1
  44. package/src/build/blueprint/modules/index.ts +7 -5
  45. package/src/build/blueprint/modules/meta.ts +47 -3
  46. package/src/build/blueprint/scan/config.ts +22 -16
  47. package/src/build/blueprint/scan/provider-globals.ts +46 -0
  48. package/src/build/blueprint/scan/providers.ts +25 -0
  49. package/src/build/blueprint/scan/tools.ts +21 -15
  50. package/src/build/extensions/edit.ts +66 -2
  51. package/src/build/extensions/extensions.ts +16 -3
  52. package/src/build/extensions/index.ts +1 -1
  53. package/src/build/project/bundle/agent.ts +26 -17
  54. package/src/build/project/bundle/source.ts +2 -2
  55. package/src/build/project/create/cognet.ts +84 -33
  56. package/src/build/project/create/profile.ts +13 -3
  57. package/src/build/project/index.ts +1 -1
  58. package/src/build/project/installer.ts +6 -5
  59. package/src/build/project/kinds.ts +4 -0
  60. package/src/build/project/manifest/env.ts +10 -0
  61. package/src/build/project/models/blobs/blobs.ts +57 -0
  62. package/src/build/project/models/blobs/index.ts +1 -0
  63. package/src/build/project/models/fetch.ts +46 -51
  64. package/src/build/project/models/index.ts +2 -1
  65. package/src/build/project/models/models.ts +12 -38
  66. package/src/build/project/models/onnx.ts +82 -0
  67. package/src/build/project/models/specifier.ts +9 -3
  68. package/src/build/project/models/storage/index-store.ts +27 -0
  69. package/src/build/project/models/storage/index.ts +1 -0
  70. package/src/build/project/models/store.ts +21 -16
  71. package/src/build/project/prepare.ts +82 -27
  72. package/src/build/project/project.ts +8 -14
  73. package/src/build/project/projects.ts +12 -1
  74. package/src/build/project/tree.ts +13 -3
  75. package/src/build/project/treecache.ts +8 -4
  76. package/src/build/project/typegen/axon-dts.ts +18 -0
  77. package/src/build/project/typegen/cognet-dts.ts +248 -59
  78. package/src/build/project/typegen/prompt-dts.ts +2 -3
  79. package/src/build/project/typegen/registry-dts.ts +2 -2
  80. package/src/build/project/typegen/tsconfig.ts +13 -13
  81. package/src/build/project/typegen/tui-dts.ts +3 -4
  82. package/src/build/project/typegen/workspace-scripts.ts +8 -7
  83. package/src/build/project/typegen/write.ts +15 -2
  84. package/src/build/project/watcher.ts +27 -0
  85. package/src/build/runtime/agent.ts +102 -63
  86. package/src/build/runtime/conformance.ts +25 -0
  87. package/src/build/runtime/escalations.ts +3 -8
  88. package/src/build/runtime/index.ts +2 -0
  89. package/src/build/runtime/instances.ts +7 -4
  90. package/src/build/runtime/progress.ts +6 -2
  91. package/src/build/runtime/reload-watch.ts +11 -8
  92. package/src/debug/README.md +398 -0
  93. package/src/debug/debug.ts +101 -0
  94. package/src/debug/events.ts +156 -0
  95. package/src/debug/graph.ts +94 -0
  96. package/src/debug/index.ts +5 -0
  97. package/src/debug/indexer.ts +286 -0
  98. package/src/debug/inference.ts +53 -0
  99. package/src/debug/log.ts +68 -0
  100. package/src/debug/overview.ts +78 -0
  101. package/src/debug/perf.ts +75 -0
  102. package/src/debug/resources.ts +125 -0
  103. package/src/debug/ring.ts +31 -0
  104. package/src/debug/sessions.ts +90 -0
  105. package/src/debug/signs.ts +119 -0
  106. package/src/debug/tally.ts +44 -0
  107. package/src/debug/types.ts +146 -0
  108. package/src/index.ts +9 -0
  109. package/src/link/agent-main.ts +36 -10
  110. package/src/link/index.ts +1 -1
  111. package/src/link/services.ts +88 -57
  112. package/src/platform.ts +17 -25
  113. package/src/services/cloud.ts +1 -4
  114. package/src/services/control/client.ts +1 -1
  115. package/src/services/control/server.ts +1 -1
  116. package/src/services/index.ts +1 -0
  117. package/src/services/ollama/daemon.ts +23 -0
  118. package/src/services/ollama/http.ts +7 -1
  119. package/src/services/ollama/ollama.ts +8 -14
  120. package/src/services/probe/ask.ts +139 -0
  121. package/src/services/probe/index.ts +3 -0
  122. package/src/services/providers.ts +18 -0
  123. package/src/services/resources/hardware.ts +15 -18
  124. package/src/services/resources/resources.ts +4 -5
  125. package/src/services/store/types.ts +3 -0
  126. package/src/services/running/index.ts +0 -1
  127. package/src/services/running/running.ts +0 -216
@@ -4,7 +4,7 @@ import { err } from "@arcforge/err"
4
4
  import type { ProviderEntry } from "@arcforge/types"
5
5
  import { resolveDefaultBaseUrl } from "@arcforge/cloud"
6
6
  import { KERNEL_ABI_VERSION } from "@arcforge/types"
7
- import { Blueprint, Config, cognetAbi, cognetName, cognetSourceOf, readCognetModels, flatten, DEFAULT_COGNET, type CognetSource, type ScanWarning } from "../blueprint"
7
+ import { Blueprint, Config, cognetAbi, cognetName, cognetSourceOf, CognetConfigFile, flatten, DEFAULT_COGNET, type CognetSource, type ScanWarning } from "../blueprint"
8
8
  import { reconcile } from "./reconcile"
9
9
  import { describeFaults } from "./verify"
10
10
  import { Models } from "./models"
@@ -18,6 +18,7 @@ import { fsx } from "../../utils/fs"
18
18
  import { migrateFrame } from "../frame"
19
19
  import { migrateEngineField } from "./manifest/engine-migrate"
20
20
  import { KINDS, type ProjectKind } from "./kinds"
21
+ import type { WatcherT } from "./watcher"
21
22
 
22
23
  export type PrepareResult = {
23
24
  modules: InstallResult[]
@@ -67,6 +68,8 @@ type PrepareOpts = {
67
68
  * must not become an artifact's dependency.
68
69
  */
69
70
  profileProviders?: () => Promise<readonly ProviderEntry[] | undefined>
71
+ /** Owns invalidation for a reusable successful preparation. */
72
+ watcher: WatcherT
70
73
  }
71
74
 
72
75
  /**
@@ -81,7 +84,7 @@ type PrepareOpts = {
81
84
  */
82
85
  async function phase<T>(
83
86
  report: BuildReporter | undefined,
84
- name: "build:framework" | "build:modules" | "build:cognet" | "build:tree" | "build:typegen",
87
+ name: "build:framework" | "build:modules" | "build:cognet" | "build:compile" | "build:tree" | "build:blueprint" | "build:typegen",
85
88
  start: Record<string, unknown>,
86
89
  run: () => Promise<T>,
87
90
  complete?: (value: T) => Record<string, unknown>,
@@ -239,7 +242,27 @@ export function Prepare(opts: PrepareOpts) {
239
242
  * for CI and deploy — where "the build quietly upgraded something" is a
240
243
  * worse outcome than "the build failed and told you what moved".
241
244
  */
242
- return async function prepare(options: { frozen?: boolean; report?: BuildReporter } = {}): Promise<PrepareResult> {
245
+ let cached: PrepareResult | null = null
246
+ let releaseCache: (() => void) | null = null
247
+
248
+ opts.watcher.onChange(() => {
249
+ cached = null
250
+ releaseCache?.()
251
+ releaseCache = null
252
+ })
253
+
254
+ return async function prepare(options: { frozen?: boolean; report?: BuildReporter; reuse?: boolean } = {}): Promise<PrepareResult> {
255
+ // Only agent boot opts into reuse. Commands such as `axon prepare`
256
+ // remain explicit reconciliation requests, and --frozen remains an
257
+ // assertion against disk rather than a cached answer.
258
+ if (options.reuse && cached) return cached
259
+
260
+ let acquiredCacheWatch = false
261
+ if (options.reuse && !releaseCache) {
262
+ releaseCache = await opts.watcher.retain()
263
+ acquiredCacheWatch = true
264
+ }
265
+ try {
243
266
  // Per call, not per construction: the project is opened long before
244
267
  // anything knows where its build should report. Agent() supplies a
245
268
  // session-backed sink at boot; `axon prepare` on its own supplies
@@ -255,9 +278,9 @@ export function Prepare(opts: PrepareOpts) {
255
278
  * a registry doing exactly what it should.
256
279
  */
257
280
  const notePropagation = (delayMs: number, attempt: number): void => {
258
- report?.("build:warning", {
259
- domain: "install",
260
- error: `a just-published version has not reached this npm edge yet — retrying in ${delayMs / 1_000}s (attempt ${attempt})`,
281
+ report?.("build:progress", {
282
+ stage: "tree",
283
+ message: `a just-published version has not reached this npm edge yet — retrying in ${delayMs / 1_000}s (attempt ${attempt})`,
261
284
  })
262
285
  }
263
286
 
@@ -618,16 +641,18 @@ export function Prepare(opts: PrepareOpts) {
618
641
  })
619
642
  }
620
643
 
621
- if (
622
- needsFrameworkInstall
623
- || cognetNeedsInstall
624
- || reconciled.changed
625
- || verified.needsInstall
626
- || pruned.length > 0
627
- || installed.some(r => r.status === "installed")
628
- || cognetInstall.some(r => r.status === "installed")
629
- || sourceModules.some(r => r.dependenciesChanged)
630
- ) {
644
+ const treeReasons = [
645
+ ...(needsFrameworkInstall ? ["framework"] : []),
646
+ ...(cognetNeedsInstall ? ["cognet"] : []),
647
+ ...(reconciled.changed ? ["manifest"] : []),
648
+ ...(verified.needsInstall ? ["verification"] : []),
649
+ ...(pruned.length > 0 ? ["pruned"] : []),
650
+ ...(installed.some(r => r.status === "installed") ? ["modules"] : []),
651
+ ...(cognetInstall.some(r => r.status === "installed") ? ["cognet-install"] : []),
652
+ ...(sourceModules.some(r => r.dependenciesChanged) ? ["source-module"] : []),
653
+ ]
654
+
655
+ if (treeReasons.length > 0) {
631
656
  // A stale package needs its range re-resolved, not merely
632
657
  // replayed: the lockfile pin is exactly what is holding it back.
633
658
  const refresh = verified.faults.filter(f => f.kind === "stale").map(f => f.name)
@@ -642,7 +667,7 @@ export function Prepare(opts: PrepareOpts) {
642
667
  await phase(
643
668
  report,
644
669
  "build:tree",
645
- { reason: "reconcile" },
670
+ { reason: "reconcile", reasons: treeReasons },
646
671
  () => tree.install({
647
672
  ...(refresh.length ? { refresh } : {}),
648
673
  onPropagationRetry: notePropagation,
@@ -672,7 +697,7 @@ export function Prepare(opts: PrepareOpts) {
672
697
  // without its weights is broken rather than degraded, and
673
698
  // finding that out at first inference is far worse than
674
699
  // finding it at prepare.
675
- const declaredModels = await readCognetModels(blueprint.cognet.sourceDir(cognetSource))
700
+ const declaredModels = CognetConfigFile({ sourceDir: cognetDir }).read()?.models ?? {}
676
701
  return weights.resolve(declaredModels, {
677
702
  ...(options.frozen ? { frozen: true } : {}),
678
703
  onDownload: model => console.log(` fetching ${model.key} — ${model.repo}/${model.file}`),
@@ -684,17 +709,34 @@ export function Prepare(opts: PrepareOpts) {
684
709
  }),
685
710
  )
686
711
 
687
- // compile: true — load() compiles the brain before scanning, because
688
- // the scan reads the manifest compilation writes. A broken build throws:
689
- // no brain, no agent.
712
+ // Compile before the scan that reads its manifest. This used to be
713
+ // hidden inside `blueprint.load({ compile: true })`, which made the
714
+ // reported "Compiling cognet" time include every surface scan. That
715
+ // was especially misleading on a cache hit: the bundle took a few
716
+ // milliseconds while the terminal blamed a few hundred on it.
717
+ //
718
+ // Keep the ordering here, in the one operation that needs both, so a
719
+ // scan can never read a previous brain.
720
+ await phase(
721
+ report,
722
+ "build:compile",
723
+ { specifier: cognetSpecifier },
724
+ () => blueprint.cognet.compile(cognetSource),
725
+ )
726
+
690
727
  const profileProviders = await opts.profileProviders?.()
691
- const { blueprint: loaded, warnings } = await blueprint.load({
692
- compile: true,
693
- ...(Object.keys(resolvedModels.paths).length ? { models: resolvedModels.paths } : {}),
694
- ...(profileProviders ? { profileProviders: [...profileProviders] } : {}),
695
- })
728
+ const { blueprint: loaded, warnings } = await phase(
729
+ report,
730
+ "build:blueprint",
731
+ {},
732
+ () => blueprint.load({
733
+ ...(Object.keys(resolvedModels.paths).length ? { models: resolvedModels.paths } : {}),
734
+ ...(profileProviders ? { profileProviders: [...profileProviders] } : {}),
735
+ }),
736
+ result => ({ warnings: result.warnings.length }),
737
+ )
696
738
 
697
- return {
739
+ const result = {
698
740
  modules: installed,
699
741
  sourceModules,
700
742
  typegen: await phase(
@@ -728,5 +770,18 @@ export function Prepare(opts: PrepareOpts) {
728
770
  })),
729
771
  ],
730
772
  }
773
+
774
+ if (options.reuse) cached = result
775
+ return result
776
+ } catch (cause) {
777
+ // A failed preparation is never reusable. Release the watch this
778
+ // attempt acquired so an error cannot leave an inert project held
779
+ // alive for the rest of the terminal session.
780
+ if (acquiredCacheWatch) {
781
+ releaseCache?.()
782
+ releaseCache = null
783
+ }
784
+ throw cause
785
+ }
731
786
  }
732
787
  }
@@ -85,9 +85,13 @@ export function Project(opts: ProjectOpts) {
85
85
  return watcher.during(run, options)
86
86
  }
87
87
 
88
- // `during` is a thunk because `watcher` is constructed below — the
89
- // installer suspends the watcher around its own writes so a reload cannot
90
- // land between the manifest edits and the node_modules rebuild.
88
+ // One watcher owns both live-reload and prepared-build invalidation.
89
+ // Constructed before Prepare() so a cache can begin watching before its
90
+ // first successful build becomes reusable.
91
+ const watcher = Watcher({ root, debounceMs: RELOAD_DEBOUNCE_MS })
92
+
93
+ // `during` is a thunk because the installer must suspend this watcher
94
+ // around its own writes so a reload cannot land mid-reconciliation.
91
95
  const installer = Installer({
92
96
  root: root,
93
97
  cloud: opts.cloud,
@@ -112,6 +116,7 @@ export function Project(opts: ProjectOpts) {
112
116
  manifest: manifest,
113
117
  tree: tree,
114
118
  typegen: typegen,
119
+ watcher: watcher,
115
120
  frameworkVersion: opts.frameworkVersion,
116
121
  ...(opts.frameworkSource ? { frameworkSource: opts.frameworkSource } : {}),
117
122
  ...(opts.repoRoot ? { repoRoot: opts.repoRoot } : {}),
@@ -121,17 +126,6 @@ export function Project(opts: ProjectOpts) {
121
126
  })
122
127
  const publish = Publish({ kind, root, bundle, manifest, cloud: opts.cloud })
123
128
  const deploy = Deploy({ bundle, manifest, cloud: opts.cloud })
124
- /**
125
- * 150ms, not the watcher's own 100ms default.
126
- *
127
- * An editor writes several times per save (temp file, rename, mtime
128
- * touch), and every one of those is a separate fs notification. The
129
- * profile watcher settled on 150 for the same reason and has been carrying
130
- * it in production — matching it keeps one answer to one question rather
131
- * than two that drift.
132
- */
133
- const watcher = Watcher({ root, debounceMs: RELOAD_DEBOUNCE_MS })
134
-
135
129
  return {
136
130
  root: root,
137
131
  kind: kind,
@@ -42,6 +42,12 @@ type ProjectsOpts = {
42
42
  * cloud client and fails loudly at the call site when logged out.
43
43
  */
44
44
  export function Projects(opts: ProjectsOpts) {
45
+ // A project owns its prepared-build cache and the watcher that validates
46
+ // it. Reopening the same root must therefore return the same handle;
47
+ // constructing a fresh Project() per spawn discarded both and guaranteed
48
+ // a full reconciliation after every close → reopen.
49
+ const opened = new Map<string, ProjectT>()
50
+
45
51
  async function open(root: string, cwd = opts.cwd): Promise<ProjectT> {
46
52
  const absolute = resolve(root)
47
53
  const kind = detectKind(absolute)
@@ -50,7 +56,10 @@ export function Projects(opts: ProjectsOpts) {
50
56
  throw err("PROJECT_NOT_FOUND", { context: { path: absolute } })
51
57
  }
52
58
 
53
- return Project({
59
+ const existing = opened.get(absolute)
60
+ if (existing) return existing
61
+
62
+ const project = Project({
54
63
  root: absolute,
55
64
  kind: kind,
56
65
  name: await projectName(absolute),
@@ -62,6 +71,8 @@ export function Projects(opts: ProjectsOpts) {
62
71
  bench: opts.bench,
63
72
  ...(opts.profileProviders ? { profileProviders: opts.profileProviders } : {}),
64
73
  })
74
+ opened.set(absolute, project)
75
+ return project
65
76
  }
66
77
 
67
78
  /** Open the project at or above cwd, refusing anything that isn't `kind`. */
@@ -432,6 +432,11 @@ async function materialize(source: string, target: string): Promise<void> {
432
432
  await resolveAbsoluteLinks(target)
433
433
  }
434
434
 
435
+ /** Windows requires junctions for directory links without Developer Mode/admin privileges. */
436
+ async function linkDirectory(source: string, target: string): Promise<void> {
437
+ await symlink(source, target, process.platform === "win32" ? "junction" : "dir")
438
+ }
439
+
435
440
  /**
436
441
  * Point a project's node_modules at a cached tree, without copying it.
437
442
  *
@@ -455,7 +460,7 @@ async function graft(source: string, target: string): Promise<void> {
455
460
  await mkdir(target, { recursive: true })
456
461
 
457
462
  for (const entry of await readdir(source)) {
458
- await symlink(join(source, entry), join(target, entry))
463
+ await linkDirectory(join(source, entry), join(target, entry))
459
464
  }
460
465
  }
461
466
 
@@ -469,7 +474,7 @@ async function linkLocal(root: string, local: Array<[string, string]>): Promise<
469
474
  const target = join(root, "node_modules", ...name.split("/"))
470
475
  await rm(target, { recursive: true, force: true })
471
476
  await mkdir(dirname(target), { recursive: true })
472
- await symlink(source, target, "dir")
477
+ await linkDirectory(source, target)
473
478
  }
474
479
  }
475
480
 
@@ -499,6 +504,11 @@ const FRAMEWORK_PACKAGES = [
499
504
  "@arcforge/air",
500
505
  "@arcforge/session",
501
506
  "@arcforge/cognet",
507
+ "@arcforge/locus",
508
+ // The body and world contracts, and the world address an agent plugs in
509
+ // with. A stale copy here is a mind that cannot read the address it was
510
+ // given — which is a runtime failure, not an old type.
511
+ "@arcforge/body",
502
512
  ] as const
503
513
 
504
514
  /**
@@ -543,7 +553,7 @@ async function linkFramework(root: string): Promise<void> {
543
553
 
544
554
  await rm(target, { recursive: true, force: true })
545
555
  await mkdir(dirname(target), { recursive: true })
546
- await symlink(source, target, "dir")
556
+ await linkDirectory(source, target)
547
557
  }
548
558
  }
549
559
 
@@ -1,6 +1,6 @@
1
- import { join } from "node:path"
1
+ import { isAbsolute, join, relative, sep } from "node:path"
2
2
  import { homedir } from "node:os"
3
- import { cp, mkdir, mkdtemp, readdir, readlink, rename, rm } from "node:fs/promises"
3
+ import { cp, mkdir, mkdtemp, readdir, realpath, rename, rm } from "node:fs/promises"
4
4
  import { existsSync } from "node:fs"
5
5
  import { resolveAbsoluteLinks } from "./links"
6
6
 
@@ -359,8 +359,12 @@ export function TreeCache(opts: TreeCacheOpts = {}) {
359
359
  continue // project gone, or has no node_modules any more
360
360
  }
361
361
  for (const entry of entries) {
362
- const link = await readlink(join(modules, entry)).catch(() => null)
363
- if (link?.startsWith(`${treeDir}/`)) return true
362
+ // Resolve junctions too: Windows readlink returns a device-prefixed
363
+ // path (\\\\?\\C:\\...), not a string starting with treeDir.
364
+ const target = await realpath(join(modules, entry)).catch(() => null)
365
+ if (target === null) continue
366
+ const within = relative(treeDir, target)
367
+ if (within && within !== ".." && !within.startsWith(`..${sep}`) && !isAbsolute(within)) return true
364
368
  }
365
369
  }
366
370
  } catch {
@@ -193,6 +193,24 @@ const SHARED_BODY = `\
193
193
  */
194
194
  function defineProps<T extends Record<string, unknown>>(): void
195
195
 
196
+ /**
197
+ * A provider this agent writes — the default export of
198
+ * \`providers/<name>.provider.ts\`. It implements one interface: name it,
199
+ * and write each method as the interface does. Granted to a use in
200
+ * \`services:\` as \`"./providers/<name>"\`.
201
+ *
202
+ * @see https://axon.arclabs.it/docs/v2/cognets/api/interfaces
203
+ */
204
+ const defineProvider: typeof import("@arcforge/types").defineProvider
205
+
206
+ /** Interface vocabulary — what a provider's values are written in, as an interface writes them. */
207
+ type u32 = number
208
+ type i32 = number
209
+ type f32 = number
210
+ type f64 = number
211
+ type Handle<Name extends string> = import("@arcforge/cognet/schema").Handle<Name>
212
+ type Session<Push, Answer> = import("@arcforge/cognet/schema").Session<Push, Answer>
213
+
196
214
  // ── Server plugin registration ────────────────────────────────────────
197
215
 
198
216
  /**