@wrongstack/core 0.8.6 → 0.9.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.
Files changed (54) hide show
  1. package/dist/{agent-bridge-Bad3ZGQ7.d.ts → agent-bridge-DMVOX0cF.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-Cc8sRJOF.d.ts → agent-subagent-runner-R0I0Xusn.d.ts} +3 -3
  3. package/dist/{compactor-Mw7-rNyb.d.ts → compactor-DVTKL7XD.d.ts} +1 -1
  4. package/dist/{config-Bi4Q0fnz.d.ts → config-DoUAEvXH.d.ts} +8 -2
  5. package/dist/{context-z2x5gv_V.d.ts → context-BRNbHmRM.d.ts} +6 -0
  6. package/dist/coordination/index.d.ts +12 -12
  7. package/dist/coordination/index.js +58 -37
  8. package/dist/coordination/index.js.map +1 -1
  9. package/dist/{default-config-DvRSTELf.d.ts → default-config-Uzla85H-.d.ts} +5 -1
  10. package/dist/defaults/index.d.ts +22 -22
  11. package/dist/defaults/index.js +119 -76
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/{events-yCpJD4wa.d.ts → events-CiG9qUM_.d.ts} +1 -1
  14. package/dist/execution/index.d.ts +13 -13
  15. package/dist/execution/index.js.map +1 -1
  16. package/dist/extension/index.d.ts +6 -6
  17. package/dist/{index-SxpnwRlJ.d.ts → index-bOl8lzFV.d.ts} +5 -5
  18. package/dist/{index-BvZld4Dr.d.ts → index-u2ROAV0F.d.ts} +17 -8
  19. package/dist/index.d.ts +31 -31
  20. package/dist/index.js +182 -95
  21. package/dist/index.js.map +1 -1
  22. package/dist/infrastructure/index.d.ts +6 -6
  23. package/dist/kernel/index.d.ts +9 -9
  24. package/dist/{mcp-servers-n2L9ohMX.d.ts → mcp-servers-jEoMIBZv.d.ts} +3 -3
  25. package/dist/models/index.d.ts +2 -2
  26. package/dist/{multi-agent-C8uY45AY.d.ts → multi-agent-3ZnTB1aT.d.ts} +2 -2
  27. package/dist/{multi-agent-coordinator-C7YbZUY8.d.ts → multi-agent-coordinator-COwCGIrU.d.ts} +2 -2
  28. package/dist/{null-fleet-bus-Bb2jVLKr.d.ts → null-fleet-bus-C1grTnOF.d.ts} +6 -6
  29. package/dist/observability/index.d.ts +2 -2
  30. package/dist/{path-resolver-DnC1nOjb.d.ts → path-resolver-TcJfc29Y.d.ts} +2 -2
  31. package/dist/{permission-policy-BBa1M1xc.d.ts → permission-policy-BpCGYBud.d.ts} +2 -2
  32. package/dist/{plan-templates-Cqdy6rtM.d.ts → plan-templates-ByT1HcRI.d.ts} +17 -7
  33. package/dist/{provider-runner-C4ouU7--.d.ts → provider-runner-BEpikbbN.d.ts} +3 -3
  34. package/dist/{retry-policy-OwtKNxo8.d.ts → retry-policy-BYkq0ugs.d.ts} +1 -1
  35. package/dist/sdd/index.d.ts +8 -8
  36. package/dist/{secret-scrubber-CyE1-EMG.d.ts → secret-scrubber-DttNiGYA.d.ts} +1 -1
  37. package/dist/{secret-scrubber-C0n1EqrC.d.ts → secret-scrubber-QSeI0ADi.d.ts} +1 -1
  38. package/dist/security/index.d.ts +4 -4
  39. package/dist/security/index.js +5 -2
  40. package/dist/security/index.js.map +1 -1
  41. package/dist/{selector-DkvgYVS4.d.ts → selector-pox8abg0.d.ts} +1 -1
  42. package/dist/{session-reader-DsadjyF9.d.ts → session-reader-CSWcb5Ga.d.ts} +1 -1
  43. package/dist/storage/index.d.ts +9 -6
  44. package/dist/storage/index.js +109 -63
  45. package/dist/storage/index.js.map +1 -1
  46. package/dist/{system-prompt-CWA6ml-d.d.ts → system-prompt-Bs-Wliab.d.ts} +1 -1
  47. package/dist/{tool-executor-Ch25BDwa.d.ts → tool-executor-D7a00JVJ.d.ts} +4 -4
  48. package/dist/types/index.d.ts +16 -16
  49. package/dist/types/index.js +8 -2
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/utils/index.d.ts +1 -1
  52. package/dist/utils/index.js +3 -1
  53. package/dist/utils/index.js.map +1 -1
  54. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-bOzkF5LL.js';
2
- export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-DnC1nOjb.js';
3
- export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from '../mcp-servers-n2L9ohMX.js';
2
+ export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-TcJfc29Y.js';
3
+ export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from '../mcp-servers-jEoMIBZv.js';
4
4
  import '../logger-DDd5C--Z.js';
5
- import '../events-yCpJD4wa.js';
6
- import '../context-z2x5gv_V.js';
5
+ import '../events-CiG9qUM_.js';
6
+ import '../context-BRNbHmRM.js';
7
7
  import '../models-registry-BcYJDKLm.js';
8
8
  import '../path-resolver-CPRj4bFY.js';
9
- import '../compactor-Mw7-rNyb.js';
10
- import '../config-Bi4Q0fnz.js';
9
+ import '../compactor-DVTKL7XD.js';
10
+ import '../config-DoUAEvXH.js';
@@ -1,17 +1,17 @@
1
- export { B as BindOptions, C as Container, D as Decorator, F as Factory, M as Middleware, b as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, T as Token } from '../system-prompt-CWA6ml-d.js';
2
- export { E as EventBus, a as EventLogger, b as EventMap, c as EventName, L as Listener, S as ScopedEventBus } from '../events-yCpJD4wa.js';
3
- export { R as RunController, b as RunControllerOptions, T as TOKENS } from '../index-BvZld4Dr.js';
4
- import '../context-z2x5gv_V.js';
5
- import '../compactor-Mw7-rNyb.js';
6
- import '../config-Bi4Q0fnz.js';
1
+ export { B as BindOptions, C as Container, D as Decorator, F as Factory, M as Middleware, b as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, T as Token } from '../system-prompt-Bs-Wliab.js';
2
+ export { E as EventBus, a as EventLogger, b as EventMap, c as EventName, L as Listener, S as ScopedEventBus } from '../events-CiG9qUM_.js';
3
+ export { R as RunController, b as RunControllerOptions, T as TOKENS } from '../index-u2ROAV0F.js';
4
+ import '../context-BRNbHmRM.js';
5
+ import '../compactor-DVTKL7XD.js';
6
+ import '../config-DoUAEvXH.js';
7
7
  import '../models-registry-BcYJDKLm.js';
8
- import '../retry-policy-OwtKNxo8.js';
8
+ import '../retry-policy-BYkq0ugs.js';
9
9
  import '../input-reader-E-ffP2ee.js';
10
10
  import '../logger-DDd5C--Z.js';
11
11
  import '../memory-CEXuo7sz.js';
12
12
  import '../mode-CV077NjV.js';
13
13
  import '../path-resolver-CPRj4bFY.js';
14
- import '../secret-scrubber-CyE1-EMG.js';
15
- import '../provider-runner-C4ouU7--.js';
14
+ import '../secret-scrubber-DttNiGYA.js';
15
+ import '../provider-runner-BEpikbbN.js';
16
16
  import '../observability-BhnVLBLS.js';
17
17
  import '../skill-CxuWrsKK.js';
@@ -1,6 +1,6 @@
1
- import { a as Compactor } from './compactor-Mw7-rNyb.js';
2
- import { M as Message, Q as Tool } from './context-z2x5gv_V.js';
3
- import { M as MCPServerConfig } from './config-Bi4Q0fnz.js';
1
+ import { a as Compactor } from './compactor-DVTKL7XD.js';
2
+ import { M as Message, Q as Tool } from './context-BRNbHmRM.js';
3
+ import { M as MCPServerConfig } from './config-DoUAEvXH.js';
4
4
 
5
5
  type ContextManagerAction = 'check' | 'summary' | 'prune' | 'add_note' | 'compact' | 'repair';
6
6
  interface ContextManagerInput {
@@ -1,7 +1,7 @@
1
1
  export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-OG_30xqZ.js';
2
2
  import { c as ModeStore, a as ModeConfig, M as Mode } from '../mode-CV077NjV.js';
3
- import { m as Provider, M as Message } from '../context-z2x5gv_V.js';
4
- import { M as MessageSelector, S as SelectorResult } from '../selector-DkvgYVS4.js';
3
+ import { m as Provider, M as Message } from '../context-BRNbHmRM.js';
4
+ import { M as MessageSelector, S as SelectorResult } from '../selector-pox8abg0.js';
5
5
  import '../models-registry-BcYJDKLm.js';
6
6
 
7
7
  declare class DefaultModeStore implements ModeStore {
@@ -1,5 +1,5 @@
1
- import { $ as Usage } from './context-z2x5gv_V.js';
2
- import { E as EventBus } from './events-yCpJD4wa.js';
1
+ import { $ as Usage } from './context-BRNbHmRM.js';
2
+ import { E as EventBus } from './events-CiG9qUM_.js';
3
3
 
4
4
  type BridgeMessageType = 'task' | 'result' | 'progress' | 'error' | 'heartbeat' | 'stop' | 'delegate' | 'budget_threshold';
5
5
  interface BridgeMessage<T = unknown> {
@@ -1,5 +1,5 @@
1
- import { n as SubagentConfig, l as MultiAgentCoordinator, M as MultiAgentConfig, t as SubagentRunner, S as SpawnResult, v as TaskSpec, B as BridgeMessage, A as AgentBridge, k as CoordinatorStatus, u as TaskResult } from './multi-agent-C8uY45AY.js';
2
- import { F as FleetBus } from './agent-subagent-runner-Cc8sRJOF.js';
1
+ import { n as SubagentConfig, l as MultiAgentCoordinator, M as MultiAgentConfig, t as SubagentRunner, S as SpawnResult, v as TaskSpec, B as BridgeMessage, A as AgentBridge, k as CoordinatorStatus, u as TaskResult } from './multi-agent-3ZnTB1aT.js';
2
+ import { F as FleetBus } from './agent-subagent-runner-R0I0Xusn.js';
3
3
  import { EventEmitter } from 'node:events';
4
4
 
5
5
  /**
@@ -1,10 +1,10 @@
1
- import { c as AgentPhase, b as AgentDefinition, d as DefaultMultiAgentCoordinator, f as DispatchClassifier } from './multi-agent-coordinator-C7YbZUY8.js';
2
- import { n as SubagentConfig, u as TaskResult, k as CoordinatorStatus, v as TaskSpec, M as MultiAgentConfig, t as SubagentRunner } from './multi-agent-C8uY45AY.js';
3
- import { B as SessionWriter, Q as Tool, y as SessionStore } from './context-z2x5gv_V.js';
1
+ import { c as AgentPhase, b as AgentDefinition, d as DefaultMultiAgentCoordinator, f as DispatchClassifier } from './multi-agent-coordinator-COwCGIrU.js';
2
+ import { n as SubagentConfig, u as TaskResult, k as CoordinatorStatus, v as TaskSpec, M as MultiAgentConfig, t as SubagentRunner } from './multi-agent-3ZnTB1aT.js';
3
+ import { B as SessionWriter, Q as Tool, y as SessionStore } from './context-BRNbHmRM.js';
4
4
  import { a as DirectorStateSnapshot } from './director-state-BmYi3DGA.js';
5
- import { I as InMemoryAgentBridge } from './agent-bridge-Bad3ZGQ7.js';
6
- import { F as FleetBus, e as FleetUsage, f as FleetUsageAggregator } from './agent-subagent-runner-Cc8sRJOF.js';
7
- import { E as EventBus } from './events-yCpJD4wa.js';
5
+ import { I as InMemoryAgentBridge } from './agent-bridge-DMVOX0cF.js';
6
+ import { F as FleetBus, e as FleetUsage, f as FleetUsageAggregator } from './agent-subagent-runner-R0I0Xusn.js';
7
+ import { E as EventBus } from './events-CiG9qUM_.js';
8
8
 
9
9
  /**
10
10
  * Agent catalog aggregator.
@@ -1,6 +1,6 @@
1
1
  import { e as MetricsSink, M as MetricLabels, f as MetricsSnapshot, b as HealthRegistry, H as HealthCheck, A as AggregateHealth, T as Tracer, S as Span } from '../observability-BhnVLBLS.js';
2
- import { E as EventBus } from '../events-yCpJD4wa.js';
3
- import '../context-z2x5gv_V.js';
2
+ import { E as EventBus } from '../events-CiG9qUM_.js';
3
+ import '../context-BRNbHmRM.js';
4
4
 
5
5
  /**
6
6
  * In-memory metrics sink. Suitable for embedded use, tests, and /metrics
@@ -1,6 +1,6 @@
1
- import { E as EventBus } from './events-yCpJD4wa.js';
1
+ import { E as EventBus } from './events-CiG9qUM_.js';
2
2
  import { b as ModelsRegistry, R as ResolvedModel } from './models-registry-BcYJDKLm.js';
3
- import { O as TokenCounter, $ as Usage, C as CacheStats } from './context-z2x5gv_V.js';
3
+ import { O as TokenCounter, $ as Usage, C as CacheStats } from './context-BRNbHmRM.js';
4
4
  import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { Q as Tool, d as Context } from './context-z2x5gv_V.js';
1
+ import { Q as Tool, d as Context } from './context-BRNbHmRM.js';
2
2
  import { I as InputReader } from './input-reader-E-ffP2ee.js';
3
- import { a as PermissionPolicy, P as PermissionDecision } from './secret-scrubber-CyE1-EMG.js';
3
+ import { a as PermissionPolicy, P as PermissionDecision } from './secret-scrubber-DttNiGYA.js';
4
4
 
5
5
  interface PermissionPolicyOptions {
6
6
  trustFile: string;
@@ -1,9 +1,9 @@
1
- import { E as EventBus } from './events-yCpJD4wa.js';
2
- import { y as SessionStore, x as SessionMetadata, B as SessionWriter, r as ResumedSession, S as SessionData, z as SessionSummary, c as ContentBlock, w as SessionEvent, N as TodoItem, f as ConversationState } from './context-z2x5gv_V.js';
3
- import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-DsadjyF9.js';
1
+ import { E as EventBus } from './events-CiG9qUM_.js';
2
+ import { y as SessionStore, x as SessionMetadata, B as SessionWriter, r as ResumedSession, S as SessionData, z as SessionSummary, c as ContentBlock, w as SessionEvent, N as TodoItem, f as ConversationState } from './context-BRNbHmRM.js';
3
+ import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-CSWcb5Ga.js';
4
4
  import { b as MemoryStore, a as MemoryScope } from './memory-CEXuo7sz.js';
5
5
  import { a as WstackPaths } from './wstack-paths-CJYrjQU8.js';
6
- import { c as ConfigStore, a as Config, b as ConfigLoader } from './config-Bi4Q0fnz.js';
6
+ import { c as ConfigStore, a as Config, b as ConfigLoader } from './config-DoUAEvXH.js';
7
7
  import { S as SecretVault } from './secret-vault-DoISxaKO.js';
8
8
 
9
9
  interface SessionStoreOptions {
@@ -15,10 +15,15 @@ declare class DefaultSessionStore implements SessionStore {
15
15
  private readonly dir;
16
16
  private readonly events?;
17
17
  constructor(opts: SessionStoreOptions);
18
+ /** Join session ID to its absolute path within the store directory. */
19
+ private sessionPath;
20
+ private ensureShardDir;
18
21
  create(meta: Omit<SessionMetadata, 'startedAt'>): Promise<SessionWriter>;
19
22
  resume(id: string): Promise<ResumedSession>;
20
23
  load(id: string): Promise<SessionData>;
21
24
  list(limit?: number): Promise<SessionSummary[]>;
25
+ /** Recursively collect all session IDs from shard subdirectories. */
26
+ private collectSessionIds;
22
27
  private summaryFor;
23
28
  delete(id: string): Promise<void>;
24
29
  clearHistory(id: string): Promise<void>;
@@ -331,9 +336,14 @@ declare class RecoveryLock {
331
336
  */
332
337
  checkAbandoned(): Promise<AbandonedSession | null>;
333
338
  /**
334
- * Claim the lock for the given session. Overwrites any existing lock
335
- * the caller should have already handled abandonment (via
336
- * `checkAbandoned`) before calling this.
339
+ * Claim the lock for the given session. Uses exclusive-create (`O_EXCL`)
340
+ * to detect whether another process acquired the lock between our
341
+ * `checkAbandoned()` call and now. If the file already exists, it means
342
+ * another process won the race and we throw instead of silently
343
+ * overwriting their recovery record.
344
+ *
345
+ * The caller MUST have already called `checkAbandoned()` and handled its
346
+ * null return before calling this.
337
347
  */
338
348
  write(sessionId: string): Promise<void>;
339
349
  /**
@@ -1,8 +1,8 @@
1
- import { E as EventBus } from './events-yCpJD4wa.js';
1
+ import { E as EventBus } from './events-CiG9qUM_.js';
2
2
  import { a as Logger } from './logger-DDd5C--Z.js';
3
3
  import { T as Tracer } from './observability-BhnVLBLS.js';
4
- import { m as Provider, p as Request, d as Context, q as Response } from './context-z2x5gv_V.js';
5
- import { a as RetryPolicy } from './retry-policy-OwtKNxo8.js';
4
+ import { m as Provider, p as Request, d as Context, q as Response } from './context-BRNbHmRM.js';
5
+ import { a as RetryPolicy } from './retry-policy-BYkq0ugs.js';
6
6
 
7
7
  /**
8
8
  * Options passed to a ProviderRunner when calling the provider.
@@ -1,4 +1,4 @@
1
- import { q as Response, d as Context, n as ProviderError } from './context-z2x5gv_V.js';
1
+ import { q as Response, d as Context, n as ProviderError } from './context-BRNbHmRM.js';
2
2
 
3
3
  type RecoveryDecision = {
4
4
  /**
@@ -1,14 +1,14 @@
1
1
  import { h as Specification, S as SpecAnalysis, g as SpecValidationResult, l as TaskGraph, m as TaskNode, k as TaskFilter, p as TaskSort, o as TaskProgress, r as TaskType, n as TaskPriority, e as SpecStatus, f as SpecTemplate, b as SpecRequirement } from '../task-graph-D1YQbpxF.js';
2
- import { E as EventBus } from '../events-yCpJD4wa.js';
3
- import { D as DoneCondition, u as TaskResult } from '../multi-agent-C8uY45AY.js';
4
- import { c as Agent } from '../index-SxpnwRlJ.js';
5
- import { A as AgentFactory } from '../agent-subagent-runner-Cc8sRJOF.js';
6
- import '../context-z2x5gv_V.js';
2
+ import { E as EventBus } from '../events-CiG9qUM_.js';
3
+ import { D as DoneCondition, u as TaskResult } from '../multi-agent-3ZnTB1aT.js';
4
+ import { c as Agent } from '../index-bOl8lzFV.js';
5
+ import { A as AgentFactory } from '../agent-subagent-runner-R0I0Xusn.js';
6
+ import '../context-BRNbHmRM.js';
7
7
  import '../logger-DDd5C--Z.js';
8
- import '../system-prompt-CWA6ml-d.js';
8
+ import '../system-prompt-Bs-Wliab.js';
9
9
  import '../observability-BhnVLBLS.js';
10
- import '../secret-scrubber-CyE1-EMG.js';
11
- import '../config-Bi4Q0fnz.js';
10
+ import '../secret-scrubber-DttNiGYA.js';
11
+ import '../config-DoUAEvXH.js';
12
12
  import '../models-registry-BcYJDKLm.js';
13
13
 
14
14
  declare class SpecParser {
@@ -1,4 +1,4 @@
1
- import { Q as Tool, d as Context, P as Permission } from './context-z2x5gv_V.js';
1
+ import { Q as Tool, d as Context, P as Permission } from './context-BRNbHmRM.js';
2
2
 
3
3
  interface TrustPolicy {
4
4
  [toolNameOrPattern: string]: {
@@ -1,5 +1,5 @@
1
1
  import { S as SecretVault } from './secret-vault-DoISxaKO.js';
2
- import { S as SecretScrubber } from './secret-scrubber-CyE1-EMG.js';
2
+ import { S as SecretScrubber } from './secret-scrubber-DttNiGYA.js';
3
3
 
4
4
  interface SecretVaultOptions {
5
5
  /** Absolute path to the key file. Created with mode 0o600 if missing. */
@@ -1,8 +1,8 @@
1
- export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-C0n1EqrC.js';
2
- export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-BBa1M1xc.js';
1
+ export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-QSeI0ADi.js';
2
+ export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-BpCGYBud.js';
3
3
  import '../secret-vault-DoISxaKO.js';
4
- import '../secret-scrubber-CyE1-EMG.js';
5
- import '../context-z2x5gv_V.js';
4
+ import '../secret-scrubber-DttNiGYA.js';
5
+ import '../context-BRNbHmRM.js';
6
6
  import '../input-reader-E-ffP2ee.js';
7
7
 
8
8
  declare function isSecretField(name: string): boolean;
@@ -48,7 +48,10 @@ var PATTERNS = [
48
48
  type: "bearer_token",
49
49
  // Anchored with alternation instead of negative lookahead — avoids V8
50
50
  // backtracking risk on adversarial input. Bounded at 512 chars.
51
- regex: /(?:^|[^A-Za-z0-9_.~+/-])Bearer\s+[A-Za-z0-9._~+/-]{20,512}=*(?:$|[^A-Za-z0-9_.~+/-])/g
51
+ // Min 12 chars: some OAuth providers issue shorter-lived tokens (< 20
52
+ // chars). A 12-char base64 string has ~71 bits of entropy — above the
53
+ // threshold where random strings are unlikely to produce false matches.
54
+ regex: /(?:^|[^A-Za-z0-9_.~+/-])Bearer\s+[A-Za-z0-9._~+/-]{12,512}=*(?:$|[^A-Za-z0-9_.~+/-])/g
52
55
  },
53
56
  {
54
57
  type: "high_entropy_env",
@@ -609,7 +612,7 @@ var DefaultPermissionPolicy = class {
609
612
  return { permission: "auto", source: "context", reason: "file already read in this session" };
610
613
  }
611
614
  }
612
- if (tool.permission === "auto") {
615
+ if (tool.permission === "auto" && !tool.mutating) {
613
616
  return { permission: "auto", source: "default" };
614
617
  }
615
618
  if (this.promptDelegate) {