@frockbot/plugin-shell 0.2.2 → 0.2.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frockbot/plugin-shell",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -46,39 +46,39 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@cordisjs/plugin-webui": "0.8.2",
49
- "@frockbot/agent-runtime": "0.2.2",
50
- "@frockbot/application-foundation": "0.2.2",
51
- "@frockbot/catalog-core": "0.2.2",
52
- "@frockbot/client-core": "0.2.2",
53
- "@frockbot/client-ui": "0.2.2",
54
- "@frockbot/computer-core": "0.2.2",
55
- "@frockbot/computer-host-protocol": "0.2.2",
56
- "@frockbot/configuration-core": "0.2.2",
57
- "@frockbot/connection-core": "0.2.2",
58
- "@frockbot/kernel-agent-loop": "0.2.2",
59
- "@frockbot/kernel-composition": "0.2.2",
60
- "@frockbot/kernel-contracts": "0.2.2",
61
- "@frockbot/kernel-do": "0.2.2",
62
- "@frockbot/machine-protocol": "0.2.2",
63
- "@frockbot/plugin-authoring": "0.2.2",
64
- "@frockbot/plugin-package-catalog": "0.2.2",
65
- "@frockbot/plugin-bot-template": "0.2.2",
66
- "@frockbot/plugin-flock": "0.2.2",
67
- "@frockbot/plugin-image": "0.2.2",
68
- "@frockbot/plugin-machine-messages": "0.2.2",
69
- "@frockbot/plugin-mcp": "0.2.2",
70
- "@frockbot/plugin-memory": "0.2.2",
71
- "@frockbot/plugin-routines": "0.2.2",
72
- "@frockbot/plugin-skills": "0.2.2",
73
- "@frockbot/plugin-subagents": "0.2.2",
74
- "@frockbot/plugin-user-machine": "0.2.2",
75
- "@frockbot/protocol": "0.2.2",
49
+ "@frockbot/agent-runtime": "0.2.3",
50
+ "@frockbot/application-foundation": "0.2.3",
51
+ "@frockbot/catalog-core": "0.2.3",
52
+ "@frockbot/client-core": "0.2.3",
53
+ "@frockbot/client-ui": "0.2.3",
54
+ "@frockbot/computer-core": "0.2.3",
55
+ "@frockbot/computer-host-protocol": "0.2.3",
56
+ "@frockbot/configuration-core": "0.2.3",
57
+ "@frockbot/connection-core": "0.2.3",
58
+ "@frockbot/kernel-agent-loop": "0.2.3",
59
+ "@frockbot/kernel-composition": "0.2.3",
60
+ "@frockbot/kernel-contracts": "0.2.3",
61
+ "@frockbot/kernel-do": "0.2.3",
62
+ "@frockbot/machine-protocol": "0.2.3",
63
+ "@frockbot/plugin-authoring": "0.2.3",
64
+ "@frockbot/plugin-package-catalog": "0.2.3",
65
+ "@frockbot/plugin-bot-template": "0.2.3",
66
+ "@frockbot/plugin-flock": "0.2.3",
67
+ "@frockbot/plugin-image": "0.2.3",
68
+ "@frockbot/plugin-machine-messages": "0.2.3",
69
+ "@frockbot/plugin-mcp": "0.2.3",
70
+ "@frockbot/plugin-memory": "0.2.3",
71
+ "@frockbot/plugin-routines": "0.2.3",
72
+ "@frockbot/plugin-skills": "0.2.3",
73
+ "@frockbot/plugin-subagents": "0.2.3",
74
+ "@frockbot/plugin-user-machine": "0.2.3",
75
+ "@frockbot/protocol": "0.2.3",
76
76
  "cordis": "4.0.0-rc.8",
77
77
  "vue": "3.5.41"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@cloudflare/workers-types": "latest",
81
- "@frockbot/plugin-tools": "0.2.2",
81
+ "@frockbot/plugin-tools": "0.2.3",
82
82
  "@types/bun": "1.3.6",
83
83
  "@types/node": "26.2.0",
84
84
  "@vitejs/plugin-vue": "6.0.8",
@@ -925,6 +925,46 @@ describe("Bot selection", () => {
925
925
  ).rejects.toThrow(failure);
926
926
  expect(provided.value.settingsError).toBe(failure);
927
927
  });
928
+
929
+ test("shows the backend reason when adding a Package is refused", async () => {
930
+ let provided: Ref<FrockBotWebData> | undefined;
931
+ const failure =
932
+ 'Package "custom-models" requires Package "settings" to be installed and enabled; enable "settings" first';
933
+ await shellClientPlugin({
934
+ transport: {
935
+ turn: () => Promise.resolve({ runId: "run", text: "", events: [] }),
936
+ executeConfiguration: (command) =>
937
+ Promise.resolve({
938
+ schemaVersion: 1,
939
+ commandId: command.commandId,
940
+ revision: command.expectedRevision,
941
+ status: "rejected",
942
+ failure,
943
+ }),
944
+ },
945
+ slot: () => () => {},
946
+ inject: () => {
947
+ throw new Error("unexpected client provider injection");
948
+ },
949
+ provide: (_key, value) => {
950
+ provided = value as Ref<FrockBotWebData>;
951
+ return () => {};
952
+ },
953
+ });
954
+ if (!provided) throw new Error("shell data was not provided");
955
+ provided.value.userSettings = {
956
+ schemaVersion: 1,
957
+ revision: 2,
958
+ profile: { name: "User" },
959
+ packages: [],
960
+ connections: [],
961
+ };
962
+
963
+ await expect(
964
+ provided.value.installPackage("custom-models", "0.0.1"),
965
+ ).rejects.toThrow(failure);
966
+ expect(provided.value.settingsError).toBe(failure);
967
+ });
928
968
  });
929
969
 
930
970
  describe("detached Turn projection", () => {
@@ -1773,7 +1773,7 @@ export const shellClientPlugin: ClientPlugin = (ctx) => {
1773
1773
  if (!settings || !ctx.transport.executeConfiguration) {
1774
1774
  throw new Error("Plugins are unavailable");
1775
1775
  }
1776
- await ctx.transport.executeConfiguration({
1776
+ const receipt = await ctx.transport.executeConfiguration({
1777
1777
  schemaVersion: 1,
1778
1778
  type: "user/install-package",
1779
1779
  commandId: crypto.randomUUID(),
@@ -1782,6 +1782,10 @@ export const shellClientPlugin: ClientPlugin = (ctx) => {
1782
1782
  version,
1783
1783
  });
1784
1784
  await web.value.loadPluginCatalog();
1785
+ if (receipt.status === "rejected") {
1786
+ web.value.settingsError = receipt.failure;
1787
+ throw new Error(receipt.failure);
1788
+ }
1785
1789
  },
1786
1790
  async startConnection(
1787
1791
  packageId: string,
@@ -44,5 +44,14 @@ describe("model runtime presentation", () => {
44
44
  failure: 'Connection "work" is revoked; enable or reconnect it',
45
45
  }),
46
46
  ).toBe('Connection "work" is revoked; enable or reconnect it');
47
+ const disabledProvider =
48
+ 'Package "provider-ollama-cloud" is not installed and enabled; enable it to use Connection "ollama-legacy"';
49
+ expect(
50
+ modelRuntimeLabel({
51
+ source: "account",
52
+ providerModelId: "glm-5.3-flash:cloud",
53
+ failure: disabledProvider,
54
+ }),
55
+ ).toBe(disabledProvider);
47
56
  });
48
57
  });