@eum-agent/sandbox-presets 1.0.1 → 1.1.0

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/dist/index.js CHANGED
@@ -730,6 +730,22 @@ function createPresetService(deps) {
730
730
  };
731
731
  }
732
732
  const service = {
733
+ /** Reads committed enabled names without touching path projection or initialization. */
734
+ summary() {
735
+ try {
736
+ guard();
737
+ const state = store.readApplied();
738
+ return {
739
+ status: "ready",
740
+ names: [...new Set(state.profiles.filter((profile) => profile.profile.platforms[host.platform]).map((profile) => profile.profile.name))]
741
+ };
742
+ } catch {
743
+ return {
744
+ status: "unavailable",
745
+ names: []
746
+ };
747
+ }
748
+ },
733
749
  list,
734
750
  preview(selections) {
735
751
  guard();
@@ -1144,6 +1160,7 @@ function registerSandboxPresets(ctx) {
1144
1160
  })
1145
1161
  });
1146
1162
  ctx.onDispose(() => service.dispose());
1163
+ ctx.services.provide("sandbox-preset-summary", { current: service.summary });
1147
1164
  async function result(work) {
1148
1165
  try {
1149
1166
  return {
@@ -1199,6 +1216,7 @@ const plugin = {
1199
1216
  name: "@eum-agent/sandbox-presets",
1200
1217
  requires: ["sandbox-path-locator", "network"],
1201
1218
  optionalServices: ["sandbox-readable-projection"],
1219
+ provides: ["sandbox-preset-summary"],
1202
1220
  apply(ctx) {
1203
1221
  registerSandboxPresets(ctx);
1204
1222
  const module = fileURLToPath(new URL("../ui/ui.js", import.meta.url));
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "en-US": "Sandbox Presets",
5
5
  "zh-CN": "沙箱预设"
6
6
  },
7
- "version": "1.0.1",
7
+ "version": "1.1.0",
8
8
  "type": "module",
9
9
  "description": "Sandbox Presets",
10
10
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  "zod": "^4.4.3"
22
22
  },
23
23
  "devDependencies": {
24
- "@eum-agent/plugin": "1.0.0",
24
+ "@eum-agent/plugin": "1.1.0",
25
25
  "@types/react": "^19.2.18",
26
26
  "@types/react-dom": "^19.2.5",
27
27
  "react": "^19.2.0",
@@ -37,8 +37,8 @@
37
37
  "lucide-react": "^1.40.0",
38
38
  "@types/semver": "7.8.0",
39
39
  "i18next": "^26.4.1",
40
- "@eum-agent/infra-local": "1.0.0",
41
- "@eum-agent/storage-sqlite": "1.0.0"
40
+ "@eum-agent/infra-local": "1.0.1",
41
+ "@eum-agent/storage-sqlite": "1.1.0"
42
42
  },
43
43
  "yaoguang": {
44
44
  "kind": "extension",
@@ -48,8 +48,8 @@
48
48
  },
49
49
  "dependencies": {},
50
50
  "foundationDependencies": {
51
- "@eum-agent/infra-local": "1.0.0",
52
- "@eum-agent/storage-sqlite": "1.0.0"
51
+ "@eum-agent/infra-local": "1.0.1",
52
+ "@eum-agent/storage-sqlite": "1.1.0"
53
53
  }
54
54
  },
55
55
  "scripts": {
package/ui/ui.js CHANGED
@@ -165,7 +165,7 @@ function createPresetAcquisition(api, owner) {
165
165
  ...snapshot,
166
166
  syncing: true
167
167
  });
168
- operationId = owner.uuid?.() ?? crypto.randomUUID();
168
+ operationId = owner.uuid();
169
169
  const id = operationId;
170
170
  const running = {
171
171
  epoch,