@pensar/apex 2.3.0 → 2.4.0

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 (70) hide show
  1. package/build/{agent-9xna7jhw.js → agent-5ejt5vpz.js} +11 -11
  2. package/build/agent-mvpgvgks.js +19 -0
  3. package/build/agent-nhs1w5w0.js +29 -0
  4. package/build/{apps-43pqbz7r.js → apps-17wvz1d7.js} +20 -20
  5. package/build/{auth-c1z670rx.js → auth-z3h9859n.js} +38 -20
  6. package/build/authentication-3s97cpk4.js +19 -0
  7. package/build/blackboxAgent-gw0a1ca4.js +19 -0
  8. package/build/{blackboxPentest-tgc2t3y6.js → blackboxPentest-44333zss.js} +17 -17
  9. package/build/{cli-vckbhnyk.js → cli-0n4r54hq.js} +2 -2
  10. package/build/{cli-bnkgdywr.js → cli-2cbwdk78.js} +1 -1
  11. package/build/{cli-j0n189ee.js → cli-32z0017y.js} +2 -2
  12. package/build/{cli-zm8tfpv7.js → cli-5k33webc.js} +25 -9
  13. package/build/{cli-f7hanqbw.js → cli-72cvcqhg.js} +2 -2
  14. package/build/{cli-eveg9djy.js → cli-9rhzhgx2.js} +3 -2
  15. package/build/{cli-72b18z0n.js → cli-b1adytsy.js} +3 -3
  16. package/build/{cli-8rxa073f.js → cli-bc05qbss.js} +8 -6
  17. package/build/{cli-q24twygk.js → cli-dm0fc0bm.js} +1 -1
  18. package/build/{cli-yz80qkzn.js → cli-ee3axgts.js} +7 -1
  19. package/build/{cli-bv2807tj.js → cli-gq40s5b3.js} +3 -3
  20. package/build/{cli-gpnb45ck.js → cli-j54qa6tm.js} +7 -7
  21. package/build/{cli-wszshs5e.js → cli-k71t434r.js} +4 -4
  22. package/build/{cli-baqhqbe5.js → cli-k8kc47pq.js} +3 -3
  23. package/build/{cli-50906d27.js → cli-mavved45.js} +91 -29
  24. package/build/{cli-jyp2c6th.js → cli-qqt4gj1w.js} +2 -2
  25. package/build/{cli-n2m2yy5b.js → cli-repbyhkk.js} +1250 -614
  26. package/build/{cli-3k1x5rn3.js → cli-swpbx60z.js} +1045 -1045
  27. package/build/{cli-zx8gk8xv.js → cli-tkc598ey.js} +296 -54
  28. package/build/{cli-7tw4xfnw.js → cli-tznv8pf1.js} +1 -1
  29. package/build/{cli-barsn8br.js → cli-vnynf0js.js} +2 -2
  30. package/build/{cli-f71s6kcw.js → cli-vq52kp7j.js} +81 -215
  31. package/build/{cli-zk1ch6qf.js → cli-xshasbwe.js} +34 -9
  32. package/build/cli.js +52 -46
  33. package/build/{config-jzqjz606.js → config-f1mj4nhd.js} +5 -5
  34. package/build/{doctor-q3qws68e.js → doctor-ekneewa3.js} +10 -9
  35. package/build/{fastStrike-ebz1ph9a.js → fastStrike-8zka43xs.js} +36 -16
  36. package/build/{fixes-86yebsj0.js → fixes-b89s5haw.js} +19 -19
  37. package/build/{index-8db1d2q3.js → index-4ad3sdwk.js} +18 -18
  38. package/build/{index-97vx1a24.js → index-6d22pyxt.js} +1148 -1086
  39. package/build/{index-h2hj2hj9.js → index-cbwn03kz.js} +16 -16
  40. package/build/index-ghwf5z3v.js +12 -0
  41. package/build/{index-468j74f3.js → index-hqjdg6fg.js} +113 -97
  42. package/build/{index-gq9h8j5j.js → index-mtq7kmxz.js} +132 -132
  43. package/build/{index-tke6896d.js → index-psqjpw5m.js} +10 -10
  44. package/build/{index-mr2cseg4.js → index-rbzhk712.js} +19 -19
  45. package/build/{index-e8c8zcrf.js → index-sf16jm0m.js} +31 -26
  46. package/build/{index-32hn8rrw.js → index-y5w6n3tb.js} +3 -3
  47. package/build/{issues-kh4wg8c5.js → issues-xx5bs4md.js} +19 -19
  48. package/build/{logs-bj28xmbf.js → logs-qtxe51w2.js} +19 -19
  49. package/build/{main-3d7dfdvs.js → main-mmjp338j.js} +9 -9
  50. package/build/{multipart-parser-6zd16497.js → multipart-parser-g2xxkezz.js} +2 -2
  51. package/build/{offesecAgent-8ky7gccp.js → offesecAgent-b9e2xm6v.js} +11 -11
  52. package/build/{parse-7djk9jyf.js → parse-rtccymzn.js} +3 -3
  53. package/build/pentest-xtc1sjdw.js +29 -0
  54. package/build/{pentests-62d6zw6p.js → pentests-6ks3szc4.js} +19 -19
  55. package/build/{targetedPentest-me4jnr3z.js → targetedPentest-s1ptvq8e.js} +14 -14
  56. package/build/{targets-e5k1mrky.js → targets-sxygyj87.js} +19 -19
  57. package/build/threatModel-xsm6fwk5.js +27 -0
  58. package/build/{token-rdcbn380.js → token-3bbp59y6.js} +3 -3
  59. package/build/{token-util-sxb85ahn.js → token-util-6xjme11b.js} +2 -2
  60. package/build/{uninstall-jt1bca2p.js → uninstall-tvsh81v8.js} +2 -2
  61. package/build/{upload-krd8bnex.js → upload-7wdyyqmr.js} +11 -11
  62. package/build/{utils-skmqhyfg.js → utils-7fwdkqk6.js} +17 -13
  63. package/package.json +1 -1
  64. package/build/agent-71z4e7jg.js +0 -19
  65. package/build/agent-ga5fecfs.js +0 -27
  66. package/build/authentication-hgs7ym0m.js +0 -19
  67. package/build/blackboxAgent-gem3mxa9.js +0 -19
  68. package/build/index-ag14v3sg.js +0 -12
  69. package/build/pentest-rs0181nf.js +0 -29
  70. package/build/threatModel-k4f3zgqd.js +0 -27
@@ -4,7 +4,7 @@ import {
4
4
  init_auth,
5
5
  init_constants,
6
6
  signGatewayRequest
7
- } from "./cli-vckbhnyk.js";
7
+ } from "./cli-0n4r54hq.js";
8
8
  import {
9
9
  AISDKError,
10
10
  APICallError,
@@ -83,15 +83,15 @@ import {
83
83
  withoutTrailingSlash,
84
84
  zodSchema,
85
85
  zod_default
86
- } from "./cli-3k1x5rn3.js";
86
+ } from "./cli-swpbx60z.js";
87
87
  import {
88
88
  config,
89
89
  init_config
90
- } from "./cli-f7hanqbw.js";
90
+ } from "./cli-72cvcqhg.js";
91
91
  import {
92
92
  getCurrentVersion,
93
93
  init_installation
94
- } from "./cli-barsn8br.js";
94
+ } from "./cli-vnynf0js.js";
95
95
  import {
96
96
  __callDispose,
97
97
  __commonJS,
@@ -99,7 +99,7 @@ import {
99
99
  __require,
100
100
  __toESM,
101
101
  __using
102
- } from "./cli-8rxa073f.js";
102
+ } from "./cli-bc05qbss.js";
103
103
 
104
104
  // node_modules/ai/dist/index.mjs
105
105
  function asArray(value) {
@@ -8382,6 +8382,121 @@ var init_bedrock = __esm(() => {
8382
8382
  ];
8383
8383
  });
8384
8384
 
8385
+ // src/core/ai/models/concentrate.ts
8386
+ var CONCENTRATE_MODELS;
8387
+ var init_concentrate = __esm(() => {
8388
+ CONCENTRATE_MODELS = [
8389
+ {
8390
+ id: "concentrate:claude-opus-4-6",
8391
+ name: "Claude Opus 4.6",
8392
+ provider: "concentrate",
8393
+ contextLength: 200000
8394
+ },
8395
+ {
8396
+ id: "concentrate:claude-sonnet-4-6",
8397
+ name: "Claude Sonnet 4.6",
8398
+ provider: "concentrate",
8399
+ contextLength: 200000
8400
+ },
8401
+ {
8402
+ id: "concentrate:claude-sonnet-4-5",
8403
+ name: "Claude Sonnet 4.5",
8404
+ provider: "concentrate",
8405
+ contextLength: 200000
8406
+ },
8407
+ {
8408
+ id: "concentrate:claude-haiku-4-5",
8409
+ name: "Claude Haiku 4.5",
8410
+ provider: "concentrate",
8411
+ contextLength: 200000
8412
+ },
8413
+ {
8414
+ id: "concentrate:gpt-5.6-sol",
8415
+ name: "GPT 5.6 Sol",
8416
+ provider: "concentrate",
8417
+ contextLength: 1050000
8418
+ },
8419
+ {
8420
+ id: "concentrate:gpt-5.6-terra",
8421
+ name: "GPT 5.6 Terra",
8422
+ provider: "concentrate",
8423
+ contextLength: 1050000
8424
+ },
8425
+ {
8426
+ id: "concentrate:gpt-5.6-luna",
8427
+ name: "GPT 5.6 Luna",
8428
+ provider: "concentrate",
8429
+ contextLength: 1050000
8430
+ },
8431
+ {
8432
+ id: "concentrate:gpt-5.5",
8433
+ name: "GPT 5.5",
8434
+ provider: "concentrate",
8435
+ contextLength: 1050000
8436
+ },
8437
+ {
8438
+ id: "concentrate:gpt-5.4",
8439
+ name: "GPT 5.4",
8440
+ provider: "concentrate",
8441
+ contextLength: 1050000
8442
+ },
8443
+ {
8444
+ id: "concentrate:gpt-5.3-codex",
8445
+ name: "GPT 5.3 Codex",
8446
+ provider: "concentrate",
8447
+ contextLength: 400000
8448
+ },
8449
+ {
8450
+ id: "concentrate:gemini-3.6-flash",
8451
+ name: "Gemini 3.6 Flash",
8452
+ provider: "concentrate",
8453
+ contextLength: 1048576
8454
+ },
8455
+ {
8456
+ id: "concentrate:gemini-3.1-pro-preview",
8457
+ name: "Gemini 3.1 Pro Preview",
8458
+ provider: "concentrate",
8459
+ contextLength: 1e6
8460
+ },
8461
+ {
8462
+ id: "concentrate:gemini-2.5-pro",
8463
+ name: "Gemini 2.5 Pro",
8464
+ provider: "concentrate",
8465
+ contextLength: 1e6
8466
+ },
8467
+ {
8468
+ id: "concentrate:deepseek-v3-2",
8469
+ name: "DeepSeek V3.2",
8470
+ provider: "concentrate",
8471
+ contextLength: 163840
8472
+ },
8473
+ {
8474
+ id: "concentrate:mistral-large-3",
8475
+ name: "Mistral Large 3",
8476
+ provider: "concentrate",
8477
+ contextLength: 256000
8478
+ },
8479
+ {
8480
+ id: "concentrate:kimi-k2-thinking",
8481
+ name: "Kimi K2 Thinking",
8482
+ provider: "concentrate",
8483
+ contextLength: 262144
8484
+ },
8485
+ {
8486
+ id: "concentrate:minimax-m2-7",
8487
+ name: "MiniMax M2.7",
8488
+ provider: "concentrate",
8489
+ contextLength: 204800
8490
+ },
8491
+ {
8492
+ id: "concentrate:glm-5",
8493
+ name: "GLM-5",
8494
+ provider: "concentrate",
8495
+ contextLength: 202800
8496
+ }
8497
+ ];
8498
+ });
8499
+
8385
8500
  // src/core/ai/models/google.ts
8386
8501
  var GOOGLE_MODELS;
8387
8502
  var init_google = __esm(() => {
@@ -9314,6 +9429,7 @@ var AVAILABLE_MODELS;
9314
9429
  var init_models = __esm(() => {
9315
9430
  init_anthropic();
9316
9431
  init_bedrock();
9432
+ init_concentrate();
9317
9433
  init_google();
9318
9434
  init_inception();
9319
9435
  init_mantle2();
@@ -9327,6 +9443,7 @@ var init_models = __esm(() => {
9327
9443
  ...BEDROCK_MODELS,
9328
9444
  ...MANTLE_MODELS,
9329
9445
  ...OPENROUTER_MODELS,
9446
+ ...CONCENTRATE_MODELS,
9330
9447
  ...PENSAR_MODELS,
9331
9448
  ...INCEPTION_MODELS
9332
9449
  ];
@@ -11278,7 +11395,7 @@ var init_internal = __esm(() => {
11278
11395
  });
11279
11396
 
11280
11397
  // node_modules/tslib/tslib.js
11281
- var require_tslib = __commonJS((exports, module) => {
11398
+ var require_tslib = __commonJS(function(exports, module) {
11282
11399
  var __extends;
11283
11400
  var __assign;
11284
11401
  var __rest;
@@ -11883,7 +12000,7 @@ var require_tslib = __commonJS((exports, module) => {
11883
12000
  });
11884
12001
 
11885
12002
  // node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js
11886
- var require_dist_cjs = __commonJS((exports, module) => {
12003
+ var require_dist_cjs = __commonJS(function(exports, module) {
11887
12004
  var __defProp2 = Object.defineProperty;
11888
12005
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11889
12006
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -11911,7 +12028,7 @@ var require_dist_cjs = __commonJS((exports, module) => {
11911
12028
  });
11912
12029
 
11913
12030
  // node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js
11914
- var require_dist_cjs2 = __commonJS((exports, module) => {
12031
+ var require_dist_cjs2 = __commonJS(function(exports, module) {
11915
12032
  var __defProp2 = Object.defineProperty;
11916
12033
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11917
12034
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -11953,7 +12070,7 @@ var require_dist_cjs2 = __commonJS((exports, module) => {
11953
12070
  });
11954
12071
 
11955
12072
  // node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js
11956
- var require_dist_cjs3 = __commonJS((exports, module) => {
12073
+ var require_dist_cjs3 = __commonJS(function(exports, module) {
11957
12074
  var __defProp2 = Object.defineProperty;
11958
12075
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11959
12076
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -12005,7 +12122,7 @@ var require_dist_cjs3 = __commonJS((exports, module) => {
12005
12122
  });
12006
12123
 
12007
12124
  // node_modules/@aws-crypto/util/build/main/convertToBuffer.js
12008
- var require_convertToBuffer = __commonJS((exports) => {
12125
+ var require_convertToBuffer = __commonJS(function(exports) {
12009
12126
  Object.defineProperty(exports, "__esModule", { value: true });
12010
12127
  exports.convertToBuffer = undefined;
12011
12128
  var util_utf8_1 = require_dist_cjs3();
@@ -12027,7 +12144,7 @@ var require_convertToBuffer = __commonJS((exports) => {
12027
12144
  });
12028
12145
 
12029
12146
  // node_modules/@aws-crypto/util/build/main/isEmptyData.js
12030
- var require_isEmptyData = __commonJS((exports) => {
12147
+ var require_isEmptyData = __commonJS(function(exports) {
12031
12148
  Object.defineProperty(exports, "__esModule", { value: true });
12032
12149
  exports.isEmptyData = undefined;
12033
12150
  function isEmptyData(data) {
@@ -12040,7 +12157,7 @@ var require_isEmptyData = __commonJS((exports) => {
12040
12157
  });
12041
12158
 
12042
12159
  // node_modules/@aws-crypto/util/build/main/numToUint8.js
12043
- var require_numToUint8 = __commonJS((exports) => {
12160
+ var require_numToUint8 = __commonJS(function(exports) {
12044
12161
  Object.defineProperty(exports, "__esModule", { value: true });
12045
12162
  exports.numToUint8 = undefined;
12046
12163
  function numToUint8(num) {
@@ -12055,7 +12172,7 @@ var require_numToUint8 = __commonJS((exports) => {
12055
12172
  });
12056
12173
 
12057
12174
  // node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js
12058
- var require_uint32ArrayFrom = __commonJS((exports) => {
12175
+ var require_uint32ArrayFrom = __commonJS(function(exports) {
12059
12176
  Object.defineProperty(exports, "__esModule", { value: true });
12060
12177
  exports.uint32ArrayFrom = undefined;
12061
12178
  function uint32ArrayFrom(a_lookUpTable) {
@@ -12074,7 +12191,7 @@ var require_uint32ArrayFrom = __commonJS((exports) => {
12074
12191
  });
12075
12192
 
12076
12193
  // node_modules/@aws-crypto/util/build/main/index.js
12077
- var require_main = __commonJS((exports) => {
12194
+ var require_main = __commonJS(function(exports) {
12078
12195
  Object.defineProperty(exports, "__esModule", { value: true });
12079
12196
  exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = undefined;
12080
12197
  var convertToBuffer_1 = require_convertToBuffer();
@@ -12096,7 +12213,7 @@ var require_main = __commonJS((exports) => {
12096
12213
  });
12097
12214
 
12098
12215
  // node_modules/@aws-crypto/crc32/build/main/aws_crc32.js
12099
- var require_aws_crc32 = __commonJS((exports) => {
12216
+ var require_aws_crc32 = __commonJS(function(exports) {
12100
12217
  Object.defineProperty(exports, "__esModule", { value: true });
12101
12218
  exports.AwsCrc32 = undefined;
12102
12219
  var tslib_1 = require_tslib();
@@ -12127,7 +12244,7 @@ var require_aws_crc32 = __commonJS((exports) => {
12127
12244
  });
12128
12245
 
12129
12246
  // node_modules/@aws-crypto/crc32/build/main/index.js
12130
- var require_main2 = __commonJS((exports) => {
12247
+ var require_main2 = __commonJS(function(exports) {
12131
12248
  Object.defineProperty(exports, "__esModule", { value: true });
12132
12249
  exports.AwsCrc32 = exports.Crc32 = exports.crc32 = undefined;
12133
12250
  var tslib_1 = require_tslib();
@@ -12432,7 +12549,7 @@ var require_main2 = __commonJS((exports) => {
12432
12549
  });
12433
12550
 
12434
12551
  // node_modules/@smithy/util-hex-encoding/dist-cjs/index.js
12435
- var require_dist_cjs4 = __commonJS((exports) => {
12552
+ var require_dist_cjs4 = __commonJS(function(exports) {
12436
12553
  var SHORT_TO_HEX = {};
12437
12554
  var HEX_TO_SHORT = {};
12438
12555
  for (let i = 0;i < 256; i++) {
@@ -12761,24 +12878,89 @@ class EventStreamCodec {
12761
12878
  return this.headerMarshaller.format(rawHeaders);
12762
12879
  }
12763
12880
  }
12764
- var crc32, utilHexEncoding, BOOLEAN_TAG = "boolean", BYTE_TAG = "byte", SHORT_TAG = "short", INT_TAG = "integer", LONG_TAG = "long", BINARY_TAG = "binary", STRING_TAG = "string", TIMESTAMP_TAG = "timestamp", UUID_TAG = "uuid", UUID_PATTERN, PRELUDE_MEMBER_LENGTH = 4, PRELUDE_LENGTH, CHECKSUM_LENGTH = 4, MINIMUM_MESSAGE_LENGTH, $EventStreamCodec;
12881
+ var crc32, utilHexEncoding, BOOLEAN_TAG = "boolean", BYTE_TAG = "byte", SHORT_TAG = "short", INT_TAG = "integer", LONG_TAG = "long", BINARY_TAG = "binary", STRING_TAG = "string", TIMESTAMP_TAG = "timestamp", UUID_TAG = "uuid", UUID_PATTERN, PRELUDE_MEMBER_LENGTH = 4, PRELUDE_LENGTH, CHECKSUM_LENGTH = 4, MINIMUM_MESSAGE_LENGTH, MessageDecoderStream, MessageEncoderStream, SmithyMessageDecoderStream, SmithyMessageEncoderStream, $EventStreamCodec;
12765
12882
  var init_dist_cjs = __esm(() => {
12766
12883
  crc32 = require_main2();
12767
12884
  utilHexEncoding = require_dist_cjs4();
12768
12885
  UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
12769
12886
  PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
12770
12887
  MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;
12888
+ MessageDecoderStream = class MessageDecoderStream {
12889
+ options;
12890
+ constructor(options) {
12891
+ this.options = options;
12892
+ }
12893
+ [Symbol.asyncIterator]() {
12894
+ return this.asyncIterator();
12895
+ }
12896
+ async* asyncIterator() {
12897
+ for await (const bytes of this.options.inputStream) {
12898
+ const decoded = this.options.decoder.decode(bytes);
12899
+ yield decoded;
12900
+ }
12901
+ }
12902
+ };
12903
+ MessageEncoderStream = class MessageEncoderStream {
12904
+ options;
12905
+ constructor(options) {
12906
+ this.options = options;
12907
+ }
12908
+ [Symbol.asyncIterator]() {
12909
+ return this.asyncIterator();
12910
+ }
12911
+ async* asyncIterator() {
12912
+ for await (const msg of this.options.messageStream) {
12913
+ const encoded = this.options.encoder.encode(msg);
12914
+ yield encoded;
12915
+ }
12916
+ if (this.options.includeEndFrame) {
12917
+ yield new Uint8Array(0);
12918
+ }
12919
+ }
12920
+ };
12921
+ SmithyMessageDecoderStream = class SmithyMessageDecoderStream {
12922
+ options;
12923
+ constructor(options) {
12924
+ this.options = options;
12925
+ }
12926
+ [Symbol.asyncIterator]() {
12927
+ return this.asyncIterator();
12928
+ }
12929
+ async* asyncIterator() {
12930
+ for await (const message of this.options.messageStream) {
12931
+ const deserialized = await this.options.deserializer(message);
12932
+ if (deserialized === undefined)
12933
+ continue;
12934
+ yield deserialized;
12935
+ }
12936
+ }
12937
+ };
12938
+ SmithyMessageEncoderStream = class SmithyMessageEncoderStream {
12939
+ options;
12940
+ constructor(options) {
12941
+ this.options = options;
12942
+ }
12943
+ [Symbol.asyncIterator]() {
12944
+ return this.asyncIterator();
12945
+ }
12946
+ async* asyncIterator() {
12947
+ for await (const chunk of this.options.inputStream) {
12948
+ const payloadBuf = this.options.serializer(chunk);
12949
+ yield payloadBuf;
12950
+ }
12951
+ }
12952
+ };
12771
12953
  $EventStreamCodec = EventStreamCodec;
12772
12954
  });
12773
12955
 
12774
12956
  // node_modules/@smithy/is-array-buffer/dist-cjs/index.js
12775
- var require_dist_cjs5 = __commonJS((exports) => {
12957
+ var require_dist_cjs5 = __commonJS(function(exports) {
12776
12958
  var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
12777
12959
  exports.isArrayBuffer = isArrayBuffer;
12778
12960
  });
12779
12961
 
12780
12962
  // node_modules/@smithy/util-buffer-from/dist-cjs/index.js
12781
- var require_dist_cjs6 = __commonJS((exports) => {
12963
+ var require_dist_cjs6 = __commonJS(function(exports) {
12782
12964
  var isArrayBuffer = require_dist_cjs5();
12783
12965
  var buffer = __require("buffer");
12784
12966
  var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
@@ -45218,37 +45400,56 @@ var init_observability = __esm(() => {
45218
45400
  });
45219
45401
 
45220
45402
  // src/core/ai/caching.ts
45221
- function withCachedSystemPrompt(system, messages) {
45403
+ function bedrockSupportsCachePoint(modelId) {
45404
+ const base = modelId.replace(/^(?:[a-z]{2,6}\.)?anthropic\./, "");
45405
+ return base.startsWith("claude-") && !BEDROCK_UNCACHEABLE_CLAUDE.test(base);
45406
+ }
45407
+ function cacheBreakpointFor(model) {
45408
+ const { provider } = getModelInfo(model);
45409
+ switch (provider) {
45410
+ case "anthropic":
45411
+ case "pensar":
45412
+ return ANTHROPIC_CACHE_CONTROL;
45413
+ case "bedrock":
45414
+ return bedrockSupportsCachePoint(model) ? BEDROCK_CACHE_POINT : undefined;
45415
+ default:
45416
+ return;
45417
+ }
45418
+ }
45419
+ function withCachedSystemPrompt(system, messages, breakpoint) {
45222
45420
  return [
45223
45421
  {
45224
45422
  role: "system",
45225
45423
  content: system,
45226
- providerOptions: ANTHROPIC_CACHE_CONTROL
45424
+ ...breakpoint ? { providerOptions: breakpoint } : {}
45227
45425
  },
45228
45426
  ...messages
45229
45427
  ];
45230
45428
  }
45231
- function withCachedLastMessage(messages) {
45232
- if (messages.length === 0)
45429
+ function withCachedLastMessage(messages, breakpoint) {
45430
+ if (messages.length === 0 || !breakpoint)
45233
45431
  return messages;
45234
45432
  return messages.map((msg, i) => {
45235
45433
  if (i === messages.length - 1) {
45236
- return {
45237
- ...msg,
45238
- providerOptions: {
45239
- ...msg.providerOptions,
45240
- ...ANTHROPIC_CACHE_CONTROL
45241
- }
45242
- };
45434
+ const merged = { ...msg.providerOptions };
45435
+ for (const [provider, options] of Object.entries(breakpoint)) {
45436
+ merged[provider] = { ...merged[provider], ...options };
45437
+ }
45438
+ return { ...msg, providerOptions: merged };
45243
45439
  }
45244
45440
  return msg;
45245
45441
  });
45246
45442
  }
45247
- var ANTHROPIC_CACHE_CONTROL;
45443
+ var ANTHROPIC_CACHE_CONTROL, BEDROCK_CACHE_POINT, BEDROCK_UNCACHEABLE_CLAUDE;
45248
45444
  var init_caching = __esm(() => {
45445
+ init_models();
45249
45446
  ANTHROPIC_CACHE_CONTROL = {
45250
45447
  anthropic: { cacheControl: { type: "ephemeral" } }
45251
45448
  };
45449
+ BEDROCK_CACHE_POINT = {
45450
+ bedrock: { cachePoint: { type: "default" } }
45451
+ };
45452
+ BEDROCK_UNCACHEABLE_CLAUDE = /^claude-(?:v2|instant|3[-.])/;
45252
45453
  });
45253
45454
 
45254
45455
  // src/core/ai/contextManagement.ts
@@ -45953,7 +46154,7 @@ function streamResponse(opts) {
45953
46154
  }
45954
46155
  };
45955
46156
  const providerModel = getProviderModel(model, authConfig);
45956
- const useAnthropicCaching = isAnthropicProvider(model);
46157
+ const cacheBreakpoint = cacheBreakpointFor(model);
45957
46158
  const systemWithToolPolicy = applySequentialToolCallPolicy(system, tools, model);
45958
46159
  let fittedMessages = messages;
45959
46160
  let proactiveFitFailed = false;
@@ -45980,11 +46181,11 @@ function streamResponse(opts) {
45980
46181
  }
45981
46182
  let effectiveSystem = systemWithToolPolicy;
45982
46183
  let effectiveMessages = fittedMessages;
45983
- if (useAnthropicCaching && systemWithToolPolicy) {
46184
+ if (cacheBreakpoint && systemWithToolPolicy) {
45984
46185
  const baseMessages = fittedMessages ?? [
45985
46186
  { role: "user", content: prompt }
45986
46187
  ];
45987
- effectiveMessages = withCachedSystemPrompt(systemWithToolPolicy, baseMessages);
46188
+ effectiveMessages = withCachedSystemPrompt(systemWithToolPolicy, baseMessages, cacheBreakpoint);
45988
46189
  effectiveSystem = undefined;
45989
46190
  }
45990
46191
  const providerOptions = buildReasoningProviderOptions(model, {
@@ -46014,8 +46215,10 @@ function streamResponse(opts) {
46014
46215
  maxOutputTokens: getMaxOutputTokens(model),
46015
46216
  prepareStep: (opts2) => {
46016
46217
  messagesContainer.current = opts2.messages;
46017
- if (useAnthropicCaching) {
46018
- return { messages: withCachedLastMessage(opts2.messages) };
46218
+ if (cacheBreakpoint) {
46219
+ return {
46220
+ messages: withCachedLastMessage(opts2.messages, cacheBreakpoint)
46221
+ };
46019
46222
  }
46020
46223
  return;
46021
46224
  },
@@ -46468,6 +46671,11 @@ function toReference(stored) {
46468
46671
  if (stored.tokens?.customHeaders) {
46469
46672
  ref.customHeaderKeys = Object.keys(stored.tokens.customHeaders);
46470
46673
  }
46674
+ if (stored.additionalFields) {
46675
+ const keys = Object.keys(stored.additionalFields);
46676
+ if (keys.length > 0)
46677
+ ref.additionalFieldKeys = keys;
46678
+ }
46471
46679
  const ctx = stored.metadata?.context;
46472
46680
  if (typeof ctx === "string" && ctx)
46473
46681
  ref.context = ctx;
@@ -46478,7 +46686,7 @@ class CredentialManager {
46478
46686
  store = new Map;
46479
46687
  findDuplicate(candidate) {
46480
46688
  for (const [id, existing] of this.store) {
46481
- if (existing.username === candidate.username && existing.password === candidate.password && existing.apiKey === candidate.apiKey && existing.loginUrl === candidate.loginUrl && existing.tokens?.bearerToken === candidate.tokens?.bearerToken && existing.tokens?.cookies === candidate.tokens?.cookies && existing.tokens?.sessionToken === candidate.tokens?.sessionToken && JSON.stringify(existing.tokens?.customHeaders) === JSON.stringify(candidate.tokens?.customHeaders)) {
46689
+ if (existing.username === candidate.username && existing.password === candidate.password && existing.apiKey === candidate.apiKey && existing.loginUrl === candidate.loginUrl && existing.tokens?.bearerToken === candidate.tokens?.bearerToken && existing.tokens?.cookies === candidate.tokens?.cookies && existing.tokens?.sessionToken === candidate.tokens?.sessionToken && JSON.stringify(existing.tokens?.customHeaders) === JSON.stringify(candidate.tokens?.customHeaders) && JSON.stringify(existing.additionalFields) === JSON.stringify(candidate.additionalFields)) {
46482
46690
  return id;
46483
46691
  }
46484
46692
  }
@@ -46576,6 +46784,9 @@ class CredentialManager {
46576
46784
  if (ref.customHeaderKeys?.length) {
46577
46785
  parts.push(` Header keys: ${ref.customHeaderKeys.join(", ")}`);
46578
46786
  }
46787
+ if (ref.additionalFieldKeys?.length) {
46788
+ parts.push(` Additional secret fields: ${ref.additionalFieldKeys.join(", ")}`);
46789
+ }
46579
46790
  if (ref.context)
46580
46791
  parts.push(` Context: ${ref.context}`);
46581
46792
  return parts.join(`
@@ -46584,6 +46795,9 @@ class CredentialManager {
46584
46795
  return `<available_credentials>
46585
46796
  The following credentials are available. To use a credential, pass its ID to the appropriate tool.
46586
46797
  Do NOT ask the user for passwords or secrets — they are resolved automatically from the credential ID.
46798
+ "Additional secret fields" are operator-supplied named secrets: pass the name as "credentialField"
46799
+ to browser_fill, or read the matching environment variable in execute_command. Their values are
46800
+ never shown to you and are redacted from command output.
46587
46801
 
46588
46802
  ${lines.join(`
46589
46803
 
@@ -47127,7 +47341,7 @@ async function create2(input) {
47127
47341
  if (normalizedConfig?.headers !== undefined) {
47128
47342
  snapshotHeaders = { ...normalizedConfig.headers };
47129
47343
  } else {
47130
- const { config: appConfig } = await import("./index-ag14v3sg.js");
47344
+ const { config: appConfig } = await import("./index-ghwf5z3v.js");
47131
47345
  const cfg = await appConfig.get();
47132
47346
  snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
47133
47347
  }
@@ -47238,17 +47452,21 @@ function hasOperatorState(session) {
47238
47452
  const statePath = path2.join(session.rootPath, "messages.json");
47239
47453
  return existsSync(statePath);
47240
47454
  }
47241
- function getResumeMessages(messages, limit = MAX_RESUME_MESSAGES) {
47455
+ function getResumeMessages(messages, limit = RESUME_MESSAGE_WINDOW) {
47242
47456
  if (messages.length <= limit)
47243
47457
  return messages;
47244
- let cutIndex = messages.length - limit;
47458
+ const roughCutIndex = messages.length - limit;
47459
+ let cutIndex = roughCutIndex;
47245
47460
  while (cutIndex < messages.length) {
47246
47461
  if (messages[cutIndex].role === "user")
47247
47462
  break;
47248
47463
  cutIndex++;
47249
47464
  }
47250
47465
  if (cutIndex >= messages.length) {
47251
- cutIndex = messages.length - limit;
47466
+ cutIndex = roughCutIndex;
47467
+ while (cutIndex > 0 && messages[cutIndex].role !== "user") {
47468
+ cutIndex--;
47469
+ }
47252
47470
  }
47253
47471
  return messages.slice(cutIndex);
47254
47472
  }
@@ -47348,7 +47566,7 @@ var DEFAULT_OUTCOME_GUIDANCE, EXFIL_OUTCOME_GUIDANCE, DEFAULT_HEADER_RECORD, Aut
47348
47566
  } catch (e) {
47349
47567
  console.error(e);
47350
47568
  }
47351
- }, RemoveMsgInput, MAX_RESUME_MESSAGES = 200, sessions;
47569
+ }, RemoveMsgInput, RESUME_MESSAGE_WINDOW = 200, sessions;
47352
47570
  var init_session = __esm(() => {
47353
47571
  init_zod();
47354
47572
  init_name();
@@ -47459,6 +47677,7 @@ var init_session = __esm(() => {
47459
47677
  authenticationInstructions: zod_default.string().optional(),
47460
47678
  requestsPerSecond: zod_default.number().optional(),
47461
47679
  allowDestructiveActions: zod_default.boolean().optional(),
47680
+ allowRateLimitTesting: zod_default.boolean().optional(),
47462
47681
  operatorSettings: OperatorSettingsObject.optional(),
47463
47682
  toolsetState: ToolsetStateSchema.optional(),
47464
47683
  enumerateSubdomains: zod_default.boolean().optional(),
@@ -47855,6 +48074,24 @@ function hasCacheControl(part) {
47855
48074
  const opts = part.providerOptions;
47856
48075
  return !!opts?.anthropic?.cacheControl;
47857
48076
  }
48077
+ function applyCacheControl(message) {
48078
+ if (typeof message.content === "string") {
48079
+ if (message.content === "")
48080
+ return;
48081
+ message.content = [
48082
+ {
48083
+ type: "text",
48084
+ text: message.content,
48085
+ cache_control: EPHEMERAL_CACHE_CONTROL
48086
+ }
48087
+ ];
48088
+ return;
48089
+ }
48090
+ const last = message.content[message.content.length - 1];
48091
+ if (!last || last.type === "thinking")
48092
+ return;
48093
+ last.cache_control = EPHEMERAL_CACHE_CONTROL;
48094
+ }
47858
48095
  function convertToAnthropicFormat(modelId, options) {
47859
48096
  const messages = [];
47860
48097
  let systemPrompt;
@@ -47865,7 +48102,6 @@ function convertToAnthropicFormat(modelId, options) {
47865
48102
  systemPrompt = part.content;
47866
48103
  systemHasCacheControl = hasCacheControl(part);
47867
48104
  } else if (part.role === "user") {
47868
- const partHasCache = hasCacheControl(part);
47869
48105
  const text2 = part.content.map((c) => {
47870
48106
  if (c.type === "text")
47871
48107
  return c.text;
@@ -47873,16 +48109,7 @@ function convertToAnthropicFormat(modelId, options) {
47873
48109
  return "[file]";
47874
48110
  return "";
47875
48111
  }).join("");
47876
- if (partHasCache) {
47877
- messages.push({
47878
- role: "user",
47879
- content: [
47880
- { type: "text", text: text2, cache_control: EPHEMERAL_CACHE_CONTROL }
47881
- ]
47882
- });
47883
- } else {
47884
- messages.push({ role: "user", content: text2 });
47885
- }
48112
+ messages.push({ role: "user", content: text2 });
47886
48113
  } else if (part.role === "assistant") {
47887
48114
  const assistantContent = part.content;
47888
48115
  const hasStructuredParts = assistantContent.some((c) => c.type === "tool-call" || c.type === "reasoning");
@@ -47935,6 +48162,10 @@ function convertToAnthropicFormat(modelId, options) {
47935
48162
  });
47936
48163
  messages.push({ role: "user", content: toolResults });
47937
48164
  }
48165
+ const pushed = messages[messages.length - 1];
48166
+ if (part.role !== "system" && pushed && hasCacheControl(part)) {
48167
+ applyCacheControl(pushed);
48168
+ }
47938
48169
  }
47939
48170
  }
47940
48171
  if (options.responseFormat?.type === "json") {
@@ -48834,6 +49065,7 @@ function buildAuthConfig(cfg) {
48834
49065
  openAiAPIKey: cfg.openAiAPIKey ?? undefined,
48835
49066
  googleAPIKey: cfg.googleAPIKey ?? undefined,
48836
49067
  openRouterAPIKey: cfg.openRouterAPIKey ?? undefined,
49068
+ concentrateAPIKey: cfg.concentrateAPIKey ?? undefined,
48837
49069
  inceptionAPIKey: cfg.inceptionAPIKey ?? undefined,
48838
49070
  pensarAPIKey: cfg.pensarAPIKey ?? undefined,
48839
49071
  accessToken: cfg.accessToken ?? undefined,
@@ -48851,6 +49083,7 @@ function getProviderModel(model, authConfig) {
48851
49083
  const anthropicAPIKey = authConfig?.anthropicAPIKey || process.env.ANTHROPIC_API_KEY;
48852
49084
  const googleAPIKey = authConfig?.googleAPIKey || process.env.GOOGLE_GENERATIVE_AI_API_KEY;
48853
49085
  const openRouterAPIKey = authConfig?.openRouterAPIKey || process.env.OPENROUTER_API_KEY;
49086
+ const concentrateAPIKey = authConfig?.concentrateAPIKey || process.env.CONCENTRATE_API_KEY;
48854
49087
  const bedrockApiKey = authConfig?.bedrock?.apiKey || process.env.BEDROCK_API_KEY;
48855
49088
  const bedrockAccessKeyId = authConfig?.bedrock?.accessKeyId || process.env.AWS_ACCESS_KEY_ID;
48856
49089
  const bedrockSecretAccessKey = authConfig?.bedrock?.secretAccessKey || process.env.AWS_SECRET_ACCESS_KEY;
@@ -48874,6 +49107,15 @@ function getProviderModel(model, authConfig) {
48874
49107
  providerModel = openrouter2(model);
48875
49108
  break;
48876
49109
  }
49110
+ case "concentrate": {
49111
+ const concentrate = createOpenAICompatible({
49112
+ name: "concentrate",
49113
+ apiKey: concentrateAPIKey,
49114
+ baseURL: "https://api.concentrate.ai/v1"
49115
+ });
49116
+ providerModel = concentrate(model.replace(/^concentrate:/, ""));
49117
+ break;
49118
+ }
48877
49119
  case "inception": {
48878
49120
  const inception = createOpenAICompatible({
48879
49121
  name: "inception",
@@ -3,7 +3,7 @@ import {
3
3
  init_lazyLogger,
4
4
  init_structured,
5
5
  scopedLogger
6
- } from "./cli-zx8gk8xv.js";
6
+ } from "./cli-tkc598ey.js";
7
7
 
8
8
  // src/core/agents/specialized/utils.ts
9
9
  import { execSync } from "node:child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __esm
3
- } from "./cli-8rxa073f.js";
3
+ } from "./cli-bc05qbss.js";
4
4
 
5
5
  // package.json
6
6
  var package_default;
@@ -120,7 +120,7 @@ var init_package = __esm(() => {
120
120
  tsc: "tsc --noEmit"
121
121
  },
122
122
  type: "module",
123
- version: "2.3.0"
123
+ version: "2.4.0"
124
124
  };
125
125
  });
126
126