linkque-cli-v2 1.6.19 → 1.6.21

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EModelProvider
3
- } from "./chunk-SGKJHCSV.js";
3
+ } from "./chunk-6G25V7QM.js";
4
4
 
5
5
  // ../linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js
6
6
  var baked;
@@ -23,7 +23,7 @@ import {
23
23
  RuntimeConfigProvider,
24
24
  getRunEmbeddedQuery,
25
25
  isDebugLoggingEnabled
26
- } from "./chunk-SGKJHCSV.js";
26
+ } from "./chunk-6G25V7QM.js";
27
27
  import {
28
28
  __commonJS,
29
29
  __require,
@@ -7378,6 +7378,9 @@ var AUTHORIZATION_CHECKPOINT_COLUMNS = [
7378
7378
  }
7379
7379
  ];
7380
7380
 
7381
+ // ../linkque-agent-appwrite-integrate/dist/esm/runtime/sessionMemorySchemaDefinition.js
7382
+ var SESSION_MEMORY_TABLE = "linkque_session_memories";
7383
+
7381
7384
  // ../linkque-agent-appwrite-integrate/dist/esm/runtime/externalActionSchema.js
7382
7385
  var definitions = [
7383
7386
  ["state", 16],
@@ -7420,6 +7423,8 @@ var APPBASE_RUNTIME_CONFIG_DEFAULTS = Object.freeze({
7420
7423
  LINKQUE_EMBEDDED_QUERY_ENABLED: "false",
7421
7424
  RUN_DATABASE_ID: "linkque",
7422
7425
  RUN_TABLE_ID: "linkque_conversation_runs",
7426
+ SESSION_MEMORY_DATABASE_ID: "linkque",
7427
+ SESSION_MEMORY_TABLE_ID: "linkque_session_memories",
7423
7428
  SESSION_DATABASE_ID: "linkque",
7424
7429
  SESSION_TABLE_ID: "linkque_sessions",
7425
7430
  SESSION_LEASE_DATABASE_ID: "linkque",
@@ -18827,11 +18832,13 @@ function nonEmpty(value) {
18827
18832
 
18828
18833
  export {
18829
18834
  AUTHORIZATION_CHECKPOINT_TABLE,
18835
+ SESSION_MEMORY_TABLE,
18830
18836
  EXTERNAL_ACTION_COLUMNS,
18831
18837
  LINKQUE_ENDPOINT_PRE,
18832
18838
  APPBASE_RUNTIME_CONFIG_DEFAULTS,
18833
18839
  AppbaseRuntimeConfigProvider,
18834
18840
  Query,
18841
+ Databases,
18835
18842
  Memory,
18836
18843
  TablesDB,
18837
18844
  MemoryScope,
@@ -222,50 +222,64 @@ var require_common = __commonJS({
222
222
  createDebug.namespaces = namespaces;
223
223
  createDebug.names = [];
224
224
  createDebug.skips = [];
225
- let i;
226
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
227
- const len = split.length;
228
- for (i = 0; i < len; i++) {
229
- if (!split[i]) {
230
- continue;
225
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
226
+ for (const ns of split) {
227
+ if (ns[0] === "-") {
228
+ createDebug.skips.push(ns.slice(1));
229
+ } else {
230
+ createDebug.names.push(ns);
231
231
  }
232
- namespaces = split[i].replace(/\*/g, ".*?");
233
- if (namespaces[0] === "-") {
234
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
232
+ }
233
+ }
234
+ function matchesTemplate(search, template) {
235
+ let searchIndex = 0;
236
+ let templateIndex = 0;
237
+ let starIndex = -1;
238
+ let matchIndex = 0;
239
+ while (searchIndex < search.length) {
240
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
241
+ if (template[templateIndex] === "*") {
242
+ starIndex = templateIndex;
243
+ matchIndex = searchIndex;
244
+ templateIndex++;
245
+ } else {
246
+ searchIndex++;
247
+ templateIndex++;
248
+ }
249
+ } else if (starIndex !== -1) {
250
+ templateIndex = starIndex + 1;
251
+ matchIndex++;
252
+ searchIndex = matchIndex;
235
253
  } else {
236
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
254
+ return false;
237
255
  }
238
256
  }
257
+ while (templateIndex < template.length && template[templateIndex] === "*") {
258
+ templateIndex++;
259
+ }
260
+ return templateIndex === template.length;
239
261
  }
240
262
  function disable() {
241
263
  const namespaces = [
242
- ...createDebug.names.map(toNamespace),
243
- ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
264
+ ...createDebug.names,
265
+ ...createDebug.skips.map((namespace) => "-" + namespace)
244
266
  ].join(",");
245
267
  createDebug.enable("");
246
268
  return namespaces;
247
269
  }
248
270
  function enabled(name) {
249
- if (name[name.length - 1] === "*") {
250
- return true;
251
- }
252
- let i;
253
- let len;
254
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
255
- if (createDebug.skips[i].test(name)) {
271
+ for (const skip of createDebug.skips) {
272
+ if (matchesTemplate(name, skip)) {
256
273
  return false;
257
274
  }
258
275
  }
259
- for (i = 0, len = createDebug.names.length; i < len; i++) {
260
- if (createDebug.names[i].test(name)) {
276
+ for (const ns of createDebug.names) {
277
+ if (matchesTemplate(name, ns)) {
261
278
  return true;
262
279
  }
263
280
  }
264
281
  return false;
265
282
  }
266
- function toNamespace(regexp) {
267
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
268
- }
269
283
  function coerce(val) {
270
284
  if (val instanceof Error) {
271
285
  return val.stack || val.message;
@@ -384,10 +398,11 @@ var require_browser = __commonJS({
384
398
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
385
399
  return false;
386
400
  }
401
+ let m;
387
402
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
388
403
  typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
389
404
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
390
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
405
+ typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
391
406
  typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
392
407
  }
393
408
  function formatArgs(args) {
@@ -425,7 +440,7 @@ var require_browser = __commonJS({
425
440
  function load() {
426
441
  let r;
427
442
  try {
428
- r = exports.storage.getItem("debug");
443
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
429
444
  } catch (error) {
430
445
  }
431
446
  if (!r && typeof process !== "undefined" && "env" in process) {
@@ -451,15 +466,16 @@ var require_browser = __commonJS({
451
466
  }
452
467
  });
453
468
 
454
- // ../../node_modules/has-flag/index.js
469
+ // ../../node_modules/supports-color/node_modules/has-flag/index.js
455
470
  var require_has_flag = __commonJS({
456
- "../../node_modules/has-flag/index.js"(exports, module) {
471
+ "../../node_modules/supports-color/node_modules/has-flag/index.js"(exports, module) {
457
472
  "use strict";
458
- module.exports = (flag, argv = process.argv) => {
459
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
460
- const position = argv.indexOf(prefix + flag);
461
- const terminatorPosition = argv.indexOf("--");
462
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
473
+ module.exports = function(flag, argv) {
474
+ argv = argv || process.argv;
475
+ var terminatorPos = argv.indexOf("--");
476
+ var prefix = /^--/.test(flag) ? "" : "--";
477
+ var pos = argv.indexOf(prefix + flag);
478
+ return pos !== -1 && (terminatorPos !== -1 ? pos < terminatorPos : true);
463
479
  };
464
480
  }
465
481
  });
@@ -468,26 +484,8 @@ var require_has_flag = __commonJS({
468
484
  var require_supports_color = __commonJS({
469
485
  "../../node_modules/supports-color/index.js"(exports, module) {
470
486
  "use strict";
471
- var os = __require("os");
472
- var tty = __require("tty");
473
487
  var hasFlag = require_has_flag();
474
- var { env } = process;
475
- var forceColor;
476
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
477
- forceColor = 0;
478
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
479
- forceColor = 1;
480
- }
481
- if ("FORCE_COLOR" in env) {
482
- if (env.FORCE_COLOR === "true") {
483
- forceColor = 1;
484
- } else if (env.FORCE_COLOR === "false") {
485
- forceColor = 0;
486
- } else {
487
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
488
- }
489
- }
490
- function translateLevel(level) {
488
+ var support = function(level) {
491
489
  if (level === 0) {
492
490
  return false;
493
491
  }
@@ -497,9 +495,9 @@ var require_supports_color = __commonJS({
497
495
  has256: level >= 2,
498
496
  has16m: level >= 3
499
497
  };
500
- }
501
- function supportsColor(haveStream, streamIsTTY) {
502
- if (forceColor === 0) {
498
+ };
499
+ var supportLevel = function() {
500
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
503
501
  return 0;
504
502
  }
505
503
  if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
@@ -508,61 +506,42 @@ var require_supports_color = __commonJS({
508
506
  if (hasFlag("color=256")) {
509
507
  return 2;
510
508
  }
511
- if (haveStream && !streamIsTTY && forceColor === void 0) {
512
- return 0;
509
+ if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
510
+ return 1;
513
511
  }
514
- const min = forceColor || 0;
515
- if (env.TERM === "dumb") {
516
- return min;
512
+ if (process.stdout && !process.stdout.isTTY) {
513
+ return 0;
517
514
  }
518
515
  if (process.platform === "win32") {
519
- const osRelease = os.release().split(".");
520
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
521
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
522
- }
523
516
  return 1;
524
517
  }
525
- if ("CI" in env) {
526
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
518
+ if ("CI" in process.env) {
519
+ if ("TRAVIS" in process.env || process.env.CI === "Travis") {
527
520
  return 1;
528
521
  }
529
- return min;
530
- }
531
- if ("TEAMCITY_VERSION" in env) {
532
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
533
- }
534
- if (env.COLORTERM === "truecolor") {
535
- return 3;
522
+ return 0;
536
523
  }
537
- if ("TERM_PROGRAM" in env) {
538
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
539
- switch (env.TERM_PROGRAM) {
540
- case "iTerm.app":
541
- return version >= 3 ? 3 : 2;
542
- case "Apple_Terminal":
543
- return 2;
544
- }
524
+ if ("TEAMCITY_VERSION" in process.env) {
525
+ return process.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/) === null ? 0 : 1;
545
526
  }
546
- if (/-256(color)?$/i.test(env.TERM)) {
527
+ if (/^(screen|xterm)-256(?:color)?/.test(process.env.TERM)) {
547
528
  return 2;
548
529
  }
549
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
530
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
550
531
  return 1;
551
532
  }
552
- if ("COLORTERM" in env) {
533
+ if ("COLORTERM" in process.env) {
553
534
  return 1;
554
535
  }
555
- return min;
556
- }
557
- function getSupportLevel(stream) {
558
- const level = supportsColor(stream, stream && stream.isTTY);
559
- return translateLevel(level);
536
+ if (process.env.TERM === "dumb") {
537
+ return 0;
538
+ }
539
+ return 0;
540
+ }();
541
+ if (supportLevel === 0 && "FORCE_COLOR" in process.env) {
542
+ supportLevel = 1;
560
543
  }
561
- module.exports = {
562
- supportsColor: getSupportLevel,
563
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
564
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
565
- };
544
+ module.exports = process && support(supportLevel);
566
545
  }
567
546
  });
568
547
 
@@ -708,7 +687,7 @@ var require_node = __commonJS({
708
687
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
709
688
  }
710
689
  function log(...args) {
711
- return process.stderr.write(util.format(...args) + "\n");
690
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
712
691
  }
713
692
  function save(namespaces) {
714
693
  if (namespaces) {
@@ -6,7 +6,7 @@ import {
6
6
  mapStopReason,
7
7
  mapToolChoice,
8
8
  retainThoughtSignature
9
- } from "./chunk-KRE5FADB.js";
9
+ } from "./chunk-2QJITP7G.js";
10
10
  import {
11
11
  formatProviderError,
12
12
  normalizeProviderError
@@ -8,7 +8,7 @@ import {
8
8
  mapStopReason,
9
9
  mapToolChoice,
10
10
  retainThoughtSignature
11
- } from "./chunk-KRE5FADB.js";
11
+ } from "./chunk-2QJITP7G.js";
12
12
  import {
13
13
  formatProviderError,
14
14
  normalizeProviderError