@codelia/runtime 0.1.90 → 0.1.91

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/sdk.d.cts CHANGED
@@ -161,6 +161,13 @@ type ShellProtection = Readonly<{
161
161
  /** Local macOS admission only. Direct path restrictions still apply. */
162
162
  sharedGitObjectDirectories?: readonly GitObjectDirectory[];
163
163
  verifiedGitHooks?: readonly GitHookAlias[];
164
+ /**
165
+ * Git and common directories writable for ordinary local Git operations
166
+ * (development profile, opted-in backends only). `gitProtectedPaths` stay
167
+ * read-only inside them, including names that do not exist yet.
168
+ */
169
+ gitWriteRoots?: readonly string[];
170
+ gitProtectedPaths?: readonly string[];
164
171
  protectedAliasPaths?: readonly string[];
165
172
  stdin: "closed" | "pipe";
166
173
  /** Ordered native PATH components, including empty and relative entries. */
@@ -171,6 +178,13 @@ type ProtectedShellBackend = {
171
178
  /** Explicit opt-in to enforcing readOnlyPaths, including their aliases. */
172
179
  supportsReadOnlyPaths?: true;
173
180
  supportsHomeDotProtection?: true;
181
+ /**
182
+ * Opt in only if the backend can deny writes and creation of protected names
183
+ * that do not exist yet inside an otherwise writable directory (e.g. Seatbelt
184
+ * path rules). Backends without this capability keep enclosing directories
185
+ * such as `.git` read-only.
186
+ */
187
+ supportsAbsentPathDenial?: true;
174
188
  /**
175
189
  * Opt in only if direct argv uses the resolved executable and fixed Bash
176
190
  * sources use protection.cwd and binPaths with host-equivalent executable
@@ -181,7 +195,11 @@ type ProtectedShellBackend = {
181
195
  /**
182
196
  * Check the profile on the current host. The launcher must confine all
183
197
  * descendants, hide protected objects, restrict writes to the selected
184
- * roots and private scratch, and block outbound and host-local IPC.
198
+ * roots and private scratch, and block outbound network access (plus
199
+ * host-local IPC to the extent supported by the backend — on Linux MXC
200
+ * Bubblewrap `/run`, `/var/run`, host `/tmp` and abstract sockets are
201
+ * isolated, while pathname Unix sockets inside bind-mounted trees require
202
+ * masking via `protected_paths` or `CODELIA_LINUX_SHELL_BACKEND=gvisor`).
185
203
  * Never infer support from installation or OS identity alone.
186
204
  */
187
205
  supports: (protection: ShellProtection) => boolean;
@@ -199,6 +217,8 @@ type ProtectedShellBackend = {
199
217
  };
200
218
  /** Explicit SDK opt-in for the qualified macOS arm64 helper. */
201
219
  declare const createMacMxcShellBackend: () => ProtectedShellBackend;
220
+ /** Explicit SDK opt-in for the Linux MXC Bubblewrap helper. */
221
+ declare const createLinuxMxcShellBackend: () => ProtectedShellBackend;
202
222
 
203
223
  declare const diagnosticMessages: {
204
224
  readonly review_auth: "The review provider's authentication failed.";
@@ -291,6 +311,10 @@ type Confirmation = Readonly<{
291
311
  shellStage?: "initial" | "rule" | "unavailable";
292
312
  reviewDiagnostic?: ReviewDiagnostic;
293
313
  reviewWithheldForPrivacy?: boolean;
314
+ /** Set by the shell authorizer for a one-command unsandboxed launch. */
315
+ escalation?: "unsandboxed";
316
+ /** False when configured protected paths do not apply to an unsandboxed launch. */
317
+ protectedPathsEnforced?: false;
294
318
  }>;
295
319
  type ApprovalService = {
296
320
  available?: () => boolean;
@@ -808,8 +832,11 @@ type BrokeredMutationAdapter = {
808
832
  */
809
833
  declare const runBrokeredMutation: (request: BrokeredMutation, adapter: BrokeredMutationAdapter, signal?: AbortSignal) => Promise<BrokeredMutationOutcome>;
810
834
 
835
+ type ReviewerPurpose = "rule_suggestion" | "inspect_review";
811
836
  type PublicApprovalReviewerOptions = {
812
- purpose?: "rule_suggestion";
837
+ purpose?: ReviewerPurpose;
838
+ /** Optional bounded override for follow-up packets carrying inspected workspace data. */
839
+ maxPacketBytes?: number;
813
840
  /** Existing API key for the selected public provider route. */
814
841
  apiKey: string;
815
842
  effort?: "low" | "medium";
@@ -833,4 +860,4 @@ declare const createPublicApprovalReviewer: (options: PublicApprovalReviewerOpti
833
860
 
834
861
  declare const startRuntime: (options?: RuntimeOptions) => Promise<void>;
835
862
 
836
- export { type ApprovalAudit, type ApprovalService, type AttachmentUploadPolicy, type BrokeredMutation, type BrokeredMutationAdapter, type BrokeredMutationOutcome, type Confirmation, type CredentialProvider, LaunchRuleStore, type PreparedTaskExecution, type ProtectedShellBackend, type PublicApprovalReviewerOptions, type ReviewAdapter, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type ShellAuthority, type ShellInvocation, type ShellProtection, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolAuthority, type ToolEffect, type ToolProvider, createLocalMcpStdioProbeClient, createMacMxcShellBackend, createPublicApprovalReviewer, fetchDiscoveredOAuthConfig, mcpEntryMatchesServer, resolveMcpServerBinding, runBrokeredMutation, startRuntime };
863
+ export { type ApprovalAudit, type ApprovalService, type AttachmentUploadPolicy, type BrokeredMutation, type BrokeredMutationAdapter, type BrokeredMutationOutcome, type Confirmation, type CredentialProvider, LaunchRuleStore, type PreparedTaskExecution, type ProtectedShellBackend, type PublicApprovalReviewerOptions, type ReviewAdapter, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type ShellAuthority, type ShellInvocation, type ShellProtection, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolAuthority, type ToolEffect, type ToolProvider, createLinuxMxcShellBackend, createLocalMcpStdioProbeClient, createMacMxcShellBackend, createPublicApprovalReviewer, fetchDiscoveredOAuthConfig, mcpEntryMatchesServer, resolveMcpServerBinding, runBrokeredMutation, startRuntime };
package/dist/sdk.d.ts CHANGED
@@ -161,6 +161,13 @@ type ShellProtection = Readonly<{
161
161
  /** Local macOS admission only. Direct path restrictions still apply. */
162
162
  sharedGitObjectDirectories?: readonly GitObjectDirectory[];
163
163
  verifiedGitHooks?: readonly GitHookAlias[];
164
+ /**
165
+ * Git and common directories writable for ordinary local Git operations
166
+ * (development profile, opted-in backends only). `gitProtectedPaths` stay
167
+ * read-only inside them, including names that do not exist yet.
168
+ */
169
+ gitWriteRoots?: readonly string[];
170
+ gitProtectedPaths?: readonly string[];
164
171
  protectedAliasPaths?: readonly string[];
165
172
  stdin: "closed" | "pipe";
166
173
  /** Ordered native PATH components, including empty and relative entries. */
@@ -171,6 +178,13 @@ type ProtectedShellBackend = {
171
178
  /** Explicit opt-in to enforcing readOnlyPaths, including their aliases. */
172
179
  supportsReadOnlyPaths?: true;
173
180
  supportsHomeDotProtection?: true;
181
+ /**
182
+ * Opt in only if the backend can deny writes and creation of protected names
183
+ * that do not exist yet inside an otherwise writable directory (e.g. Seatbelt
184
+ * path rules). Backends without this capability keep enclosing directories
185
+ * such as `.git` read-only.
186
+ */
187
+ supportsAbsentPathDenial?: true;
174
188
  /**
175
189
  * Opt in only if direct argv uses the resolved executable and fixed Bash
176
190
  * sources use protection.cwd and binPaths with host-equivalent executable
@@ -181,7 +195,11 @@ type ProtectedShellBackend = {
181
195
  /**
182
196
  * Check the profile on the current host. The launcher must confine all
183
197
  * descendants, hide protected objects, restrict writes to the selected
184
- * roots and private scratch, and block outbound and host-local IPC.
198
+ * roots and private scratch, and block outbound network access (plus
199
+ * host-local IPC to the extent supported by the backend — on Linux MXC
200
+ * Bubblewrap `/run`, `/var/run`, host `/tmp` and abstract sockets are
201
+ * isolated, while pathname Unix sockets inside bind-mounted trees require
202
+ * masking via `protected_paths` or `CODELIA_LINUX_SHELL_BACKEND=gvisor`).
185
203
  * Never infer support from installation or OS identity alone.
186
204
  */
187
205
  supports: (protection: ShellProtection) => boolean;
@@ -199,6 +217,8 @@ type ProtectedShellBackend = {
199
217
  };
200
218
  /** Explicit SDK opt-in for the qualified macOS arm64 helper. */
201
219
  declare const createMacMxcShellBackend: () => ProtectedShellBackend;
220
+ /** Explicit SDK opt-in for the Linux MXC Bubblewrap helper. */
221
+ declare const createLinuxMxcShellBackend: () => ProtectedShellBackend;
202
222
 
203
223
  declare const diagnosticMessages: {
204
224
  readonly review_auth: "The review provider's authentication failed.";
@@ -291,6 +311,10 @@ type Confirmation = Readonly<{
291
311
  shellStage?: "initial" | "rule" | "unavailable";
292
312
  reviewDiagnostic?: ReviewDiagnostic;
293
313
  reviewWithheldForPrivacy?: boolean;
314
+ /** Set by the shell authorizer for a one-command unsandboxed launch. */
315
+ escalation?: "unsandboxed";
316
+ /** False when configured protected paths do not apply to an unsandboxed launch. */
317
+ protectedPathsEnforced?: false;
294
318
  }>;
295
319
  type ApprovalService = {
296
320
  available?: () => boolean;
@@ -808,8 +832,11 @@ type BrokeredMutationAdapter = {
808
832
  */
809
833
  declare const runBrokeredMutation: (request: BrokeredMutation, adapter: BrokeredMutationAdapter, signal?: AbortSignal) => Promise<BrokeredMutationOutcome>;
810
834
 
835
+ type ReviewerPurpose = "rule_suggestion" | "inspect_review";
811
836
  type PublicApprovalReviewerOptions = {
812
- purpose?: "rule_suggestion";
837
+ purpose?: ReviewerPurpose;
838
+ /** Optional bounded override for follow-up packets carrying inspected workspace data. */
839
+ maxPacketBytes?: number;
813
840
  /** Existing API key for the selected public provider route. */
814
841
  apiKey: string;
815
842
  effort?: "low" | "medium";
@@ -833,4 +860,4 @@ declare const createPublicApprovalReviewer: (options: PublicApprovalReviewerOpti
833
860
 
834
861
  declare const startRuntime: (options?: RuntimeOptions) => Promise<void>;
835
862
 
836
- export { type ApprovalAudit, type ApprovalService, type AttachmentUploadPolicy, type BrokeredMutation, type BrokeredMutationAdapter, type BrokeredMutationOutcome, type Confirmation, type CredentialProvider, LaunchRuleStore, type PreparedTaskExecution, type ProtectedShellBackend, type PublicApprovalReviewerOptions, type ReviewAdapter, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type ShellAuthority, type ShellInvocation, type ShellProtection, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolAuthority, type ToolEffect, type ToolProvider, createLocalMcpStdioProbeClient, createMacMxcShellBackend, createPublicApprovalReviewer, fetchDiscoveredOAuthConfig, mcpEntryMatchesServer, resolveMcpServerBinding, runBrokeredMutation, startRuntime };
863
+ export { type ApprovalAudit, type ApprovalService, type AttachmentUploadPolicy, type BrokeredMutation, type BrokeredMutationAdapter, type BrokeredMutationOutcome, type Confirmation, type CredentialProvider, LaunchRuleStore, type PreparedTaskExecution, type ProtectedShellBackend, type PublicApprovalReviewerOptions, type ReviewAdapter, type RuntimeConfigProvider, type RuntimeEnvironmentContract, type RuntimeEnvironmentInput, type RuntimeEnvironmentPreset, type RuntimeEventSink, type RuntimeHostAdapters, type RuntimeOptions, type RuntimeStores, type ShellAuthority, type ShellInvocation, type ShellProtection, type SubagentChannel, type SubagentExecutorFactory, type SubagentLaunchInput, type SystemPromptProvider, type ToolAuthority, type ToolEffect, type ToolProvider, createLinuxMxcShellBackend, createLocalMcpStdioProbeClient, createMacMxcShellBackend, createPublicApprovalReviewer, fetchDiscoveredOAuthConfig, mcpEntryMatchesServer, resolveMcpServerBinding, runBrokeredMutation, startRuntime };
package/dist/sdk.js CHANGED
@@ -6,10 +6,11 @@ import {
6
6
  mcpEntryMatchesServer,
7
7
  resolveMcpServerBinding,
8
8
  startRuntime
9
- } from "./chunk-QWJ4JW4T.js";
9
+ } from "./chunk-EC2N4PCP.js";
10
10
  import {
11
+ createLinuxMxcShellBackend,
11
12
  createMacMxcShellBackend
12
- } from "./chunk-DSYHEFZM.js";
13
+ } from "./chunk-X4222JDX.js";
13
14
 
14
15
  // src/permissions/brokered-mutation.ts
15
16
  var runBrokeredMutation = async (request, adapter, signal) => {
@@ -32,6 +33,7 @@ var runBrokeredMutation = async (request, adapter, signal) => {
32
33
  };
33
34
  export {
34
35
  LaunchRuleStore,
36
+ createLinuxMxcShellBackend,
35
37
  createLocalMcpStdioProbeClient,
36
38
  createMacMxcShellBackend,
37
39
  createPublicApprovalReviewer,