@locusai/cli 0.11.6 → 0.11.8

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.
@@ -14731,12 +14731,519 @@ var init_models = __esm(() => {
14731
14731
  init_workspace();
14732
14732
  });
14733
14733
 
14734
+ // ../shared/src/protocol/envelope.ts
14735
+ var PROTOCOL_VERSION = 1, ProtocolVersionSchema, ProtocolEnvelopeSchema;
14736
+ var init_envelope = __esm(() => {
14737
+ init_zod();
14738
+ ProtocolVersionSchema = exports_external.literal(PROTOCOL_VERSION);
14739
+ ProtocolEnvelopeSchema = exports_external.object({
14740
+ protocol: ProtocolVersionSchema,
14741
+ type: exports_external.string()
14742
+ });
14743
+ });
14744
+
14745
+ // ../shared/src/protocol/errors.ts
14746
+ var ProtocolErrorCode, ProtocolErrorCodeSchema, ProtocolErrorSchema;
14747
+ var init_errors3 = __esm(() => {
14748
+ init_zod();
14749
+ ProtocolErrorCode = {
14750
+ CLI_NOT_FOUND: "CLI_NOT_FOUND",
14751
+ AUTH_EXPIRED: "AUTH_EXPIRED",
14752
+ NETWORK_TIMEOUT: "NETWORK_TIMEOUT",
14753
+ CONTEXT_LIMIT: "CONTEXT_LIMIT",
14754
+ MALFORMED_EVENT: "MALFORMED_EVENT",
14755
+ PROCESS_CRASHED: "PROCESS_CRASHED",
14756
+ SESSION_NOT_FOUND: "SESSION_NOT_FOUND",
14757
+ UNKNOWN: "UNKNOWN"
14758
+ };
14759
+ ProtocolErrorCodeSchema = exports_external.enum(ProtocolErrorCode);
14760
+ ProtocolErrorSchema = exports_external.object({
14761
+ code: ProtocolErrorCodeSchema,
14762
+ message: exports_external.string(),
14763
+ details: exports_external.unknown().optional(),
14764
+ recoverable: exports_external.boolean()
14765
+ });
14766
+ });
14767
+
14768
+ // ../shared/src/protocol/cli-stream.ts
14769
+ var CliStreamEventType, CliStreamEventTypeSchema, CliStreamBaseSchema, CliStartEventSchema, CliTextDeltaEventSchema, CliThinkingEventSchema, CliToolStartedEventSchema, CliToolCompletedEventSchema, CliStatusEventSchema, CliErrorEventSchema, CliDoneEventSchema, CliStreamEventSchema;
14770
+ var init_cli_stream = __esm(() => {
14771
+ init_zod();
14772
+ init_envelope();
14773
+ init_errors3();
14774
+ CliStreamEventType = {
14775
+ START: "start",
14776
+ TEXT_DELTA: "text_delta",
14777
+ THINKING: "thinking",
14778
+ TOOL_STARTED: "tool_started",
14779
+ TOOL_COMPLETED: "tool_completed",
14780
+ STATUS: "status",
14781
+ ERROR: "error",
14782
+ DONE: "done"
14783
+ };
14784
+ CliStreamEventTypeSchema = exports_external.enum(CliStreamEventType);
14785
+ CliStreamBaseSchema = exports_external.object({
14786
+ protocol: ProtocolVersionSchema,
14787
+ sessionId: exports_external.string(),
14788
+ timestamp: exports_external.number()
14789
+ });
14790
+ CliStartEventSchema = CliStreamBaseSchema.extend({
14791
+ type: exports_external.literal(CliStreamEventType.START),
14792
+ payload: exports_external.object({
14793
+ command: exports_external.string(),
14794
+ model: exports_external.string().optional(),
14795
+ provider: exports_external.string().optional(),
14796
+ cwd: exports_external.string().optional()
14797
+ })
14798
+ });
14799
+ CliTextDeltaEventSchema = CliStreamBaseSchema.extend({
14800
+ type: exports_external.literal(CliStreamEventType.TEXT_DELTA),
14801
+ payload: exports_external.object({
14802
+ content: exports_external.string()
14803
+ })
14804
+ });
14805
+ CliThinkingEventSchema = CliStreamBaseSchema.extend({
14806
+ type: exports_external.literal(CliStreamEventType.THINKING),
14807
+ payload: exports_external.object({
14808
+ content: exports_external.string().optional()
14809
+ })
14810
+ });
14811
+ CliToolStartedEventSchema = CliStreamBaseSchema.extend({
14812
+ type: exports_external.literal(CliStreamEventType.TOOL_STARTED),
14813
+ payload: exports_external.object({
14814
+ tool: exports_external.string(),
14815
+ toolId: exports_external.string().optional(),
14816
+ parameters: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
14817
+ })
14818
+ });
14819
+ CliToolCompletedEventSchema = CliStreamBaseSchema.extend({
14820
+ type: exports_external.literal(CliStreamEventType.TOOL_COMPLETED),
14821
+ payload: exports_external.object({
14822
+ tool: exports_external.string(),
14823
+ toolId: exports_external.string().optional(),
14824
+ success: exports_external.boolean(),
14825
+ duration: exports_external.number().optional(),
14826
+ error: exports_external.string().optional()
14827
+ })
14828
+ });
14829
+ CliStatusEventSchema = CliStreamBaseSchema.extend({
14830
+ type: exports_external.literal(CliStreamEventType.STATUS),
14831
+ payload: exports_external.object({
14832
+ status: exports_external.string(),
14833
+ message: exports_external.string().optional()
14834
+ })
14835
+ });
14836
+ CliErrorEventSchema = CliStreamBaseSchema.extend({
14837
+ type: exports_external.literal(CliStreamEventType.ERROR),
14838
+ payload: exports_external.object({
14839
+ error: ProtocolErrorSchema
14840
+ })
14841
+ });
14842
+ CliDoneEventSchema = CliStreamBaseSchema.extend({
14843
+ type: exports_external.literal(CliStreamEventType.DONE),
14844
+ payload: exports_external.object({
14845
+ exitCode: exports_external.number().int(),
14846
+ duration: exports_external.number(),
14847
+ toolsUsed: exports_external.array(exports_external.string()).optional(),
14848
+ tokensUsed: exports_external.number().optional(),
14849
+ success: exports_external.boolean()
14850
+ })
14851
+ });
14852
+ CliStreamEventSchema = exports_external.discriminatedUnion("type", [
14853
+ CliStartEventSchema,
14854
+ CliTextDeltaEventSchema,
14855
+ CliThinkingEventSchema,
14856
+ CliToolStartedEventSchema,
14857
+ CliToolCompletedEventSchema,
14858
+ CliStatusEventSchema,
14859
+ CliErrorEventSchema,
14860
+ CliDoneEventSchema
14861
+ ]);
14862
+ });
14863
+
14864
+ // ../shared/src/protocol/context.ts
14865
+ var ActiveFileContextSchema, SelectionContextSchema, WorkspaceContextSchema, ContextPayloadSchema;
14866
+ var init_context = __esm(() => {
14867
+ init_zod();
14868
+ ActiveFileContextSchema = exports_external.object({
14869
+ filePath: exports_external.string(),
14870
+ languageId: exports_external.string().optional()
14871
+ });
14872
+ SelectionContextSchema = exports_external.object({
14873
+ filePath: exports_external.string(),
14874
+ languageId: exports_external.string().optional(),
14875
+ startLine: exports_external.number().int().min(0),
14876
+ startColumn: exports_external.number().int().min(0),
14877
+ endLine: exports_external.number().int().min(0),
14878
+ endColumn: exports_external.number().int().min(0),
14879
+ text: exports_external.string()
14880
+ });
14881
+ WorkspaceContextSchema = exports_external.object({
14882
+ rootPath: exports_external.string(),
14883
+ name: exports_external.string().optional()
14884
+ });
14885
+ ContextPayloadSchema = exports_external.object({
14886
+ workspace: WorkspaceContextSchema.optional(),
14887
+ activeFile: ActiveFileContextSchema.optional(),
14888
+ selection: SelectionContextSchema.optional()
14889
+ });
14890
+ });
14891
+
14892
+ // ../shared/src/protocol/session.ts
14893
+ var SessionStatus, SessionStatusSchema, SessionTransitionEvent, SessionTransitionEventSchema, SESSION_TRANSITIONS, TERMINAL_STATUSES, SessionMetadataSchema, SessionSummarySchema;
14894
+ var init_session = __esm(() => {
14895
+ init_zod();
14896
+ SessionStatus = {
14897
+ IDLE: "idle",
14898
+ STARTING: "starting",
14899
+ RUNNING: "running",
14900
+ STREAMING: "streaming",
14901
+ COMPLETED: "completed",
14902
+ CANCELED: "canceled",
14903
+ INTERRUPTED: "interrupted",
14904
+ FAILED: "failed",
14905
+ RESUMING: "resuming"
14906
+ };
14907
+ SessionStatusSchema = exports_external.enum(SessionStatus);
14908
+ SessionTransitionEvent = {
14909
+ CREATE_SESSION: "create_session",
14910
+ CLI_SPAWNED: "cli_spawned",
14911
+ FIRST_TEXT_DELTA: "first_text_delta",
14912
+ RESULT_RECEIVED: "result_received",
14913
+ USER_STOP: "user_stop",
14914
+ PROCESS_LOST: "process_lost",
14915
+ RESUME: "resume",
14916
+ ERROR: "error"
14917
+ };
14918
+ SessionTransitionEventSchema = exports_external.enum(SessionTransitionEvent);
14919
+ SESSION_TRANSITIONS = [
14920
+ {
14921
+ from: SessionStatus.IDLE,
14922
+ event: SessionTransitionEvent.CREATE_SESSION,
14923
+ to: SessionStatus.STARTING
14924
+ },
14925
+ {
14926
+ from: SessionStatus.STARTING,
14927
+ event: SessionTransitionEvent.CLI_SPAWNED,
14928
+ to: SessionStatus.RUNNING
14929
+ },
14930
+ {
14931
+ from: SessionStatus.STARTING,
14932
+ event: SessionTransitionEvent.ERROR,
14933
+ to: SessionStatus.FAILED
14934
+ },
14935
+ {
14936
+ from: SessionStatus.RUNNING,
14937
+ event: SessionTransitionEvent.FIRST_TEXT_DELTA,
14938
+ to: SessionStatus.STREAMING
14939
+ },
14940
+ {
14941
+ from: SessionStatus.RUNNING,
14942
+ event: SessionTransitionEvent.USER_STOP,
14943
+ to: SessionStatus.CANCELED
14944
+ },
14945
+ {
14946
+ from: SessionStatus.RUNNING,
14947
+ event: SessionTransitionEvent.PROCESS_LOST,
14948
+ to: SessionStatus.INTERRUPTED
14949
+ },
14950
+ {
14951
+ from: SessionStatus.RUNNING,
14952
+ event: SessionTransitionEvent.ERROR,
14953
+ to: SessionStatus.FAILED
14954
+ },
14955
+ {
14956
+ from: SessionStatus.STREAMING,
14957
+ event: SessionTransitionEvent.RESULT_RECEIVED,
14958
+ to: SessionStatus.COMPLETED
14959
+ },
14960
+ {
14961
+ from: SessionStatus.STREAMING,
14962
+ event: SessionTransitionEvent.USER_STOP,
14963
+ to: SessionStatus.CANCELED
14964
+ },
14965
+ {
14966
+ from: SessionStatus.STREAMING,
14967
+ event: SessionTransitionEvent.PROCESS_LOST,
14968
+ to: SessionStatus.INTERRUPTED
14969
+ },
14970
+ {
14971
+ from: SessionStatus.STREAMING,
14972
+ event: SessionTransitionEvent.ERROR,
14973
+ to: SessionStatus.FAILED
14974
+ },
14975
+ {
14976
+ from: SessionStatus.INTERRUPTED,
14977
+ event: SessionTransitionEvent.RESUME,
14978
+ to: SessionStatus.RESUMING
14979
+ },
14980
+ {
14981
+ from: SessionStatus.RESUMING,
14982
+ event: SessionTransitionEvent.CLI_SPAWNED,
14983
+ to: SessionStatus.RUNNING
14984
+ },
14985
+ {
14986
+ from: SessionStatus.RESUMING,
14987
+ event: SessionTransitionEvent.ERROR,
14988
+ to: SessionStatus.FAILED
14989
+ },
14990
+ {
14991
+ from: SessionStatus.COMPLETED,
14992
+ event: SessionTransitionEvent.CREATE_SESSION,
14993
+ to: SessionStatus.STARTING
14994
+ },
14995
+ {
14996
+ from: SessionStatus.CANCELED,
14997
+ event: SessionTransitionEvent.CREATE_SESSION,
14998
+ to: SessionStatus.STARTING
14999
+ },
15000
+ {
15001
+ from: SessionStatus.FAILED,
15002
+ event: SessionTransitionEvent.CREATE_SESSION,
15003
+ to: SessionStatus.STARTING
15004
+ }
15005
+ ];
15006
+ TERMINAL_STATUSES = new Set([
15007
+ SessionStatus.COMPLETED,
15008
+ SessionStatus.CANCELED,
15009
+ SessionStatus.FAILED
15010
+ ]);
15011
+ SessionMetadataSchema = exports_external.object({
15012
+ sessionId: exports_external.string(),
15013
+ status: SessionStatusSchema,
15014
+ model: exports_external.string().optional(),
15015
+ createdAt: exports_external.number(),
15016
+ updatedAt: exports_external.number(),
15017
+ title: exports_external.string().optional()
15018
+ });
15019
+ SessionSummarySchema = exports_external.object({
15020
+ sessionId: exports_external.string(),
15021
+ status: SessionStatusSchema,
15022
+ model: exports_external.string().optional(),
15023
+ title: exports_external.string().optional(),
15024
+ createdAt: exports_external.number(),
15025
+ updatedAt: exports_external.number(),
15026
+ messageCount: exports_external.number(),
15027
+ toolCount: exports_external.number()
15028
+ });
15029
+ });
15030
+
15031
+ // ../shared/src/protocol/host-events.ts
15032
+ var HostEventType, HostEventTypeSchema, TimelineEntryKind, TimelineEntryKindSchema, TimelineEntrySchema, SessionStateEventSchema, TextDeltaEventSchema, ToolStartedEventSchema, ToolCompletedEventSchema, ThinkingEventSchema, ErrorEventSchema, SessionListEventSchema, SessionCompletedEventSchema, HostEventSchema;
15033
+ var init_host_events = __esm(() => {
15034
+ init_zod();
15035
+ init_envelope();
15036
+ init_errors3();
15037
+ init_session();
15038
+ HostEventType = {
15039
+ SESSION_STATE: "session_state",
15040
+ TEXT_DELTA: "text_delta",
15041
+ TOOL_STARTED: "tool_started",
15042
+ TOOL_COMPLETED: "tool_completed",
15043
+ THINKING: "thinking",
15044
+ ERROR: "error",
15045
+ SESSION_LIST: "session_list",
15046
+ SESSION_COMPLETED: "session_completed"
15047
+ };
15048
+ HostEventTypeSchema = exports_external.enum(HostEventType);
15049
+ TimelineEntryKind = {
15050
+ MESSAGE: "message",
15051
+ TOOL_CALL: "tool_call",
15052
+ STATUS: "status",
15053
+ ERROR: "error",
15054
+ DONE: "done"
15055
+ };
15056
+ TimelineEntryKindSchema = exports_external.enum(TimelineEntryKind);
15057
+ TimelineEntrySchema = exports_external.object({
15058
+ id: exports_external.string(),
15059
+ kind: TimelineEntryKindSchema,
15060
+ timestamp: exports_external.number(),
15061
+ data: exports_external.record(exports_external.string(), exports_external.unknown())
15062
+ });
15063
+ SessionStateEventSchema = exports_external.object({
15064
+ protocol: ProtocolVersionSchema,
15065
+ type: exports_external.literal(HostEventType.SESSION_STATE),
15066
+ payload: exports_external.object({
15067
+ sessionId: exports_external.string(),
15068
+ status: SessionStatusSchema,
15069
+ metadata: SessionMetadataSchema.optional(),
15070
+ timeline: exports_external.array(TimelineEntrySchema).optional()
15071
+ })
15072
+ });
15073
+ TextDeltaEventSchema = exports_external.object({
15074
+ protocol: ProtocolVersionSchema,
15075
+ type: exports_external.literal(HostEventType.TEXT_DELTA),
15076
+ payload: exports_external.object({
15077
+ sessionId: exports_external.string(),
15078
+ content: exports_external.string()
15079
+ })
15080
+ });
15081
+ ToolStartedEventSchema = exports_external.object({
15082
+ protocol: ProtocolVersionSchema,
15083
+ type: exports_external.literal(HostEventType.TOOL_STARTED),
15084
+ payload: exports_external.object({
15085
+ sessionId: exports_external.string(),
15086
+ tool: exports_external.string(),
15087
+ toolId: exports_external.string().optional(),
15088
+ parameters: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
15089
+ })
15090
+ });
15091
+ ToolCompletedEventSchema = exports_external.object({
15092
+ protocol: ProtocolVersionSchema,
15093
+ type: exports_external.literal(HostEventType.TOOL_COMPLETED),
15094
+ payload: exports_external.object({
15095
+ sessionId: exports_external.string(),
15096
+ tool: exports_external.string(),
15097
+ toolId: exports_external.string().optional(),
15098
+ result: exports_external.unknown().optional(),
15099
+ duration: exports_external.number().optional(),
15100
+ success: exports_external.boolean(),
15101
+ error: exports_external.string().optional()
15102
+ })
15103
+ });
15104
+ ThinkingEventSchema = exports_external.object({
15105
+ protocol: ProtocolVersionSchema,
15106
+ type: exports_external.literal(HostEventType.THINKING),
15107
+ payload: exports_external.object({
15108
+ sessionId: exports_external.string(),
15109
+ content: exports_external.string().optional()
15110
+ })
15111
+ });
15112
+ ErrorEventSchema = exports_external.object({
15113
+ protocol: ProtocolVersionSchema,
15114
+ type: exports_external.literal(HostEventType.ERROR),
15115
+ payload: exports_external.object({
15116
+ sessionId: exports_external.string().optional(),
15117
+ error: ProtocolErrorSchema
15118
+ })
15119
+ });
15120
+ SessionListEventSchema = exports_external.object({
15121
+ protocol: ProtocolVersionSchema,
15122
+ type: exports_external.literal(HostEventType.SESSION_LIST),
15123
+ payload: exports_external.object({
15124
+ sessions: exports_external.array(SessionSummarySchema)
15125
+ })
15126
+ });
15127
+ SessionCompletedEventSchema = exports_external.object({
15128
+ protocol: ProtocolVersionSchema,
15129
+ type: exports_external.literal(HostEventType.SESSION_COMPLETED),
15130
+ payload: exports_external.object({
15131
+ sessionId: exports_external.string(),
15132
+ summary: exports_external.string().optional()
15133
+ })
15134
+ });
15135
+ HostEventSchema = exports_external.discriminatedUnion("type", [
15136
+ SessionStateEventSchema,
15137
+ TextDeltaEventSchema,
15138
+ ToolStartedEventSchema,
15139
+ ToolCompletedEventSchema,
15140
+ ThinkingEventSchema,
15141
+ ErrorEventSchema,
15142
+ SessionListEventSchema,
15143
+ SessionCompletedEventSchema
15144
+ ]);
15145
+ });
15146
+
15147
+ // ../shared/src/protocol/ui-intents.ts
15148
+ var UIIntentType, UIIntentTypeSchema, SubmitPromptIntentSchema, StopSessionIntentSchema, ResumeSessionIntentSchema, RequestSessionsIntentSchema, RequestSessionDetailIntentSchema, ClearSessionIntentSchema, WebviewReadyIntentSchema, UIIntentSchema;
15149
+ var init_ui_intents = __esm(() => {
15150
+ init_zod();
15151
+ init_context();
15152
+ init_envelope();
15153
+ UIIntentType = {
15154
+ SUBMIT_PROMPT: "submit_prompt",
15155
+ STOP_SESSION: "stop_session",
15156
+ RESUME_SESSION: "resume_session",
15157
+ REQUEST_SESSIONS: "request_sessions",
15158
+ REQUEST_SESSION_DETAIL: "request_session_detail",
15159
+ CLEAR_SESSION: "clear_session",
15160
+ WEBVIEW_READY: "webview_ready"
15161
+ };
15162
+ UIIntentTypeSchema = exports_external.enum(UIIntentType);
15163
+ SubmitPromptIntentSchema = exports_external.object({
15164
+ protocol: ProtocolVersionSchema,
15165
+ type: exports_external.literal(UIIntentType.SUBMIT_PROMPT),
15166
+ payload: exports_external.object({
15167
+ text: exports_external.string().min(1),
15168
+ context: ContextPayloadSchema.optional()
15169
+ })
15170
+ });
15171
+ StopSessionIntentSchema = exports_external.object({
15172
+ protocol: ProtocolVersionSchema,
15173
+ type: exports_external.literal(UIIntentType.STOP_SESSION),
15174
+ payload: exports_external.object({
15175
+ sessionId: exports_external.string()
15176
+ })
15177
+ });
15178
+ ResumeSessionIntentSchema = exports_external.object({
15179
+ protocol: ProtocolVersionSchema,
15180
+ type: exports_external.literal(UIIntentType.RESUME_SESSION),
15181
+ payload: exports_external.object({
15182
+ sessionId: exports_external.string()
15183
+ })
15184
+ });
15185
+ RequestSessionsIntentSchema = exports_external.object({
15186
+ protocol: ProtocolVersionSchema,
15187
+ type: exports_external.literal(UIIntentType.REQUEST_SESSIONS),
15188
+ payload: exports_external.object({}).optional()
15189
+ });
15190
+ RequestSessionDetailIntentSchema = exports_external.object({
15191
+ protocol: ProtocolVersionSchema,
15192
+ type: exports_external.literal(UIIntentType.REQUEST_SESSION_DETAIL),
15193
+ payload: exports_external.object({
15194
+ sessionId: exports_external.string()
15195
+ })
15196
+ });
15197
+ ClearSessionIntentSchema = exports_external.object({
15198
+ protocol: ProtocolVersionSchema,
15199
+ type: exports_external.literal(UIIntentType.CLEAR_SESSION),
15200
+ payload: exports_external.object({
15201
+ sessionId: exports_external.string()
15202
+ })
15203
+ });
15204
+ WebviewReadyIntentSchema = exports_external.object({
15205
+ protocol: ProtocolVersionSchema,
15206
+ type: exports_external.literal(UIIntentType.WEBVIEW_READY),
15207
+ payload: exports_external.object({}).optional()
15208
+ });
15209
+ UIIntentSchema = exports_external.discriminatedUnion("type", [
15210
+ SubmitPromptIntentSchema,
15211
+ StopSessionIntentSchema,
15212
+ ResumeSessionIntentSchema,
15213
+ RequestSessionsIntentSchema,
15214
+ RequestSessionDetailIntentSchema,
15215
+ ClearSessionIntentSchema,
15216
+ WebviewReadyIntentSchema
15217
+ ]);
15218
+ });
15219
+
15220
+ // ../shared/src/protocol/helpers.ts
15221
+ var init_helpers = __esm(() => {
15222
+ init_envelope();
15223
+ init_host_events();
15224
+ init_session();
15225
+ init_ui_intents();
15226
+ });
15227
+
15228
+ // ../shared/src/protocol/index.ts
15229
+ var init_protocol = __esm(() => {
15230
+ init_cli_stream();
15231
+ init_context();
15232
+ init_envelope();
15233
+ init_errors3();
15234
+ init_helpers();
15235
+ init_host_events();
15236
+ init_session();
15237
+ init_ui_intents();
15238
+ });
15239
+
14734
15240
  // ../shared/src/index.ts
14735
15241
  var init_src = __esm(() => {
14736
15242
  init_common();
14737
15243
  init_constants();
14738
15244
  init_enums();
14739
15245
  init_models();
15246
+ init_protocol();
14740
15247
  });
14741
15248
 
14742
15249
  // ../sdk/src/core/config.ts
@@ -15025,9 +15532,7 @@ class ClaudeRunner {
15025
15532
  "stream-json",
15026
15533
  "--include-partial-messages",
15027
15534
  "--model",
15028
- this.model,
15029
- "--settings",
15030
- SANDBOX_SETTINGS
15535
+ this.model
15031
15536
  ];
15032
15537
  const env = getAugmentedEnv({
15033
15538
  FORCE_COLOR: "1",
@@ -15276,9 +15781,7 @@ class ClaudeRunner {
15276
15781
  "stream-json",
15277
15782
  "--include-partial-messages",
15278
15783
  "--model",
15279
- this.model,
15280
- "--settings",
15281
- SANDBOX_SETTINGS
15784
+ this.model
15282
15785
  ];
15283
15786
  const env = getAugmentedEnv({
15284
15787
  FORCE_COLOR: "1",
@@ -15380,21 +15883,11 @@ ${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
15380
15883
  return new Error(message);
15381
15884
  }
15382
15885
  }
15383
- var SANDBOX_SETTINGS, DEFAULT_TIMEOUT_MS;
15886
+ var DEFAULT_TIMEOUT_MS;
15384
15887
  var init_claude_runner = __esm(() => {
15385
15888
  init_config();
15386
15889
  init_colors();
15387
15890
  init_resolve_bin();
15388
- SANDBOX_SETTINGS = JSON.stringify({
15389
- permissions: {
15390
- deny: ["Read(../**)", "Edit(../**)"]
15391
- },
15392
- sandbox: {
15393
- enabled: true,
15394
- autoAllow: true,
15395
- allowUnsandboxedCommands: false
15396
- }
15397
- });
15398
15891
  DEFAULT_TIMEOUT_MS = 60 * 60 * 1000;
15399
15892
  });
15400
15893
 
@@ -15951,7 +16444,7 @@ var toString, getPrototypeOf, iterator, toStringTag, kindOf, kindOfTest = (type)
15951
16444
  }, isDate, isFile, isBlob, isFileList, isStream = (val) => isObject2(val) && isFunction(val.pipe), isFormData = (thing) => {
15952
16445
  let kind;
15953
16446
  return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
15954
- }, isURLSearchParams, isReadableStream, isRequest, isResponse, isHeaders, trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), _global, isContextDefined = (context) => !isUndefined(context) && context !== _global, extend2 = (a, b, thisArg, { allOwnKeys } = {}) => {
16447
+ }, isURLSearchParams, isReadableStream, isRequest, isResponse, isHeaders, trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), _global, isContextDefined = (context2) => !isUndefined(context2) && context2 !== _global, extend2 = (a, b, thisArg, { allOwnKeys } = {}) => {
15955
16448
  forEach(b, (val, key) => {
15956
16449
  if (thisArg && isFunction(val)) {
15957
16450
  Object.defineProperty(a, key, {
@@ -26699,12 +27192,12 @@ var init_platform = __esm(() => {
26699
27192
  // ../../node_modules/axios/lib/helpers/toURLEncodedForm.js
26700
27193
  function toURLEncodedForm(data, options) {
26701
27194
  return toFormData_default(data, new platform_default.classes.URLSearchParams, {
26702
- visitor: function(value, key, path, helpers) {
27195
+ visitor: function(value, key, path, helpers2) {
26703
27196
  if (platform_default.isNode && utils_default.isBuffer(value)) {
26704
27197
  this.append(key, value.toString("base64"));
26705
27198
  return false;
26706
27199
  }
26707
- return helpers.defaultVisitor.apply(this, arguments);
27200
+ return helpers2.defaultVisitor.apply(this, arguments);
26708
27201
  },
26709
27202
  ...options
26710
27203
  });
@@ -26952,7 +27445,7 @@ function parseTokens(str) {
26952
27445
  }
26953
27446
  return tokens;
26954
27447
  }
26955
- function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
27448
+ function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) {
26956
27449
  if (utils_default.isFunction(filter2)) {
26957
27450
  return filter2.call(this, value, header);
26958
27451
  }
@@ -27171,9 +27664,9 @@ var init_AxiosHeaders = __esm(() => {
27171
27664
  // ../../node_modules/axios/lib/core/transformData.js
27172
27665
  function transformData(fns, response) {
27173
27666
  const config2 = this || defaults_default;
27174
- const context = response || config2;
27175
- const headers = AxiosHeaders_default.from(context.headers);
27176
- let data = context.data;
27667
+ const context2 = response || config2;
27668
+ const headers = AxiosHeaders_default.from(context2.headers);
27669
+ let data = context2.data;
27177
27670
  utils_default.forEach(fns, function transform2(fn) {
27178
27671
  data = fn.call(config2, data, headers.normalize(), response ? response.status : undefined);
27179
27672
  });
@@ -28279,13 +28772,13 @@ var require_follow_redirects = __commonJS((exports, module) => {
28279
28772
  }
28280
28773
  };
28281
28774
  RedirectableRequest.prototype._performRequest = function() {
28282
- var protocol = this._options.protocol;
28283
- var nativeProtocol = this._options.nativeProtocols[protocol];
28775
+ var protocol2 = this._options.protocol;
28776
+ var nativeProtocol = this._options.nativeProtocols[protocol2];
28284
28777
  if (!nativeProtocol) {
28285
- throw new TypeError("Unsupported protocol " + protocol);
28778
+ throw new TypeError("Unsupported protocol " + protocol2);
28286
28779
  }
28287
28780
  if (this._options.agents) {
28288
- var scheme = protocol.slice(0, -1);
28781
+ var scheme = protocol2.slice(0, -1);
28289
28782
  this._options.agent = this._options.agents[scheme];
28290
28783
  }
28291
28784
  var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
@@ -28382,8 +28875,8 @@ var require_follow_redirects = __commonJS((exports, module) => {
28382
28875
  };
28383
28876
  var nativeProtocols = {};
28384
28877
  Object.keys(protocols).forEach(function(scheme) {
28385
- var protocol = scheme + ":";
28386
- var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
28878
+ var protocol2 = scheme + ":";
28879
+ var nativeProtocol = nativeProtocols[protocol2] = protocols[scheme];
28387
28880
  var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
28388
28881
  function request(input, options, callback) {
28389
28882
  if (isURL(input)) {
@@ -28393,7 +28886,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
28393
28886
  } else {
28394
28887
  callback = options;
28395
28888
  options = validateUrl(input);
28396
- input = { protocol };
28889
+ input = { protocol: protocol2 };
28397
28890
  }
28398
28891
  if (isFunction2(options)) {
28399
28892
  callback = options;
@@ -28407,7 +28900,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
28407
28900
  if (!isString2(options.host) && !isString2(options.hostname)) {
28408
28901
  options.hostname = "::1";
28409
28902
  }
28410
- assert2.equal(options.protocol, protocol, "protocol mismatch");
28903
+ assert2.equal(options.protocol, protocol2, "protocol mismatch");
28411
28904
  debug("options", options);
28412
28905
  return new RedirectableRequest(options, callback);
28413
28906
  }
@@ -28534,12 +29027,12 @@ function parseProtocol(url3) {
28534
29027
  // ../../node_modules/axios/lib/helpers/fromDataURI.js
28535
29028
  function fromDataURI(uri, asBlob, options) {
28536
29029
  const _Blob = options && options.Blob || platform_default.classes.Blob;
28537
- const protocol = parseProtocol(uri);
29030
+ const protocol2 = parseProtocol(uri);
28538
29031
  if (asBlob === undefined && _Blob) {
28539
29032
  asBlob = true;
28540
29033
  }
28541
- if (protocol === "data") {
28542
- uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
29034
+ if (protocol2 === "data") {
29035
+ uri = protocol2.length ? uri.slice(protocol2.length + 1) : uri;
28543
29036
  const match = DATA_URL_PATTERN.exec(uri);
28544
29037
  if (!match) {
28545
29038
  throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL);
@@ -28556,7 +29049,7 @@ function fromDataURI(uri, asBlob, options) {
28556
29049
  }
28557
29050
  return buffer;
28558
29051
  }
28559
- throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
29052
+ throw new AxiosError_default("Unsupported protocol " + protocol2, AxiosError_default.ERR_NOT_SUPPORT);
28560
29053
  }
28561
29054
  var DATA_URL_PATTERN;
28562
29055
  var init_fromDataURI = __esm(() => {
@@ -29024,7 +29517,7 @@ class Http2Sessions {
29024
29517
  }
29025
29518
  }
29026
29519
  }
29027
- const session = http2.connect(authority, options);
29520
+ const session2 = http2.connect(authority, options);
29028
29521
  let removed;
29029
29522
  const removeSession = () => {
29030
29523
  if (removed) {
@@ -29033,7 +29526,7 @@ class Http2Sessions {
29033
29526
  removed = true;
29034
29527
  let entries = authoritySessions, len = entries.length, i = len;
29035
29528
  while (i--) {
29036
- if (entries[i][0] === session) {
29529
+ if (entries[i][0] === session2) {
29037
29530
  if (len === 1) {
29038
29531
  delete this.sessions[authority];
29039
29532
  } else {
@@ -29043,12 +29536,12 @@ class Http2Sessions {
29043
29536
  }
29044
29537
  }
29045
29538
  };
29046
- const originalRequestFn = session.request;
29539
+ const originalRequestFn = session2.request;
29047
29540
  const { sessionTimeout } = options;
29048
29541
  if (sessionTimeout != null) {
29049
29542
  let timer;
29050
29543
  let streamsCount = 0;
29051
- session.request = function() {
29544
+ session2.request = function() {
29052
29545
  const stream4 = originalRequestFn.apply(this, arguments);
29053
29546
  streamsCount++;
29054
29547
  if (timer) {
@@ -29066,13 +29559,13 @@ class Http2Sessions {
29066
29559
  return stream4;
29067
29560
  };
29068
29561
  }
29069
- session.once("close", removeSession);
29562
+ session2.once("close", removeSession);
29070
29563
  let entry = [
29071
- session,
29564
+ session2,
29072
29565
  options
29073
29566
  ];
29074
29567
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
29075
- return session;
29568
+ return session2;
29076
29569
  }
29077
29570
  }
29078
29571
  function dispatchBeforeRedirect(options, responseDetails) {
@@ -29181,8 +29674,8 @@ var init_http = __esm(() => {
29181
29674
  isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
29182
29675
  ({ http: httpFollow, https: httpsFollow } = import_follow_redirects.default);
29183
29676
  isHttps = /https:?/;
29184
- supportedProtocols = platform_default.protocols.map((protocol) => {
29185
- return protocol + ":";
29677
+ supportedProtocols = platform_default.protocols.map((protocol2) => {
29678
+ return protocol2 + ":";
29186
29679
  });
29187
29680
  http2Sessions = new Http2Sessions;
29188
29681
  isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
@@ -29190,7 +29683,7 @@ var init_http = __esm(() => {
29190
29683
  request(options, cb) {
29191
29684
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
29192
29685
  const { http2Options, headers } = options;
29193
- const session = http2Sessions.getSession(authority, http2Options);
29686
+ const session2 = http2Sessions.getSession(authority, http2Options);
29194
29687
  const {
29195
29688
  HTTP2_HEADER_SCHEME,
29196
29689
  HTTP2_HEADER_METHOD,
@@ -29205,7 +29698,7 @@ var init_http = __esm(() => {
29205
29698
  utils_default.forEach(headers, (header, name) => {
29206
29699
  name.charAt(0) !== ":" && (http2Headers[name] = header);
29207
29700
  });
29208
- const req = session.request(http2Headers);
29701
+ const req = session2.request(http2Headers);
29209
29702
  req.once("response", (responseHeaders) => {
29210
29703
  const response = req;
29211
29704
  responseHeaders = Object.assign({}, responseHeaders);
@@ -29289,8 +29782,8 @@ var init_http = __esm(() => {
29289
29782
  });
29290
29783
  const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
29291
29784
  const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : undefined);
29292
- const protocol = parsed.protocol || supportedProtocols[0];
29293
- if (protocol === "data:") {
29785
+ const protocol2 = parsed.protocol || supportedProtocols[0];
29786
+ if (protocol2 === "data:") {
29294
29787
  if (config2.maxContentLength > -1) {
29295
29788
  const dataUrl = String(config2.url || fullPath || "");
29296
29789
  const estimated = estimateDataURLDecodedBytes(dataUrl);
@@ -29330,8 +29823,8 @@ var init_http = __esm(() => {
29330
29823
  config: config2
29331
29824
  });
29332
29825
  }
29333
- if (supportedProtocols.indexOf(protocol) === -1) {
29334
- return reject(new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config2));
29826
+ if (supportedProtocols.indexOf(protocol2) === -1) {
29827
+ return reject(new AxiosError_default("Unsupported protocol " + protocol2, AxiosError_default.ERR_BAD_REQUEST, config2));
29335
29828
  }
29336
29829
  const headers = AxiosHeaders_default.from(config2.headers).normalize();
29337
29830
  headers.set("User-Agent", "axios/" + VERSION, false);
@@ -29417,7 +29910,7 @@ var init_http = __esm(() => {
29417
29910
  headers: headers.toJSON(),
29418
29911
  agents: { http: config2.httpAgent, https: config2.httpsAgent },
29419
29912
  auth: auth2,
29420
- protocol,
29913
+ protocol: protocol2,
29421
29914
  family,
29422
29915
  beforeRedirect: dispatchBeforeRedirect,
29423
29916
  beforeRedirects: {},
@@ -29429,7 +29922,7 @@ var init_http = __esm(() => {
29429
29922
  } else {
29430
29923
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
29431
29924
  options.port = parsed.port;
29432
- setProxy(options, config2.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
29925
+ setProxy(options, config2.proxy, protocol2 + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
29433
29926
  }
29434
29927
  let transport;
29435
29928
  const isHttpsRequest = isHttps.test(options.protocol);
@@ -29920,9 +30413,9 @@ var init_xhr = __esm(() => {
29920
30413
  _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
29921
30414
  }
29922
30415
  }
29923
- const protocol = parseProtocol(_config.url);
29924
- if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
29925
- reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config2));
30416
+ const protocol2 = parseProtocol(_config.url);
30417
+ if (protocol2 && platform_default.protocols.indexOf(protocol2) === -1) {
30418
+ reject(new AxiosError_default("Unsupported protocol " + protocol2 + ":", AxiosError_default.ERR_BAD_REQUEST, config2));
29926
30419
  return;
29927
30420
  }
29928
30421
  request.send(requestData || null);
@@ -30768,10 +31261,10 @@ var init_HttpStatusCode = __esm(() => {
30768
31261
 
30769
31262
  // ../../node_modules/axios/lib/axios.js
30770
31263
  function createInstance(defaultConfig) {
30771
- const context = new Axios_default(defaultConfig);
30772
- const instance = bind(Axios_default.prototype.request, context);
30773
- utils_default.extend(instance, Axios_default.prototype, context, { allOwnKeys: true });
30774
- utils_default.extend(instance, context, null, { allOwnKeys: true });
31264
+ const context2 = new Axios_default(defaultConfig);
31265
+ const instance = bind(Axios_default.prototype.request, context2);
31266
+ utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true });
31267
+ utils_default.extend(instance, context2, null, { allOwnKeys: true });
30775
31268
  instance.create = function create(instanceConfig) {
30776
31269
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
30777
31270
  };
@@ -31322,11 +31815,11 @@ ${line}`;
31322
31815
  writeFileSync(this.progressPath, updated);
31323
31816
  }
31324
31817
  getFullContext() {
31325
- const context = this.readContext();
31818
+ const context2 = this.readContext();
31326
31819
  const progress = this.readProgress();
31327
31820
  const parts = [];
31328
- if (context.trim()) {
31329
- parts.push(context.trim());
31821
+ if (context2.trim()) {
31822
+ parts.push(context2.trim());
31330
31823
  }
31331
31824
  if (progress.trim()) {
31332
31825
  parts.push(progress.trim());
@@ -31669,10 +32162,10 @@ ${task2.description || "No description provided."}
31669
32162
  let hasLocalContext = false;
31670
32163
  if (existsSync4(contextPath)) {
31671
32164
  try {
31672
- const context = readFileSync4(contextPath, "utf-8");
31673
- if (context.trim().length > 20) {
32165
+ const context2 = readFileSync4(contextPath, "utf-8");
32166
+ if (context2.trim().length > 20) {
31674
32167
  prompt += `## Project Context (Local)
31675
- ${context}
32168
+ ${context2}
31676
32169
 
31677
32170
  `;
31678
32171
  hasLocalContext = true;
@@ -31802,10 +32295,10 @@ ${query}
31802
32295
  let hasLocalContext = false;
31803
32296
  if (existsSync4(contextPath)) {
31804
32297
  try {
31805
- const context = readFileSync4(contextPath, "utf-8");
31806
- if (context.trim().length > 20) {
32298
+ const context2 = readFileSync4(contextPath, "utf-8");
32299
+ if (context2.trim().length > 20) {
31807
32300
  prompt += `## Project Context (Local)
31808
- ${context}
32301
+ ${context2}
31809
32302
 
31810
32303
  `;
31811
32304
  hasLocalContext = true;