@arcforge/platform 2.0.216 → 2.0.218
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 +11 -11
- package/src/platform.ts +15 -1
- package/src/services/cloud.ts +9 -0
- package/src/services/registry.ts +27 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcforge/platform",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.218",
|
|
4
4
|
"description": "The Axon developer platform — headless project discovery, blueprint scanning, typegen, agent lifecycle, registry, benches and tests. Shared by the CLI/TUI and the Fleet extension.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
"deploy": "echo \"This package is published ONLY by apps/tui/scripts/release.ts, which pins workspace:* deps to concrete versions first. Publishing it directly ships an unresolvable dependency.\" && exit 1"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@arcforge/session": "2.0.
|
|
48
|
-
"@arcforge/engines": "2.0.
|
|
49
|
-
"@arcforge/err": "2.0.
|
|
50
|
-
"@arcforge/types": "2.0.
|
|
51
|
-
"@arcforge/cloud": "2.0.
|
|
52
|
-
"@arcforge/capsule": "2.0.
|
|
53
|
-
"@arcforge/core": "2.0.
|
|
54
|
-
"@arcforge/vstr": "2.0.
|
|
47
|
+
"@arcforge/session": "2.0.218",
|
|
48
|
+
"@arcforge/engines": "2.0.218",
|
|
49
|
+
"@arcforge/err": "2.0.218",
|
|
50
|
+
"@arcforge/types": "2.0.218",
|
|
51
|
+
"@arcforge/cloud": "2.0.218",
|
|
52
|
+
"@arcforge/capsule": "2.0.218",
|
|
53
|
+
"@arcforge/core": "2.0.218",
|
|
54
|
+
"@arcforge/vstr": "2.0.218",
|
|
55
55
|
"fft.js": "^4.0.4",
|
|
56
56
|
"h3": "^1.15.11",
|
|
57
57
|
"semver": "^7.7.4",
|
|
58
58
|
"sharp": "^0.35.3",
|
|
59
59
|
"typescript": "5.9.2",
|
|
60
|
-
"@arcforge/link": "2.0.
|
|
60
|
+
"@arcforge/link": "2.0.218"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@arcforge/air": "2.0.215",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"@types/bun": "latest",
|
|
67
67
|
"@types/semver": "^7.7.1"
|
|
68
68
|
},
|
|
69
|
-
"axonRevision": "
|
|
69
|
+
"axonRevision": "bfbb695da8a820cef52f99cbf6cc084f872c3f87"
|
|
70
70
|
}
|
package/src/platform.ts
CHANGED
|
@@ -92,7 +92,12 @@ export function Platform(opts: PlatformOpts) {
|
|
|
92
92
|
return result
|
|
93
93
|
},
|
|
94
94
|
})
|
|
95
|
-
const cloud = Cloud({
|
|
95
|
+
const cloud = Cloud({
|
|
96
|
+
store: store,
|
|
97
|
+
distribution: distribution,
|
|
98
|
+
release: opts.version,
|
|
99
|
+
...(opts.fetch !== undefined ? { fetch: opts.fetch } : {}),
|
|
100
|
+
})
|
|
96
101
|
|
|
97
102
|
const ollama = Ollama() // local models via the Ollama daemon
|
|
98
103
|
const mic = Mic() // mic capture + visualizer service
|
|
@@ -267,6 +272,15 @@ export function Platform(opts: PlatformOpts) {
|
|
|
267
272
|
export type PlatformT = ReturnType<typeof Platform>
|
|
268
273
|
|
|
269
274
|
type PlatformOpts = {
|
|
275
|
+
/**
|
|
276
|
+
* Transport override, forwarded to the cloud client — see HttpOpts.fetch.
|
|
277
|
+
*
|
|
278
|
+
* A test that needs to control the network injects it here instead of
|
|
279
|
+
* assigning over `globalThis.fetch`: Bun runs test FILES concurrently in
|
|
280
|
+
* one process, so a global stub is live inside every other file running at
|
|
281
|
+
* the same moment. Production passes nothing.
|
|
282
|
+
*/
|
|
283
|
+
fetch?: typeof fetch
|
|
270
284
|
/**
|
|
271
285
|
* Who supervises a spawned agent.
|
|
272
286
|
*
|
package/src/services/cloud.ts
CHANGED
|
@@ -19,6 +19,14 @@ type CloudOpts = {
|
|
|
19
19
|
distribution: Distribution
|
|
20
20
|
/** Shipped host version stamped onto every crash report. */
|
|
21
21
|
release: string
|
|
22
|
+
/**
|
|
23
|
+
* Transport override — see HttpOpts.fetch.
|
|
24
|
+
*
|
|
25
|
+
* Present so a test can isolate the network to ONE Platform instead of
|
|
26
|
+
* assigning over `globalThis.fetch`, which every concurrently-running test
|
|
27
|
+
* file shares. Production passes nothing.
|
|
28
|
+
*/
|
|
29
|
+
fetch?: typeof fetch
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
export type Distribution = "production" | "development"
|
|
@@ -142,6 +150,7 @@ export function Cloud(opts: CloudOpts) {
|
|
|
142
150
|
environmentCredentials: policy.environmentCredentials,
|
|
143
151
|
release: opts.release,
|
|
144
152
|
onUnauthorized: () => { void onSessionExpired() },
|
|
153
|
+
...(opts.fetch !== undefined ? { fetch: opts.fetch } : {}),
|
|
145
154
|
})
|
|
146
155
|
}
|
|
147
156
|
|
package/src/services/registry.ts
CHANGED
|
@@ -96,7 +96,31 @@ export type PromptCacheT = ReturnType<typeof PromptCache>
|
|
|
96
96
|
*/
|
|
97
97
|
export type CloneOptions = { dir?: string; reportPrepareFailure?: boolean }
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Fetching the artifact bytes is an INJECTABLE seam, not a bare global.
|
|
101
|
+
*
|
|
102
|
+
* `download` used to reach straight for `globalThis.fetch`, which left a test
|
|
103
|
+
* no way to serve a fixture tarball except to assign over that global. With
|
|
104
|
+
* `parallel = true` in bunfig, Bun interleaves test FILES in one process, so
|
|
105
|
+
* one file's stub was live inside every other file running at the same
|
|
106
|
+
* moment: `zeno.test.ts` called clone() and was served `registry.test.ts`'s
|
|
107
|
+
* archive of a directory that test had already deleted. 94 failures traced to
|
|
108
|
+
* that one assignment, and an `afterEach` restore cannot help — it runs after
|
|
109
|
+
* its own describe, long after a concurrent file has been handed the wrong
|
|
110
|
+
* fetch.
|
|
111
|
+
*
|
|
112
|
+
* Injected the same way `Framework({ fetch })` in libs/repo already does it:
|
|
113
|
+
* the default is the real thing, so production wiring passes nothing.
|
|
114
|
+
*/
|
|
115
|
+
export type ArtifactDownload = (url: string) => Promise<ArrayBuffer>
|
|
116
|
+
|
|
117
|
+
export function Registry(opts: {
|
|
118
|
+
cloud: AxonCloudClient
|
|
119
|
+
prepare(root: string): Promise<void>
|
|
120
|
+
download?: ArtifactDownload
|
|
121
|
+
}) {
|
|
122
|
+
const fetchArtifact: ArtifactDownload = opts.download ?? download
|
|
123
|
+
|
|
100
124
|
/**
|
|
101
125
|
* Install what was downloaded. Throws by DEFAULT; reports only on request.
|
|
102
126
|
*
|
|
@@ -142,7 +166,7 @@ export function Registry(opts: { cloud: AxonCloudClient; prepare(root: string):
|
|
|
142
166
|
const { name, version: requestedVersion } = parseSpecifier(ref)
|
|
143
167
|
const resolved = await opts.cloud.registry.resolve(name, requestedVersion)
|
|
144
168
|
const target = resolve(cwd, options.dir ?? directoryName(resolved.name))
|
|
145
|
-
await extract(await
|
|
169
|
+
await extract(await fetchArtifact(resolved.downloadUrl), target)
|
|
146
170
|
const prepareError = await runPrepare(target, options.reportPrepareFailure === true)
|
|
147
171
|
|
|
148
172
|
return { ...resolved, root: target, prepareError }
|
|
@@ -155,7 +179,7 @@ export function Registry(opts: { cloud: AxonCloudClient; prepare(root: string):
|
|
|
155
179
|
const { name, version: requestedVersion } = parseSpecifier(ref)
|
|
156
180
|
const resolved = await opts.cloud.registry.resolve(name, requestedVersion)
|
|
157
181
|
const target = resolve(cwd, options.dir ?? directoryName(options.as))
|
|
158
|
-
await extract(await
|
|
182
|
+
await extract(await fetchArtifact(resolved.downloadUrl), target)
|
|
159
183
|
|
|
160
184
|
const cloneResult = { ...resolved, root: target }
|
|
161
185
|
const packagePath = join(cloneResult.root, "package.json")
|