@probelabs/probe 0.6.0-rc256 → 0.6.0-rc257

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/cjs/index.cjs CHANGED
@@ -95383,10 +95383,10 @@ var init_FallbackManager = __esm({
95383
95383
  // Use custom provider list
95384
95384
  };
95385
95385
  DEFAULT_MODELS = {
95386
- anthropic: "claude-sonnet-4-5-20250929",
95387
- openai: "gpt-4o",
95388
- google: "gemini-2.0-flash-exp",
95389
- bedrock: "anthropic.claude-sonnet-4-20250514-v1:0"
95386
+ anthropic: "claude-sonnet-4-6",
95387
+ openai: "gpt-5.2",
95388
+ google: "gemini-2.5-flash",
95389
+ bedrock: "anthropic.claude-sonnet-4-6"
95390
95390
  };
95391
95391
  FallbackManager = class {
95392
95392
  /**
@@ -105803,191 +105803,102 @@ var init_bashDefaults = __esm({
105803
105803
  "dir",
105804
105804
  "pwd",
105805
105805
  "cd",
105806
- "cd:*",
105807
105806
  // File reading commands
105808
105807
  "cat",
105809
- "cat:*",
105810
105808
  "head",
105811
- "head:*",
105812
105809
  "tail",
105813
- "tail:*",
105814
105810
  "less",
105815
105811
  "more",
105816
105812
  "view",
105817
105813
  // File information and metadata
105818
105814
  "file",
105819
- "file:*",
105820
105815
  "stat",
105821
- "stat:*",
105822
105816
  "wc",
105823
- "wc:*",
105824
105817
  "du",
105825
- "du:*",
105826
105818
  "df",
105827
- "df:*",
105828
105819
  "realpath",
105829
- "realpath:*",
105830
- // Search and find commands (read-only) - find restricted to safe operations
105820
+ // Search and find commands (read-only)
105821
+ // Note: bare 'find' allows all find variants; dangerous ones (find -exec) are blocked by deny list
105831
105822
  "find",
105832
- "find:-name:*",
105833
- "find:-type:*",
105834
- "find:-size:*",
105835
- "find:-mtime:*",
105836
- "find:-newer:*",
105837
- "find:-path:*",
105838
- "find:-iname:*",
105839
- "find:-maxdepth:*",
105840
- "find:-mindepth:*",
105841
- "find:-print",
105842
105823
  "grep",
105843
- "grep:*",
105844
105824
  "egrep",
105845
- "egrep:*",
105846
105825
  "fgrep",
105847
- "fgrep:*",
105848
105826
  "rg",
105849
- "rg:*",
105850
105827
  "ag",
105851
- "ag:*",
105852
105828
  "ack",
105853
- "ack:*",
105854
105829
  "which",
105855
- "which:*",
105856
105830
  "whereis",
105857
- "whereis:*",
105858
105831
  "locate",
105859
- "locate:*",
105860
105832
  "type",
105861
- "type:*",
105862
105833
  "command",
105863
- "command:*",
105864
105834
  // Tree and structure visualization
105865
105835
  "tree",
105866
- "tree:*",
105867
105836
  // Git read-only operations
105868
105837
  "git:status",
105869
- "git:status:*",
105870
105838
  "git:log",
105871
- "git:log:*",
105872
105839
  "git:diff",
105873
- "git:diff:*",
105874
105840
  "git:show",
105875
- "git:show:*",
105876
105841
  "git:branch",
105877
- "git:branch:*",
105878
105842
  "git:tag",
105879
- "git:tag:*",
105880
105843
  "git:describe",
105881
- "git:describe:*",
105882
105844
  "git:remote",
105883
- "git:remote:*",
105884
- "git:config:*",
105845
+ "git:config",
105885
105846
  "git:blame",
105886
- "git:blame:*",
105887
105847
  "git:shortlog",
105888
- "git:shortlog:*",
105889
105848
  "git:reflog",
105890
- "git:reflog:*",
105891
105849
  "git:ls-files",
105892
- "git:ls-files:*",
105893
105850
  "git:ls-tree",
105894
- "git:ls-tree:*",
105895
105851
  "git:ls-remote",
105896
- "git:ls-remote:*",
105897
105852
  "git:rev-parse",
105898
- "git:rev-parse:*",
105899
105853
  "git:rev-list",
105900
- "git:rev-list:*",
105901
105854
  "git:cat-file",
105902
- "git:cat-file:*",
105903
105855
  "git:diff-tree",
105904
- "git:diff-tree:*",
105905
105856
  "git:diff-files",
105906
- "git:diff-files:*",
105907
105857
  "git:diff-index",
105908
- "git:diff-index:*",
105909
105858
  "git:for-each-ref",
105910
- "git:for-each-ref:*",
105911
105859
  "git:merge-base",
105912
- "git:merge-base:*",
105913
105860
  "git:name-rev",
105914
- "git:name-rev:*",
105915
105861
  "git:count-objects",
105916
- "git:count-objects:*",
105917
105862
  "git:verify-commit",
105918
- "git:verify-commit:*",
105919
105863
  "git:verify-tag",
105920
- "git:verify-tag:*",
105921
105864
  "git:check-ignore",
105922
- "git:check-ignore:*",
105923
105865
  "git:check-attr",
105924
- "git:check-attr:*",
105925
105866
  "git:stash:list",
105926
105867
  "git:stash:show",
105927
- "git:stash:show:*",
105928
105868
  "git:worktree:list",
105929
- "git:worktree:list:*",
105930
105869
  "git:notes:list",
105931
105870
  "git:notes:show",
105932
- "git:notes:show:*",
105933
105871
  "git:--version",
105934
105872
  "git:help",
105935
- "git:help:*",
105936
105873
  // GitHub CLI (gh) read-only operations
105937
105874
  "gh:--version",
105938
105875
  "gh:help",
105939
- "gh:help:*",
105940
105876
  "gh:status",
105941
105877
  "gh:auth:status",
105942
- "gh:auth:status:*",
105943
105878
  "gh:issue:list",
105944
- "gh:issue:list:*",
105945
105879
  "gh:issue:view",
105946
- "gh:issue:view:*",
105947
105880
  "gh:issue:status",
105948
- "gh:issue:status:*",
105949
105881
  "gh:pr:list",
105950
- "gh:pr:list:*",
105951
105882
  "gh:pr:view",
105952
- "gh:pr:view:*",
105953
105883
  "gh:pr:status",
105954
- "gh:pr:status:*",
105955
105884
  "gh:pr:diff",
105956
- "gh:pr:diff:*",
105957
105885
  "gh:pr:checks",
105958
- "gh:pr:checks:*",
105959
105886
  "gh:repo:list",
105960
- "gh:repo:list:*",
105961
105887
  "gh:repo:view",
105962
- "gh:repo:view:*",
105963
105888
  "gh:release:list",
105964
- "gh:release:list:*",
105965
105889
  "gh:release:view",
105966
- "gh:release:view:*",
105967
105890
  "gh:run:list",
105968
- "gh:run:list:*",
105969
105891
  "gh:run:view",
105970
- "gh:run:view:*",
105971
105892
  "gh:workflow:list",
105972
- "gh:workflow:list:*",
105973
105893
  "gh:workflow:view",
105974
- "gh:workflow:view:*",
105975
105894
  "gh:gist:list",
105976
- "gh:gist:list:*",
105977
105895
  "gh:gist:view",
105978
- "gh:gist:view:*",
105979
105896
  "gh:search:issues",
105980
- "gh:search:issues:*",
105981
105897
  "gh:search:prs",
105982
- "gh:search:prs:*",
105983
105898
  "gh:search:repos",
105984
- "gh:search:repos:*",
105985
105899
  "gh:search:code",
105986
- "gh:search:code:*",
105987
105900
  "gh:search:commits",
105988
- "gh:search:commits:*",
105989
105901
  "gh:api",
105990
- "gh:api:*",
105991
105902
  // Package managers (information only)
105992
105903
  "npm:list",
105993
105904
  "npm:ls",
@@ -106048,7 +105959,6 @@ var init_bashDefaults = __esm({
106048
105959
  "sqlite3:--version",
106049
105960
  // System information
106050
105961
  "uname",
106051
- "uname:*",
106052
105962
  "hostname",
106053
105963
  "whoami",
106054
105964
  "id",
@@ -106059,23 +105969,17 @@ var init_bashDefaults = __esm({
106059
105969
  "w",
106060
105970
  "users",
106061
105971
  "sleep",
106062
- "sleep:*",
106063
105972
  // Environment and shell
106064
105973
  "env",
106065
105974
  "printenv",
106066
105975
  "echo",
106067
- "echo:*",
106068
105976
  "printf",
106069
- "printf:*",
106070
105977
  "export",
106071
- "export:*",
106072
105978
  "set",
106073
105979
  "unset",
106074
105980
  // Process information (read-only)
106075
105981
  "ps",
106076
- "ps:*",
106077
105982
  "pgrep",
106078
- "pgrep:*",
106079
105983
  "jobs",
106080
105984
  "top:-n:1",
106081
105985
  // Network information (read-only)
@@ -106090,39 +105994,24 @@ var init_bashDefaults = __esm({
106090
105994
  // Text processing and utilities (awk removed - too powerful)
106091
105995
  "sed:-n:*",
106092
105996
  "cut",
106093
- "cut:*",
106094
105997
  "sort",
106095
- "sort:*",
106096
105998
  "uniq",
106097
- "uniq:*",
106098
105999
  "tr",
106099
- "tr:*",
106100
106000
  "column",
106101
- "column:*",
106102
106001
  "paste",
106103
- "paste:*",
106104
106002
  "join",
106105
- "join:*",
106106
106003
  "comm",
106107
- "comm:*",
106108
106004
  "diff",
106109
- "diff:*",
106110
106005
  "cmp",
106111
- "cmp:*",
106112
106006
  "patch:--dry-run:*",
106113
106007
  // Hashing and encoding (read-only)
106114
106008
  "md5sum",
106115
- "md5sum:*",
106116
106009
  "sha1sum",
106117
- "sha1sum:*",
106118
106010
  "sha256sum",
106119
- "sha256sum:*",
106120
106011
  "base64",
106121
106012
  "base64:-d",
106122
106013
  "od",
106123
- "od:*",
106124
106014
  "hexdump",
106125
- "hexdump:*",
106126
106015
  // Archive and compression (list/view only)
106127
106016
  "tar:-tf:*",
106128
106017
  "tar:-tzf:*",
@@ -106132,15 +106021,11 @@ var init_bashDefaults = __esm({
106132
106021
  "gunzip:-l:*",
106133
106022
  // Help and documentation
106134
106023
  "man",
106135
- "man:*",
106136
106024
  "--help",
106137
106025
  "help",
106138
106026
  "info",
106139
- "info:*",
106140
106027
  "whatis",
106141
- "whatis:*",
106142
106028
  "apropos",
106143
- "apropos:*",
106144
106029
  // Make (dry run and info)
106145
106030
  "make:-n",
106146
106031
  "make:--dry-run",
@@ -106163,36 +106048,30 @@ var init_bashDefaults = __esm({
106163
106048
  "rm:-rf",
106164
106049
  "rm:-f:/",
106165
106050
  "rm:/",
106166
- "rm:-rf:*",
106167
106051
  "rmdir",
106168
106052
  "chmod:777",
106169
106053
  "chmod:-R:777",
106170
106054
  "chown",
106171
106055
  "chgrp",
106172
106056
  "dd",
106173
- "dd:*",
106174
106057
  "shred",
106175
- "shred:*",
106176
106058
  // Dangerous find operations that can execute arbitrary commands
106177
- "find:-exec:*",
106178
- "find:*:-exec:*",
106179
- "find:-execdir:*",
106180
- "find:*:-execdir:*",
106181
- "find:-ok:*",
106182
- "find:*:-ok:*",
106183
- "find:-okdir:*",
106184
- "find:*:-okdir:*",
106059
+ "find:-exec",
106060
+ "find:*:-exec",
106061
+ "find:-execdir",
106062
+ "find:*:-execdir",
106063
+ "find:-ok",
106064
+ "find:*:-ok",
106065
+ "find:-okdir",
106066
+ "find:*:-okdir",
106185
106067
  // Powerful scripting tools that can execute arbitrary commands
106186
106068
  "awk",
106187
- "awk:*",
106188
106069
  "perl",
106189
- "perl:*",
106190
106070
  "python:-c:*",
106191
106071
  "node:-e:*",
106192
106072
  // System administration and modification
106193
- "sudo:*",
106073
+ "sudo",
106194
106074
  "su",
106195
- "su:*",
106196
106075
  "passwd",
106197
106076
  "adduser",
106198
106077
  "useradd",
@@ -106230,11 +106109,11 @@ var init_bashDefaults = __esm({
106230
106109
  "composer:install",
106231
106110
  "composer:update",
106232
106111
  "composer:remove",
106233
- "apt:*",
106234
- "apt-get:*",
106235
- "yum:*",
106236
- "dnf:*",
106237
- "zypper:*",
106112
+ "apt",
106113
+ "apt-get",
106114
+ "yum",
106115
+ "dnf",
106116
+ "zypper",
106238
106117
  "brew:install",
106239
106118
  "brew:uninstall",
106240
106119
  "brew:upgrade",
@@ -106242,11 +106121,11 @@ var init_bashDefaults = __esm({
106242
106121
  "conda:remove",
106243
106122
  "conda:update",
106244
106123
  // Service and system control
106245
- "systemctl:*",
106246
- "service:*",
106247
- "chkconfig:*",
106248
- "initctl:*",
106249
- "upstart:*",
106124
+ "systemctl",
106125
+ "service",
106126
+ "chkconfig",
106127
+ "initctl",
106128
+ "upstart",
106250
106129
  // Network operations that could be dangerous
106251
106130
  "curl:-d:*",
106252
106131
  "curl:--data:*",
@@ -106255,32 +106134,21 @@ var init_bashDefaults = __esm({
106255
106134
  "wget:-O:/",
106256
106135
  "wget:--post-data:*",
106257
106136
  "ssh",
106258
- "ssh:*",
106259
106137
  "scp",
106260
- "scp:*",
106261
106138
  "sftp",
106262
- "sftp:*",
106263
- "rsync:*",
106139
+ "rsync",
106264
106140
  "nc",
106265
- "nc:*",
106266
106141
  "netcat",
106267
- "netcat:*",
106268
106142
  "telnet",
106269
- "telnet:*",
106270
106143
  "ftp",
106271
- "ftp:*",
106272
106144
  // Process control and termination
106273
106145
  "kill",
106274
- "kill:*",
106275
106146
  "killall",
106276
- "killall:*",
106277
106147
  "pkill",
106278
- "pkill:*",
106279
- "nohup:*",
106280
- "disown:*",
106148
+ "nohup",
106149
+ "disown",
106281
106150
  // System control and shutdown
106282
106151
  "shutdown",
106283
- "shutdown:*",
106284
106152
  "reboot",
106285
106153
  "halt",
106286
106154
  "poweroff",
@@ -106288,168 +106156,92 @@ var init_bashDefaults = __esm({
106288
106156
  "telinit",
106289
106157
  // Kernel and module operations
106290
106158
  "insmod",
106291
- "insmod:*",
106292
106159
  "rmmod",
106293
- "rmmod:*",
106294
106160
  "modprobe",
106295
- "modprobe:*",
106296
106161
  "sysctl:-w:*",
106297
106162
  // Dangerous git operations
106298
106163
  "git:push",
106299
- "git:push:*",
106300
106164
  "git:force",
106301
106165
  "git:reset",
106302
- "git:reset:*",
106303
106166
  "git:clean",
106304
- "git:clean:*",
106305
106167
  "git:rm",
106306
- "git:rm:*",
106307
106168
  "git:commit",
106308
- "git:commit:*",
106309
106169
  "git:merge",
106310
- "git:merge:*",
106311
106170
  "git:rebase",
106312
- "git:rebase:*",
106313
106171
  "git:cherry-pick",
106314
- "git:cherry-pick:*",
106315
106172
  "git:stash:drop",
106316
- "git:stash:drop:*",
106317
106173
  "git:stash:pop",
106318
- "git:stash:pop:*",
106319
106174
  "git:stash:push",
106320
- "git:stash:push:*",
106321
106175
  "git:stash:clear",
106322
106176
  "git:branch:-d",
106323
- "git:branch:-d:*",
106324
106177
  "git:branch:-D",
106325
- "git:branch:-D:*",
106326
106178
  "git:branch:--delete",
106327
- "git:branch:--delete:*",
106328
106179
  "git:tag:-d",
106329
- "git:tag:-d:*",
106330
106180
  "git:tag:--delete",
106331
- "git:tag:--delete:*",
106332
106181
  "git:remote:remove",
106333
- "git:remote:remove:*",
106334
106182
  "git:remote:rm",
106335
- "git:remote:rm:*",
106336
106183
  "git:checkout:--force",
106337
- "git:checkout:--force:*",
106338
106184
  "git:checkout:-f",
106339
- "git:checkout:-f:*",
106340
106185
  "git:submodule:deinit",
106341
- "git:submodule:deinit:*",
106342
106186
  "git:notes:add",
106343
- "git:notes:add:*",
106344
106187
  "git:notes:remove",
106345
- "git:notes:remove:*",
106346
106188
  "git:worktree:add",
106347
- "git:worktree:add:*",
106348
106189
  "git:worktree:remove",
106349
- "git:worktree:remove:*",
106350
106190
  // Dangerous GitHub CLI (gh) write operations
106351
106191
  "gh:issue:create",
106352
- "gh:issue:create:*",
106353
106192
  "gh:issue:close",
106354
- "gh:issue:close:*",
106355
106193
  "gh:issue:delete",
106356
- "gh:issue:delete:*",
106357
106194
  "gh:issue:edit",
106358
- "gh:issue:edit:*",
106359
106195
  "gh:issue:reopen",
106360
- "gh:issue:reopen:*",
106361
106196
  "gh:issue:comment",
106362
- "gh:issue:comment:*",
106363
106197
  "gh:pr:create",
106364
- "gh:pr:create:*",
106365
106198
  "gh:pr:close",
106366
- "gh:pr:close:*",
106367
106199
  "gh:pr:merge",
106368
- "gh:pr:merge:*",
106369
106200
  "gh:pr:edit",
106370
- "gh:pr:edit:*",
106371
106201
  "gh:pr:reopen",
106372
- "gh:pr:reopen:*",
106373
106202
  "gh:pr:review",
106374
- "gh:pr:review:*",
106375
106203
  "gh:pr:comment",
106376
- "gh:pr:comment:*",
106377
106204
  "gh:repo:create",
106378
- "gh:repo:create:*",
106379
106205
  "gh:repo:delete",
106380
- "gh:repo:delete:*",
106381
106206
  "gh:repo:fork",
106382
- "gh:repo:fork:*",
106383
106207
  "gh:repo:rename",
106384
- "gh:repo:rename:*",
106385
106208
  "gh:repo:archive",
106386
- "gh:repo:archive:*",
106387
106209
  "gh:repo:clone",
106388
- "gh:repo:clone:*",
106389
106210
  "gh:release:create",
106390
- "gh:release:create:*",
106391
106211
  "gh:release:delete",
106392
- "gh:release:delete:*",
106393
106212
  "gh:release:edit",
106394
- "gh:release:edit:*",
106395
106213
  "gh:run:cancel",
106396
- "gh:run:cancel:*",
106397
106214
  "gh:run:rerun",
106398
- "gh:run:rerun:*",
106399
106215
  "gh:workflow:run",
106400
- "gh:workflow:run:*",
106401
106216
  "gh:workflow:enable",
106402
- "gh:workflow:enable:*",
106403
106217
  "gh:workflow:disable",
106404
- "gh:workflow:disable:*",
106405
106218
  "gh:gist:create",
106406
- "gh:gist:create:*",
106407
106219
  "gh:gist:delete",
106408
- "gh:gist:delete:*",
106409
106220
  "gh:gist:edit",
106410
- "gh:gist:edit:*",
106411
106221
  "gh:secret:set",
106412
- "gh:secret:set:*",
106413
106222
  "gh:secret:delete",
106414
- "gh:secret:delete:*",
106415
106223
  "gh:variable:set",
106416
- "gh:variable:set:*",
106417
106224
  "gh:variable:delete",
106418
- "gh:variable:delete:*",
106419
106225
  "gh:label:create",
106420
- "gh:label:create:*",
106421
106226
  "gh:label:delete",
106422
- "gh:label:delete:*",
106423
106227
  "gh:ssh-key:add",
106424
- "gh:ssh-key:add:*",
106425
106228
  "gh:ssh-key:delete",
106426
- "gh:ssh-key:delete:*",
106427
106229
  // File system mounting and partitioning
106428
106230
  "mount",
106429
- "mount:*",
106430
106231
  "umount",
106431
- "umount:*",
106432
106232
  "fdisk",
106433
- "fdisk:*",
106434
106233
  "parted",
106435
- "parted:*",
106436
106234
  "mkfs",
106437
- "mkfs:*",
106438
106235
  "fsck",
106439
- "fsck:*",
106440
106236
  // Cron and scheduling
106441
106237
  "crontab",
106442
- "crontab:*",
106443
106238
  "at",
106444
- "at:*",
106445
106239
  "batch",
106446
- "batch:*",
106447
106240
  // Compression with potential overwrite
106448
106241
  "tar:-xf:*",
106449
106242
  "unzip",
106450
- "unzip:*",
106451
- "gzip:*",
106452
- "gunzip:*",
106243
+ "gzip",
106244
+ "gunzip",
106453
106245
  // Build and compilation that might modify files
106454
106246
  "make",
106455
106247
  "make:install",
@@ -106462,11 +106254,8 @@ var init_bashDefaults = __esm({
106462
106254
  "gradle:build",
106463
106255
  // Docker operations that could modify state
106464
106256
  "docker:run",
106465
- "docker:run:*",
106466
106257
  "docker:exec",
106467
- "docker:exec:*",
106468
106258
  "docker:build",
106469
- "docker:build:*",
106470
106259
  "docker:pull",
106471
106260
  "docker:push",
106472
106261
  "docker:rm",
@@ -106480,22 +106269,15 @@ var init_bashDefaults = __esm({
106480
106269
  "mongo:--eval:*",
106481
106270
  // Text editors that could modify files
106482
106271
  "vi",
106483
- "vi:*",
106484
106272
  "vim",
106485
- "vim:*",
106486
106273
  "nano",
106487
- "nano:*",
106488
106274
  "emacs",
106489
- "emacs:*",
106490
106275
  "sed:-i:*",
106491
106276
  "perl:-i:*",
106492
106277
  // Potentially dangerous utilities
106493
106278
  "eval",
106494
- "eval:*",
106495
106279
  "exec",
106496
- "exec:*",
106497
106280
  "source",
106498
- "source:*",
106499
106281
  "bash:-c:*",
106500
106282
  "sh:-c:*",
106501
106283
  "zsh:-c:*"
@@ -106774,9 +106556,19 @@ var init_bashPermissions = __esm({
106774
106556
  BashPermissionChecker = class {
106775
106557
  /**
106776
106558
  * Create a permission checker
106559
+ *
106560
+ * Priority order (highest to lowest):
106561
+ * 1. Custom deny — always blocks (user explicitly blocked it)
106562
+ * 2. Custom allow — overrides default deny (user explicitly allowed it)
106563
+ * 3. Default deny — blocks by default
106564
+ * 4. Allow list — allows recognized safe commands
106565
+ *
106566
+ * This means `--bash-allow "git:push"` overrides the default deny for git:push
106567
+ * without requiring `--no-default-bash-deny`.
106568
+ *
106777
106569
  * @param {Object} config - Configuration options
106778
- * @param {string[]} [config.allow] - Additional allow patterns
106779
- * @param {string[]} [config.deny] - Additional deny patterns
106570
+ * @param {string[]} [config.allow] - Additional allow patterns (override default deny)
106571
+ * @param {string[]} [config.deny] - Additional deny patterns (always win)
106780
106572
  * @param {boolean} [config.disableDefaultAllow] - Disable default allow list
106781
106573
  * @param {boolean} [config.disableDefaultDeny] - Disable default deny list
106782
106574
  * @param {boolean} [config.debug] - Enable debug logging
@@ -106785,40 +106577,22 @@ var init_bashPermissions = __esm({
106785
106577
  constructor(config = {}) {
106786
106578
  this.debug = config.debug || false;
106787
106579
  this.tracer = config.tracer || null;
106788
- this.allowPatterns = [];
106789
- if (!config.disableDefaultAllow) {
106790
- this.allowPatterns.push(...DEFAULT_ALLOW_PATTERNS);
106791
- if (this.debug) {
106792
- console.log(`[BashPermissions] Added ${DEFAULT_ALLOW_PATTERNS.length} default allow patterns`);
106793
- }
106794
- }
106795
- if (config.allow && Array.isArray(config.allow)) {
106796
- this.allowPatterns.push(...config.allow);
106797
- if (this.debug) {
106798
- console.log(`[BashPermissions] Added ${config.allow.length} custom allow patterns:`, config.allow);
106799
- }
106800
- }
106801
- this.denyPatterns = [];
106802
- if (!config.disableDefaultDeny) {
106803
- this.denyPatterns.push(...DEFAULT_DENY_PATTERNS);
106804
- if (this.debug) {
106805
- console.log(`[BashPermissions] Added ${DEFAULT_DENY_PATTERNS.length} default deny patterns`);
106806
- }
106807
- }
106808
- if (config.deny && Array.isArray(config.deny)) {
106809
- this.denyPatterns.push(...config.deny);
106810
- if (this.debug) {
106811
- console.log(`[BashPermissions] Added ${config.deny.length} custom deny patterns:`, config.deny);
106812
- }
106813
- }
106580
+ this.defaultAllowPatterns = config.disableDefaultAllow ? [] : [...DEFAULT_ALLOW_PATTERNS];
106581
+ this.customAllowPatterns = config.allow && Array.isArray(config.allow) ? [...config.allow] : [];
106582
+ this.allowPatterns = [...this.defaultAllowPatterns, ...this.customAllowPatterns];
106583
+ this.defaultDenyPatterns = config.disableDefaultDeny ? [] : [...DEFAULT_DENY_PATTERNS];
106584
+ this.customDenyPatterns = config.deny && Array.isArray(config.deny) ? [...config.deny] : [];
106585
+ this.denyPatterns = [...this.defaultDenyPatterns, ...this.customDenyPatterns];
106814
106586
  if (this.debug) {
106587
+ console.log(`[BashPermissions] Default allow: ${this.defaultAllowPatterns.length}, Custom allow: ${this.customAllowPatterns.length}`);
106588
+ console.log(`[BashPermissions] Default deny: ${this.defaultDenyPatterns.length}, Custom deny: ${this.customDenyPatterns.length}`);
106815
106589
  console.log(`[BashPermissions] Total patterns - Allow: ${this.allowPatterns.length}, Deny: ${this.denyPatterns.length}`);
106816
106590
  }
106817
106591
  this.recordBashEvent("permissions.initialized", {
106818
106592
  allowPatternCount: this.allowPatterns.length,
106819
106593
  denyPatternCount: this.denyPatterns.length,
106820
- hasCustomAllowPatterns: !!(config.allow && config.allow.length > 0),
106821
- hasCustomDenyPatterns: !!(config.deny && config.deny.length > 0),
106594
+ hasCustomAllowPatterns: this.customAllowPatterns.length > 0,
106595
+ hasCustomDenyPatterns: this.customDenyPatterns.length > 0,
106822
106596
  disableDefaultAllow: !!config.disableDefaultAllow,
106823
106597
  disableDefaultDeny: !!config.disableDefaultDeny
106824
106598
  });
@@ -106888,8 +106662,11 @@ var init_bashPermissions = __esm({
106888
106662
  console.log(`[BashPermissions] Checking simple command: "${command}"`);
106889
106663
  console.log(`[BashPermissions] Parsed: ${parsed.command} with args: [${parsed.args.join(", ")}]`);
106890
106664
  }
106891
- if (matchesAnyPattern(parsed, this.denyPatterns)) {
106892
- const matchedPatterns = this.denyPatterns.filter((pattern) => matchesPattern(parsed, pattern));
106665
+ if (matchesAnyPattern(parsed, this.customDenyPatterns)) {
106666
+ const matchedPatterns = this.customDenyPatterns.filter((pattern) => matchesPattern(parsed, pattern));
106667
+ if (this.debug) {
106668
+ console.log(`[BashPermissions] DENIED - matches custom deny pattern: ${matchedPatterns[0]}`);
106669
+ }
106893
106670
  const result2 = {
106894
106671
  allowed: false,
106895
106672
  reason: `Command matches deny pattern: ${matchedPatterns[0]}`,
@@ -106902,7 +106679,31 @@ var init_bashPermissions = __esm({
106902
106679
  parsedCommand: parsed.command,
106903
106680
  reason: "matches_deny_pattern",
106904
106681
  matchedPattern: matchedPatterns[0],
106905
- isComplex: false
106682
+ isComplex: false,
106683
+ isCustomDeny: true
106684
+ });
106685
+ return result2;
106686
+ }
106687
+ const matchesCustomAllow = matchesAnyPattern(parsed, this.customAllowPatterns);
106688
+ if (!matchesCustomAllow && matchesAnyPattern(parsed, this.defaultDenyPatterns)) {
106689
+ const matchedPatterns = this.defaultDenyPatterns.filter((pattern) => matchesPattern(parsed, pattern));
106690
+ if (this.debug) {
106691
+ console.log(`[BashPermissions] DENIED - matches default deny pattern: ${matchedPatterns[0]}`);
106692
+ }
106693
+ const result2 = {
106694
+ allowed: false,
106695
+ reason: `Command matches deny pattern: ${matchedPatterns[0]}`,
106696
+ command,
106697
+ parsed,
106698
+ matchedPatterns
106699
+ };
106700
+ this.recordBashEvent("permission.denied", {
106701
+ command,
106702
+ parsedCommand: parsed.command,
106703
+ reason: "matches_deny_pattern",
106704
+ matchedPattern: matchedPatterns[0],
106705
+ isComplex: false,
106706
+ isCustomDeny: false
106906
106707
  });
106907
106708
  return result2;
106908
106709
  }
@@ -106927,15 +106728,21 @@ var init_bashPermissions = __esm({
106927
106728
  allowed: true,
106928
106729
  command,
106929
106730
  parsed,
106930
- isComplex: false
106731
+ isComplex: false,
106732
+ overriddenDeny: matchesCustomAllow && matchesAnyPattern(parsed, this.defaultDenyPatterns)
106931
106733
  };
106932
106734
  if (this.debug) {
106933
- console.log(`[BashPermissions] ALLOWED - command passed all checks`);
106735
+ if (result.overriddenDeny) {
106736
+ console.log(`[BashPermissions] ALLOWED - custom allow overrides default deny`);
106737
+ } else {
106738
+ console.log(`[BashPermissions] ALLOWED - command passed all checks`);
106739
+ }
106934
106740
  }
106935
106741
  this.recordBashEvent("permission.allowed", {
106936
106742
  command,
106937
106743
  parsedCommand: parsed.command,
106938
- isComplex: false
106744
+ isComplex: false,
106745
+ overriddenDeny: result.overriddenDeny || false
106939
106746
  });
106940
106747
  return result;
106941
106748
  }
@@ -107104,9 +106911,19 @@ var init_bashPermissions = __esm({
107104
106911
  deniedReason = parsed.error || "Component contains nested complex constructs";
107105
106912
  break;
107106
106913
  }
107107
- if (matchesAnyPattern(parsed, this.denyPatterns)) {
106914
+ if (matchesAnyPattern(parsed, this.customDenyPatterns)) {
107108
106915
  if (this.debug) {
107109
- console.log(`[BashPermissions] Component "${component}" matches deny pattern`);
106916
+ console.log(`[BashPermissions] Component "${component}" matches custom deny pattern`);
106917
+ }
106918
+ allAllowed = false;
106919
+ deniedComponent = component;
106920
+ deniedReason = "Component matches deny pattern";
106921
+ break;
106922
+ }
106923
+ const componentMatchesCustomAllow = matchesAnyPattern(parsed, this.customAllowPatterns);
106924
+ if (!componentMatchesCustomAllow && matchesAnyPattern(parsed, this.defaultDenyPatterns)) {
106925
+ if (this.debug) {
106926
+ console.log(`[BashPermissions] Component "${component}" matches default deny pattern`);
107110
106927
  }
107111
106928
  allAllowed = false;
107112
106929
  deniedComponent = component;
@@ -107186,6 +107003,10 @@ var init_bashPermissions = __esm({
107186
107003
  return {
107187
107004
  allowPatterns: this.allowPatterns.length,
107188
107005
  denyPatterns: this.denyPatterns.length,
107006
+ customAllowPatterns: this.customAllowPatterns.length,
107007
+ customDenyPatterns: this.customDenyPatterns.length,
107008
+ defaultAllowPatterns: this.defaultAllowPatterns.length,
107009
+ defaultDenyPatterns: this.defaultDenyPatterns.length,
107189
107010
  totalPatterns: this.allowPatterns.length + this.denyPatterns.length
107190
107011
  };
107191
107012
  }
@@ -107568,8 +107389,8 @@ Common reasons:
107568
107389
  2. The command is not in the allow list (not a recognized safe command)
107569
107390
 
107570
107391
  If you believe this command should be allowed, you can:
107571
- - Use the --bash-allow option to add specific patterns
107572
- - Use the --no-default-bash-deny flag to remove default restrictions (not recommended)
107392
+ - Use the --bash-allow option to add specific patterns (overrides default deny list)
107393
+ Example: --bash-allow "git:push" allows git push while keeping all other deny rules
107573
107394
 
107574
107395
  For code exploration, try these safe alternatives:
107575
107396
  - ls, cat, head, tail for file operations
@@ -110593,7 +110414,7 @@ var init_ProbeAgent = __esm({
110593
110414
  }
110594
110415
  this.clientApiProvider = "claude-code";
110595
110416
  this.provider = null;
110596
- this.model = this.clientApiModel || "claude-3-5-sonnet-20241022";
110417
+ this.model = this.clientApiModel || "claude-sonnet-4-6";
110597
110418
  this.apiType = "claude-code";
110598
110419
  } else if (codexAvailable) {
110599
110420
  if (this.debug) {
@@ -110602,7 +110423,7 @@ var init_ProbeAgent = __esm({
110602
110423
  }
110603
110424
  this.clientApiProvider = "codex";
110604
110425
  this.provider = null;
110605
- this.model = this.clientApiModel || "gpt-4o";
110426
+ this.model = this.clientApiModel || "gpt-5.2";
110606
110427
  this.apiType = "codex";
110607
110428
  } else {
110608
110429
  throw new Error("No API key provided and neither claude nor codex command found. Please either:\n1. Set an API key: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, or AWS credentials\n2. Install claude command from https://docs.claude.com/en/docs/claude-code\n3. Install codex command from https://openai.com/codex");
@@ -110840,7 +110661,7 @@ var init_ProbeAgent = __esm({
110840
110661
  }
110841
110662
  if (this.clientApiProvider === "claude-code" || process.env.USE_CLAUDE_CODE === "true") {
110842
110663
  this.provider = null;
110843
- this.model = modelName || "claude-3-5-sonnet-20241022";
110664
+ this.model = modelName || "claude-sonnet-4-6";
110844
110665
  this.apiType = "claude-code";
110845
110666
  if (this.debug) {
110846
110667
  console.log("[DEBUG] Claude Code engine selected - will use built-in access if available");
@@ -111207,7 +111028,7 @@ var init_ProbeAgent = __esm({
111207
111028
  apiKey,
111208
111029
  ...apiUrl && { baseURL: apiUrl }
111209
111030
  });
111210
- this.model = modelName || "claude-sonnet-4-5-20250929";
111031
+ this.model = modelName || "claude-sonnet-4-6";
111211
111032
  this.apiType = "anthropic";
111212
111033
  if (this.debug) {
111213
111034
  console.log(`Using Anthropic API with model: ${this.model}${apiUrl ? ` (URL: ${apiUrl})` : ""}`);
@@ -111222,7 +111043,7 @@ var init_ProbeAgent = __esm({
111222
111043
  apiKey,
111223
111044
  ...apiUrl && { baseURL: apiUrl }
111224
111045
  });
111225
- this.model = modelName || "gpt-5-thinking";
111046
+ this.model = modelName || "gpt-5.2";
111226
111047
  this.apiType = "openai";
111227
111048
  if (this.debug) {
111228
111049
  console.log(`Using OpenAI API with model: ${this.model}${apiUrl ? ` (URL: ${apiUrl})` : ""}`);
@@ -111326,7 +111147,7 @@ var init_ProbeAgent = __esm({
111326
111147
  config.baseURL = baseURL;
111327
111148
  }
111328
111149
  this.provider = createAmazonBedrock(config);
111329
- this.model = modelName || "anthropic.claude-sonnet-4-20250514-v1:0";
111150
+ this.model = modelName || "anthropic.claude-sonnet-4-6";
111330
111151
  this.apiType = "bedrock";
111331
111152
  if (this.debug) {
111332
111153
  const authMethod = apiKey ? "API Key" : "AWS Credentials";
@@ -111385,7 +111206,7 @@ var init_ProbeAgent = __esm({
111385
111206
  allowedTools: this.allowedTools,
111386
111207
  // Pass tool filtering configuration
111387
111208
  model: this.model
111388
- // Pass model name (e.g., gpt-4o, o3, etc.)
111209
+ // Pass model name (e.g., gpt-5.2, o3, etc.)
111389
111210
  });
111390
111211
  if (this.debug) {
111391
111212
  console.log("[DEBUG] Using Codex CLI engine with Probe tools");
@@ -112640,9 +112461,7 @@ You are working with a workspace. Available paths: ${workspaceDesc}
112640
112461
  let maxResponseTokens = this.maxResponseTokens;
112641
112462
  if (!maxResponseTokens) {
112642
112463
  maxResponseTokens = 4e3;
112643
- if (this.model && this.model.includes("opus") || this.model && this.model.includes("sonnet") || this.model && this.model.startsWith("gpt-4-")) {
112644
- maxResponseTokens = 8192;
112645
- } else if (this.model && this.model.startsWith("gpt-4o")) {
112464
+ if (this.model && this.model.includes("opus") || this.model && this.model.includes("sonnet") || this.model && this.model.startsWith("gpt-4") || this.model && this.model.startsWith("gpt-5")) {
112646
112465
  maxResponseTokens = 8192;
112647
112466
  } else if (this.model && this.model.startsWith("gemini")) {
112648
112467
  maxResponseTokens = 32e3;