@frockbot/plugin-fly-sprite 0.1.0 → 0.1.1
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 +8 -8
- package/src/computer.test.ts +26 -2
- package/src/computer.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-fly-sprite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@cordisjs/plugin-webui": "0.8.2",
|
|
28
|
-
"@frockbot/computer-core": "0.1.
|
|
29
|
-
"@frockbot/computer-host-protocol": "0.1.
|
|
30
|
-
"@frockbot/computer-host-runtime": "0.1.
|
|
31
|
-
"@frockbot/kernel-contracts": "0.1.
|
|
32
|
-
"@frockbot/plugin-computer": "0.1.
|
|
28
|
+
"@frockbot/computer-core": "0.1.1",
|
|
29
|
+
"@frockbot/computer-host-protocol": "0.1.1",
|
|
30
|
+
"@frockbot/computer-host-runtime": "0.1.1",
|
|
31
|
+
"@frockbot/kernel-contracts": "0.1.1",
|
|
32
|
+
"@frockbot/plugin-computer": "0.1.1",
|
|
33
33
|
"cordis": "4.0.0-rc.8"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@frockbot/plugin-testkit": "0.1.
|
|
37
|
-
"@frockbot/workspace-store": "0.1.
|
|
36
|
+
"@frockbot/plugin-testkit": "0.1.1",
|
|
37
|
+
"@frockbot/workspace-store": "0.1.1",
|
|
38
38
|
"@types/bun": "1.4.0",
|
|
39
39
|
"@types/node": "26.2.0",
|
|
40
40
|
"typescript": "5.9.3"
|
package/src/computer.test.ts
CHANGED
|
@@ -178,7 +178,7 @@ describe("Fly Sprite computer", () => {
|
|
|
178
178
|
]);
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
-
test("describes an in-place runtime update in the provider message", async () => {
|
|
181
|
+
test("describes an in-place runtime update still running in the provider message", async () => {
|
|
182
182
|
const host = fakeHost();
|
|
183
183
|
host.provisioning = {
|
|
184
184
|
kind: "update",
|
|
@@ -186,7 +186,7 @@ describe("Fly Sprite computer", () => {
|
|
|
186
186
|
label: "Updating the Computer runtime",
|
|
187
187
|
index: 1,
|
|
188
188
|
total: 2,
|
|
189
|
-
status: "
|
|
189
|
+
status: "running",
|
|
190
190
|
resumed: false,
|
|
191
191
|
};
|
|
192
192
|
|
|
@@ -203,6 +203,30 @@ describe("Fly Sprite computer", () => {
|
|
|
203
203
|
);
|
|
204
204
|
});
|
|
205
205
|
|
|
206
|
+
test("an update the host completed inside the open is ready, not updating", async () => {
|
|
207
|
+
const host = fakeHost();
|
|
208
|
+
host.provisioning = {
|
|
209
|
+
kind: "update",
|
|
210
|
+
phase: "ready",
|
|
211
|
+
label: "the Computer update is complete",
|
|
212
|
+
index: 2,
|
|
213
|
+
total: 2,
|
|
214
|
+
status: "complete",
|
|
215
|
+
resumed: false,
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const provider = new FlySpriteComputerProvider(attach(host));
|
|
219
|
+
const computer = await provider.open(
|
|
220
|
+
{ userId: "owner" },
|
|
221
|
+
{ botId: "general" },
|
|
222
|
+
{ providerId: "fly-sprite", generation: 1 },
|
|
223
|
+
);
|
|
224
|
+
const connected = await computer.presence?.connect();
|
|
225
|
+
|
|
226
|
+
expect(connected?.url).toBeTruthy();
|
|
227
|
+
expect(connected?.message).toBeUndefined();
|
|
228
|
+
});
|
|
229
|
+
|
|
206
230
|
test("an unconfigured Computer refuses rather than pretending", async () => {
|
|
207
231
|
const computer = new FlySpriteComputer({ spriteName: "frockbot-test" });
|
|
208
232
|
expect(computer.configured).toBe(false);
|
package/src/computer.ts
CHANGED
|
@@ -1269,7 +1269,10 @@ export class FlySpriteComputer {
|
|
|
1269
1269
|
: {}),
|
|
1270
1270
|
display: opened.display ?? "",
|
|
1271
1271
|
directory: `agent-data/agents/${layout.key}`,
|
|
1272
|
-
|
|
1272
|
+
// A run the host finished inside this open is history, not progress.
|
|
1273
|
+
// Reporting its final "complete" label as an update would leave the Bot
|
|
1274
|
+
// authority holding `updating` for a Computer that is already current.
|
|
1275
|
+
...(opened.provisioning && opened.provisioning.status === "running"
|
|
1273
1276
|
? { message: provisioningMessage(opened.provisioning) }
|
|
1274
1277
|
: {}),
|
|
1275
1278
|
};
|