@codelia/runtime 0.1.90 → 0.1.93
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/{chunk-DSYHEFZM.js → chunk-K42SQONI.js} +1736 -470
- package/dist/{chunk-QWJ4JW4T.js → chunk-OQGZHVYU.js} +4506 -3022
- package/dist/index.cjs +5483 -2773
- package/dist/index.js +2 -2
- package/dist/sdk.cjs +5492 -2779
- package/dist/sdk.d.cts +32 -3
- package/dist/sdk.d.ts +32 -3
- package/dist/sdk.js +4 -2
- package/dist/subagents/child-entry.cjs +862 -140
- package/dist/subagents/child-entry.js +1 -1
- package/package.json +12 -10
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
|
|
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;
|
|
@@ -644,6 +668,8 @@ type RuntimeConfigProvider = {
|
|
|
644
668
|
resolveExecutionEnvironmentConfig?: (workingDir?: string) => Promise<ResolvedExecutionEnvironmentConfig>;
|
|
645
669
|
resolveTuiConfig?: (workingDir?: string) => Promise<{
|
|
646
670
|
theme?: string;
|
|
671
|
+
color_scheme?: "dark" | "light";
|
|
672
|
+
image_protocol?: "halfblocks" | "kitty";
|
|
647
673
|
}>;
|
|
648
674
|
updateModel?: (workingDir: string | undefined, model: {
|
|
649
675
|
provider: string;
|
|
@@ -808,8 +834,11 @@ type BrokeredMutationAdapter = {
|
|
|
808
834
|
*/
|
|
809
835
|
declare const runBrokeredMutation: (request: BrokeredMutation, adapter: BrokeredMutationAdapter, signal?: AbortSignal) => Promise<BrokeredMutationOutcome>;
|
|
810
836
|
|
|
837
|
+
type ReviewerPurpose = "rule_suggestion" | "inspect_review";
|
|
811
838
|
type PublicApprovalReviewerOptions = {
|
|
812
|
-
purpose?:
|
|
839
|
+
purpose?: ReviewerPurpose;
|
|
840
|
+
/** Optional bounded override for follow-up packets carrying inspected workspace data. */
|
|
841
|
+
maxPacketBytes?: number;
|
|
813
842
|
/** Existing API key for the selected public provider route. */
|
|
814
843
|
apiKey: string;
|
|
815
844
|
effort?: "low" | "medium";
|
|
@@ -833,4 +862,4 @@ declare const createPublicApprovalReviewer: (options: PublicApprovalReviewerOpti
|
|
|
833
862
|
|
|
834
863
|
declare const startRuntime: (options?: RuntimeOptions) => Promise<void>;
|
|
835
864
|
|
|
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 };
|
|
865
|
+
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
|
|
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;
|
|
@@ -644,6 +668,8 @@ type RuntimeConfigProvider = {
|
|
|
644
668
|
resolveExecutionEnvironmentConfig?: (workingDir?: string) => Promise<ResolvedExecutionEnvironmentConfig>;
|
|
645
669
|
resolveTuiConfig?: (workingDir?: string) => Promise<{
|
|
646
670
|
theme?: string;
|
|
671
|
+
color_scheme?: "dark" | "light";
|
|
672
|
+
image_protocol?: "halfblocks" | "kitty";
|
|
647
673
|
}>;
|
|
648
674
|
updateModel?: (workingDir: string | undefined, model: {
|
|
649
675
|
provider: string;
|
|
@@ -808,8 +834,11 @@ type BrokeredMutationAdapter = {
|
|
|
808
834
|
*/
|
|
809
835
|
declare const runBrokeredMutation: (request: BrokeredMutation, adapter: BrokeredMutationAdapter, signal?: AbortSignal) => Promise<BrokeredMutationOutcome>;
|
|
810
836
|
|
|
837
|
+
type ReviewerPurpose = "rule_suggestion" | "inspect_review";
|
|
811
838
|
type PublicApprovalReviewerOptions = {
|
|
812
|
-
purpose?:
|
|
839
|
+
purpose?: ReviewerPurpose;
|
|
840
|
+
/** Optional bounded override for follow-up packets carrying inspected workspace data. */
|
|
841
|
+
maxPacketBytes?: number;
|
|
813
842
|
/** Existing API key for the selected public provider route. */
|
|
814
843
|
apiKey: string;
|
|
815
844
|
effort?: "low" | "medium";
|
|
@@ -833,4 +862,4 @@ declare const createPublicApprovalReviewer: (options: PublicApprovalReviewerOpti
|
|
|
833
862
|
|
|
834
863
|
declare const startRuntime: (options?: RuntimeOptions) => Promise<void>;
|
|
835
864
|
|
|
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 };
|
|
865
|
+
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-
|
|
9
|
+
} from "./chunk-OQGZHVYU.js";
|
|
10
10
|
import {
|
|
11
|
+
createLinuxMxcShellBackend,
|
|
11
12
|
createMacMxcShellBackend
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K42SQONI.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,
|