multicorn-shield 1.10.0 → 1.11.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/CHANGELOG.md CHANGED
@@ -9,6 +9,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  - Bump `version` in `package.json` before publishing to npm.
11
11
 
12
+ ## [Unreleased]
13
+
14
+ ### Fixed
15
+
16
+ - The local proxy server entry is now resolved by locating the multicorn-shield package root rather than a fixed relative climb, so `files` works from source, bundled dist, and npm installs.
17
+
18
+ ## [1.11.0] - 2026-06-18
19
+
20
+ ### Added
21
+
22
+ - `files` subcommand for governing a local filesystem under Shield (`files start`, `stop`, `restart`, `status`). An agent can read, write, and delete files in a chosen folder, with each action approved and logged like the hosted services.
23
+ - Combo agents: a single agent can expose both hosted services (Gmail, Calendar, Drive) and a local filesystem through one `mcp.json` entry.
24
+ - Per-agent file supervisors with a liveness heartbeat to the backend, auto port allocation, and refcounted shared proxy and filesystem servers that start and stop with the agents using them.
25
+ - Distinct `delete` permission level for the filesystem, separate from `write`, so an agent can be allowed to change files without being allowed to delete them.
26
+ - `files start` and `files restart` regenerate the agent's keyed `mcp.json` entry on every run. The write is atomic and fail-closed: a complete entry is built first, then the block is replaced in one write, so a failed run never leaves the file broken.
27
+
28
+ ### Changed
29
+
30
+ - One `mcp.json` entry per agent, keyed by the agent's own name. Earlier builds appended `-files`/`-filesystem` suffixes; legacy suffixed entries are now cleaned up on registration.
31
+
32
+ ### Fixed
33
+
34
+ - `files` now starts the local proxy by spawning the bundled `dist/server.js` entry directly (with `PORT`, `SHIELD_API_BASE_URL`, and `ALLOW_PRIVATE_TARGETS`), instead of invoking the deprecated `multicorn-proxy` CLI alias. First-run setup works when no proxy is already listening on the port.
35
+ - Pinned transitive dependencies (`path-to-regexp`, `ws`, `hono`) via `pnpm.overrides` to clear high-severity audit advisories pulled in by `supergateway` and the MCP SDK.
36
+
12
37
  ## [1.10.0] - 2026-06-09
13
38
 
14
39
  ### Changed
package/dist/index.cjs CHANGED
@@ -41,6 +41,7 @@ var AGENT_STATUSES = {
41
41
  var PERMISSION_LEVELS = {
42
42
  Read: "read",
43
43
  Write: "write",
44
+ Delete: "delete",
44
45
  Execute: "execute",
45
46
  Publish: "publish",
46
47
  Create: "create"
@@ -75,6 +76,11 @@ var BUILT_IN_SERVICES = {
75
76
  description: "Google Drive: file browsing, uploading, and sharing",
76
77
  capabilities: [PERMISSION_LEVELS.Read, PERMISSION_LEVELS.Write]
77
78
  },
79
+ filesystem: {
80
+ name: "filesystem",
81
+ description: "Sandboxed Multicorn workspace: reading, writing, and deleting files",
82
+ capabilities: [PERMISSION_LEVELS.Read, PERMISSION_LEVELS.Write, PERMISSION_LEVELS.Delete]
83
+ },
78
84
  payments: {
79
85
  name: "payments",
80
86
  description: "Payment processing: balance enquiries and transaction execution",
@@ -344,6 +350,7 @@ var SERVICE_DISPLAY_NAMES = {
344
350
  calendar: "Google Calendar",
345
351
  slack: "Slack",
346
352
  drive: "Google Drive",
353
+ filesystem: "Workspace files",
347
354
  payments: "Payments",
348
355
  github: "GitHub",
349
356
  jira: "Jira",
@@ -355,6 +362,7 @@ var SERVICE_ICONS = {
355
362
  calendar: "\u{1F4C5}",
356
363
  slack: "\u{1F4AC}",
357
364
  drive: "\u{1F4C1}",
365
+ filesystem: "\u{1F4C2}",
358
366
  payments: "\u{1F4B3}",
359
367
  github: "\u{1F419}",
360
368
  jira: "\u{1F3AF}",
@@ -364,6 +372,7 @@ var SERVICE_ICONS = {
364
372
  var PERMISSION_DESCRIPTIONS = {
365
373
  [PERMISSION_LEVELS.Read]: "Read",
366
374
  [PERMISSION_LEVELS.Write]: "Create and modify",
375
+ [PERMISSION_LEVELS.Delete]: "Delete",
367
376
  [PERMISSION_LEVELS.Execute]: "Execute actions",
368
377
  [PERMISSION_LEVELS.Publish]: "Publish",
369
378
  [PERMISSION_LEVELS.Create]: "Create"
@@ -371,6 +380,7 @@ var PERMISSION_DESCRIPTIONS = {
371
380
  var PERMISSION_FULL_DESCRIPTIONS = {
372
381
  [PERMISSION_LEVELS.Read]: (serviceName) => `Read your ${serviceName}`,
373
382
  [PERMISSION_LEVELS.Write]: (serviceName) => `Create and modify ${serviceName} content`,
383
+ [PERMISSION_LEVELS.Delete]: (serviceName) => `Delete ${serviceName} content`,
374
384
  [PERMISSION_LEVELS.Execute]: (serviceName) => {
375
385
  if (serviceName.toLowerCase().includes("payment")) {
376
386
  return "Make purchases on your behalf";
package/dist/index.d.cts CHANGED
@@ -32,6 +32,8 @@ type AgentStatus = (typeof AGENT_STATUSES)[keyof typeof AGENT_STATUSES];
32
32
  *
33
33
  * - `read`: observe data without modification
34
34
  * - `write`: create or modify data
35
+ * - `delete`: destroy data (kept distinct from `write` so saving a file never
36
+ * implies the right to delete one; used by the hosted workspace filesystem)
35
37
  * - `execute`: trigger side-effects (e.g. send an email, make a payment)
36
38
  * - `publish`: make existing content publicly accessible (e.g. deploy, publish, make live)
37
39
  * - `create`: create new content that is immediately public (e.g. tweet, public commit, forum post)
@@ -39,6 +41,7 @@ type AgentStatus = (typeof AGENT_STATUSES)[keyof typeof AGENT_STATUSES];
39
41
  declare const PERMISSION_LEVELS: {
40
42
  readonly Read: "read";
41
43
  readonly Write: "write";
44
+ readonly Delete: "delete";
42
45
  readonly Execute: "execute";
43
46
  readonly Publish: "publish";
44
47
  readonly Create: "create";
@@ -233,6 +236,11 @@ declare const BUILT_IN_SERVICES: {
233
236
  readonly description: "Google Drive: file browsing, uploading, and sharing";
234
237
  readonly capabilities: readonly ["read", "write"];
235
238
  };
239
+ readonly filesystem: {
240
+ readonly name: "filesystem";
241
+ readonly description: "Sandboxed Multicorn workspace: reading, writing, and deleting files";
242
+ readonly capabilities: readonly ["read", "write", "delete"];
243
+ };
236
244
  readonly payments: {
237
245
  readonly name: "payments";
238
246
  readonly description: "Payment processing: balance enquiries and transaction execution";
@@ -448,7 +456,7 @@ type ScopeParseResult = {
448
456
  * Parse a scope string into a structured {@link Scope} object.
449
457
  *
450
458
  * Scope strings use the format `"permission:service"` where:
451
- * - **permission** is one of `read`, `write`, `execute`, `publish`, or `create`
459
+ * - **permission** is one of `read`, `write`, `delete`, `execute`, `publish`, or `create`
452
460
  * - **service** is a lowercase identifier (letters, digits, hyphens, underscores)
453
461
  *
454
462
  * @param input - The scope string to parse (e.g. `"read:gmail"`).
@@ -463,8 +471,8 @@ type ScopeParseResult = {
463
471
  *
464
472
  * @example
465
473
  * ```ts
466
- * parseScope("delete:gmail");
467
- * // throws ScopeParseError: Unknown permission level "delete" …
474
+ * parseScope("destroy:gmail");
475
+ * // throws ScopeParseError: Unknown permission level "destroy" …
468
476
  * ```
469
477
  */
470
478
  declare function parseScope(input: string): Scope;
@@ -533,7 +541,7 @@ declare function formatScope(scope: Scope): string;
533
541
  * @example
534
542
  * ```ts
535
543
  * isValidScopeString("read:gmail"); // true
536
- * isValidScopeString("delete:gmail"); // false
544
+ * isValidScopeString("destroy:gmail"); // false
537
545
  * isValidScopeString(""); // false
538
546
  * ```
539
547
  */
package/dist/index.d.ts CHANGED
@@ -32,6 +32,8 @@ type AgentStatus = (typeof AGENT_STATUSES)[keyof typeof AGENT_STATUSES];
32
32
  *
33
33
  * - `read`: observe data without modification
34
34
  * - `write`: create or modify data
35
+ * - `delete`: destroy data (kept distinct from `write` so saving a file never
36
+ * implies the right to delete one; used by the hosted workspace filesystem)
35
37
  * - `execute`: trigger side-effects (e.g. send an email, make a payment)
36
38
  * - `publish`: make existing content publicly accessible (e.g. deploy, publish, make live)
37
39
  * - `create`: create new content that is immediately public (e.g. tweet, public commit, forum post)
@@ -39,6 +41,7 @@ type AgentStatus = (typeof AGENT_STATUSES)[keyof typeof AGENT_STATUSES];
39
41
  declare const PERMISSION_LEVELS: {
40
42
  readonly Read: "read";
41
43
  readonly Write: "write";
44
+ readonly Delete: "delete";
42
45
  readonly Execute: "execute";
43
46
  readonly Publish: "publish";
44
47
  readonly Create: "create";
@@ -233,6 +236,11 @@ declare const BUILT_IN_SERVICES: {
233
236
  readonly description: "Google Drive: file browsing, uploading, and sharing";
234
237
  readonly capabilities: readonly ["read", "write"];
235
238
  };
239
+ readonly filesystem: {
240
+ readonly name: "filesystem";
241
+ readonly description: "Sandboxed Multicorn workspace: reading, writing, and deleting files";
242
+ readonly capabilities: readonly ["read", "write", "delete"];
243
+ };
236
244
  readonly payments: {
237
245
  readonly name: "payments";
238
246
  readonly description: "Payment processing: balance enquiries and transaction execution";
@@ -448,7 +456,7 @@ type ScopeParseResult = {
448
456
  * Parse a scope string into a structured {@link Scope} object.
449
457
  *
450
458
  * Scope strings use the format `"permission:service"` where:
451
- * - **permission** is one of `read`, `write`, `execute`, `publish`, or `create`
459
+ * - **permission** is one of `read`, `write`, `delete`, `execute`, `publish`, or `create`
452
460
  * - **service** is a lowercase identifier (letters, digits, hyphens, underscores)
453
461
  *
454
462
  * @param input - The scope string to parse (e.g. `"read:gmail"`).
@@ -463,8 +471,8 @@ type ScopeParseResult = {
463
471
  *
464
472
  * @example
465
473
  * ```ts
466
- * parseScope("delete:gmail");
467
- * // throws ScopeParseError: Unknown permission level "delete" …
474
+ * parseScope("destroy:gmail");
475
+ * // throws ScopeParseError: Unknown permission level "destroy" …
468
476
  * ```
469
477
  */
470
478
  declare function parseScope(input: string): Scope;
@@ -533,7 +541,7 @@ declare function formatScope(scope: Scope): string;
533
541
  * @example
534
542
  * ```ts
535
543
  * isValidScopeString("read:gmail"); // true
536
- * isValidScopeString("delete:gmail"); // false
544
+ * isValidScopeString("destroy:gmail"); // false
537
545
  * isValidScopeString(""); // false
538
546
  * ```
539
547
  */
package/dist/index.js CHANGED
@@ -39,6 +39,7 @@ var AGENT_STATUSES = {
39
39
  var PERMISSION_LEVELS = {
40
40
  Read: "read",
41
41
  Write: "write",
42
+ Delete: "delete",
42
43
  Execute: "execute",
43
44
  Publish: "publish",
44
45
  Create: "create"
@@ -73,6 +74,11 @@ var BUILT_IN_SERVICES = {
73
74
  description: "Google Drive: file browsing, uploading, and sharing",
74
75
  capabilities: [PERMISSION_LEVELS.Read, PERMISSION_LEVELS.Write]
75
76
  },
77
+ filesystem: {
78
+ name: "filesystem",
79
+ description: "Sandboxed Multicorn workspace: reading, writing, and deleting files",
80
+ capabilities: [PERMISSION_LEVELS.Read, PERMISSION_LEVELS.Write, PERMISSION_LEVELS.Delete]
81
+ },
76
82
  payments: {
77
83
  name: "payments",
78
84
  description: "Payment processing: balance enquiries and transaction execution",
@@ -342,6 +348,7 @@ var SERVICE_DISPLAY_NAMES = {
342
348
  calendar: "Google Calendar",
343
349
  slack: "Slack",
344
350
  drive: "Google Drive",
351
+ filesystem: "Workspace files",
345
352
  payments: "Payments",
346
353
  github: "GitHub",
347
354
  jira: "Jira",
@@ -353,6 +360,7 @@ var SERVICE_ICONS = {
353
360
  calendar: "\u{1F4C5}",
354
361
  slack: "\u{1F4AC}",
355
362
  drive: "\u{1F4C1}",
363
+ filesystem: "\u{1F4C2}",
356
364
  payments: "\u{1F4B3}",
357
365
  github: "\u{1F419}",
358
366
  jira: "\u{1F3AF}",
@@ -362,6 +370,7 @@ var SERVICE_ICONS = {
362
370
  var PERMISSION_DESCRIPTIONS = {
363
371
  [PERMISSION_LEVELS.Read]: "Read",
364
372
  [PERMISSION_LEVELS.Write]: "Create and modify",
373
+ [PERMISSION_LEVELS.Delete]: "Delete",
365
374
  [PERMISSION_LEVELS.Execute]: "Execute actions",
366
375
  [PERMISSION_LEVELS.Publish]: "Publish",
367
376
  [PERMISSION_LEVELS.Create]: "Create"
@@ -369,6 +378,7 @@ var PERMISSION_DESCRIPTIONS = {
369
378
  var PERMISSION_FULL_DESCRIPTIONS = {
370
379
  [PERMISSION_LEVELS.Read]: (serviceName) => `Read your ${serviceName}`,
371
380
  [PERMISSION_LEVELS.Write]: (serviceName) => `Create and modify ${serviceName} content`,
381
+ [PERMISSION_LEVELS.Delete]: (serviceName) => `Delete ${serviceName} content`,
372
382
  [PERMISSION_LEVELS.Execute]: (serviceName) => {
373
383
  if (serviceName.toLowerCase().includes("payment")) {
374
384
  return "Make purchases on your behalf";