@cjhyy/code-shell-core 0.8.10 → 0.8.11

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.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Public API exports.
5
5
  */
6
- export declare const VERSION = "0.8.10";
6
+ export declare const VERSION = "0.8.11";
7
7
  export type { Message, ContentBlock, ToolDefinition, ToolCall, ToolResult, RegisteredTool, TranscriptEvent, TranscriptEventType, SessionState, SessionKind, SessionWorkspace, SessionForkLineage, ContextUsageAnchor, SessionStatus, TokenUsage, CompiledInput, PermissionDecision, PermissionMode, PermissionRule, TurnPhase, TurnResult, TerminalReason, TurnCompletionKind, StreamEvent, StreamCallback, LLMConfig, ClientDefaults, LLMResponse, Settings, MCPServerConfig, } from "./types.js";
8
8
  export type { GoalConfig, GoalLifecycleConfig, GoalLifecyclePhase, GoalLifecycleTerminalReason, GoalLifecycleV1, } from "./goal/lifecycle.js";
9
9
  export { FrameworkError, LLMError, LLMRateLimitError, ContextLimitError, ToolError, ToolNotFoundError, ToolExecutionError, ToolTimeoutError, PermissionDeniedError, SessionError, TranscriptError, ConfigError, SandboxUnavailableError, } from "./exceptions.js";
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Public API exports.
5
5
  */
6
- export const VERSION = "0.8.10";
6
+ export const VERSION = "0.8.11";
7
7
  // ─── Exceptions ──────────────────────────────────────────────────
8
8
  export { FrameworkError, LLMError, LLMRateLimitError, ContextLimitError, ToolError, ToolNotFoundError, ToolExecutionError, ToolTimeoutError, PermissionDeniedError, SessionError, TranscriptError, ConfigError, SandboxUnavailableError, } from "./exceptions.js";
9
9
  // ─── Engine (primary API) ────────────────────────────────────────
@@ -73,6 +73,7 @@ export declare function detectSandboxCapabilities(): {
73
73
  */
74
74
  export declare function expandPath(p: string, cwd: string): string;
75
75
  export declare function expandConfig(config: SandboxConfig, cwd: string): SandboxConfig;
76
+ export declare function defaultSandboxTempRoots(platform?: NodeJS.Platform, systemTempDir?: string): string[];
76
77
  export declare function defaultSandboxConfig(mode?: SandboxMode): SandboxConfig;
77
78
  /**
78
79
  * Resolve the active backend given user config + the current host.
@@ -111,12 +111,15 @@ function warnAutoDowngrade() {
111
111
  process.stderr.write(`[code-shell] sandbox=auto found no usable backend; shell commands will run unsandboxed. To fix: ${hint}. ` +
112
112
  `Set sandbox.mode=off in settings.json to silence, or CODE_SHELL_SANDBOX_QUIET=1.\n`);
113
113
  }
114
+ export function defaultSandboxTempRoots(platform = process.platform, systemTempDir = tmpdir()) {
115
+ return platform === "win32" ? [systemTempDir] : ["/tmp", "/private/tmp", "/var/tmp"];
116
+ }
114
117
  export function defaultSandboxConfig(mode = "auto") {
115
118
  // Temp roots are writable so tool-result spillover / scratch files land
116
119
  // somewhere. POSIX: the canonical /tmp family. Windows has no OS sandbox
117
120
  // backend (auto → off), so writableRoots is effectively unused there, but
118
121
  // keep it host-correct by using the platform temp dir instead of /tmp.
119
- const tmpRoots = process.platform === "win32" ? [tmpdir()] : ["/tmp", "/private/tmp", "/var/tmp"];
122
+ const tmpRoots = defaultSandboxTempRoots();
120
123
  return {
121
124
  mode,
122
125
  writableRoots: ["${workspace}", ...tmpRoots],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cjhyy/code-shell-core",
3
- "version": "0.8.10",
3
+ "version": "0.8.11",
4
4
  "description": "Core engine for code-shell — agent orchestration, tool execution, hooks, protocol. UI-agnostic.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",