linkque-cli-v2 1.6.11-alpha.0 → 1.6.11

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 (17) hide show
  1. package/linkquejs.js +116 -9
  2. package/package.json +1 -1
  3. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-NE7CUP5E.js → chunk-3J4AB676.js} +1 -1
  4. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-H7TMASQH.js → chunk-DPHKD4SK.js} +633 -558
  5. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-FA5CNADA.js → chunk-EHNI5TX3.js} +25 -1
  6. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-DNTEEBEH.js → chunk-SICWMO5Y.js} +1 -0
  7. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-bsd-JGCLGHFY.js → getMachineId-bsd-NYGVHXGN.js} +1 -1
  8. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-darwin-COHLFNXH.js → getMachineId-darwin-OPTJOAYC.js} +1 -1
  9. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-linux-XV3Z5FQG.js → getMachineId-linux-5SQRYTUJ.js} +1 -1
  10. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-unsupported-FCRKLIZL.js → getMachineId-unsupported-OJE7WPEH.js} +1 -1
  11. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-win-A4WRNVV6.js → getMachineId-win-SLTTCNXU.js} +1 -1
  12. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-ZYAKAOUL.js → mistral-conversations-XUDTCRDY.js} +1 -1
  13. package/vendor/linkque-agent-appwrite-integrate/dist/esm/{otel-BHGIWGIT.js → otel-3OUODIOB.js} +1 -1
  14. package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +25 -18
  15. package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +3 -3
  16. package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +3 -3
  17. package/worker.js +740 -666
package/linkquejs.js CHANGED
@@ -11827,6 +11827,110 @@ var require_dist = __commonJS({
11827
11827
  }
11828
11828
  });
11829
11829
 
11830
+ // ../../node_modules/content-type/index.js
11831
+ var require_content_type = __commonJS({
11832
+ "../../node_modules/content-type/index.js"(exports2) {
11833
+ "use strict";
11834
+ var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
11835
+ var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
11836
+ var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
11837
+ var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
11838
+ var QUOTE_REGEXP = /([\\"])/g;
11839
+ var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
11840
+ exports2.format = format;
11841
+ exports2.parse = parse3;
11842
+ function format(obj) {
11843
+ if (!obj || typeof obj !== "object") {
11844
+ throw new TypeError("argument obj is required");
11845
+ }
11846
+ var parameters = obj.parameters;
11847
+ var type = obj.type;
11848
+ if (!type || !TYPE_REGEXP.test(type)) {
11849
+ throw new TypeError("invalid type");
11850
+ }
11851
+ var string4 = type;
11852
+ if (parameters && typeof parameters === "object") {
11853
+ var param;
11854
+ var params = Object.keys(parameters).sort();
11855
+ for (var i = 0; i < params.length; i++) {
11856
+ param = params[i];
11857
+ if (!TOKEN_REGEXP.test(param)) {
11858
+ throw new TypeError("invalid parameter name");
11859
+ }
11860
+ string4 += "; " + param + "=" + qstring(parameters[param]);
11861
+ }
11862
+ }
11863
+ return string4;
11864
+ }
11865
+ function parse3(string4) {
11866
+ if (!string4) {
11867
+ throw new TypeError("argument string is required");
11868
+ }
11869
+ var header = typeof string4 === "object" ? getcontenttype(string4) : string4;
11870
+ if (typeof header !== "string") {
11871
+ throw new TypeError("argument string is required to be a string");
11872
+ }
11873
+ var index = header.indexOf(";");
11874
+ var type = index !== -1 ? header.slice(0, index).trim() : header.trim();
11875
+ if (!TYPE_REGEXP.test(type)) {
11876
+ throw new TypeError("invalid media type");
11877
+ }
11878
+ var obj = new ContentType(type.toLowerCase());
11879
+ if (index !== -1) {
11880
+ var key;
11881
+ var match;
11882
+ var value;
11883
+ PARAM_REGEXP.lastIndex = index;
11884
+ while (match = PARAM_REGEXP.exec(header)) {
11885
+ if (match.index !== index) {
11886
+ throw new TypeError("invalid parameter format");
11887
+ }
11888
+ index += match[0].length;
11889
+ key = match[1].toLowerCase();
11890
+ value = match[2];
11891
+ if (value.charCodeAt(0) === 34) {
11892
+ value = value.slice(1, -1);
11893
+ if (value.indexOf("\\") !== -1) {
11894
+ value = value.replace(QESC_REGEXP, "$1");
11895
+ }
11896
+ }
11897
+ obj.parameters[key] = value;
11898
+ }
11899
+ if (index !== header.length) {
11900
+ throw new TypeError("invalid parameter format");
11901
+ }
11902
+ }
11903
+ return obj;
11904
+ }
11905
+ function getcontenttype(obj) {
11906
+ var header;
11907
+ if (typeof obj.getHeader === "function") {
11908
+ header = obj.getHeader("content-type");
11909
+ } else if (typeof obj.headers === "object") {
11910
+ header = obj.headers && obj.headers["content-type"];
11911
+ }
11912
+ if (typeof header !== "string") {
11913
+ throw new TypeError("content-type header is missing from object");
11914
+ }
11915
+ return header;
11916
+ }
11917
+ function qstring(val) {
11918
+ var str = String(val);
11919
+ if (TOKEN_REGEXP.test(str)) {
11920
+ return str;
11921
+ }
11922
+ if (str.length > 0 && !TEXT_REGEXP.test(str)) {
11923
+ throw new TypeError("invalid parameter value");
11924
+ }
11925
+ return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"';
11926
+ }
11927
+ function ContentType(type) {
11928
+ this.parameters = /* @__PURE__ */ Object.create(null);
11929
+ this.type = type;
11930
+ }
11931
+ }
11932
+ });
11933
+
11830
11934
  // src/errors/catalog.ts
11831
11935
  var ERROR_CATALOG = {
11832
11936
  // CLI usage
@@ -17591,11 +17695,11 @@ function validateClientAction(body, path25, issues) {
17591
17695
  issues.push(issue2(`${path25}.context`, "INVALID_CLIENT_ACTION_CONTEXT", "ui.surface.open requires context.surfaceId"));
17592
17696
  return;
17593
17697
  }
17594
- if (body.name === "ui.page.open") {
17698
+ if (body.name === "ui.page.open" || body.name === "ui.miniprogram.embed") {
17595
17699
  if (!isPlainRecord(body.context) || Object.keys(body.context).length !== 1 || typeof body.context.url !== "string" && !isStrictBinding(body.context.url))
17596
- issues.push(issue2(`${path25}.context`, "INVALID_CLIENT_ACTION_CONTEXT", "ui.page.open requires one literal or bound URL"));
17700
+ issues.push(issue2(`${path25}.context`, "INVALID_CLIENT_ACTION_CONTEXT", `${body.name} requires one literal or bound URL`));
17597
17701
  else if (typeof body.context.url === "string" && !isSafePageUrl(body.context.url))
17598
- issues.push(issue2(`${path25}.context.url`, "INVALID_PAGE_URL", "ui.page.open URL must use https or the approved Alipay scheme"));
17702
+ issues.push(issue2(`${path25}.context.url`, "INVALID_PAGE_URL", `${body.name} URL must use https or the approved Alipay scheme`));
17599
17703
  return;
17600
17704
  }
17601
17705
  issues.push(issue2(`${path25}.name`, "UNSUPPORTED_CLIENT_ACTION", `unsupported client action ${String(body.name)}`));
@@ -19551,7 +19655,7 @@ function getA2UICardAuthoringDiagnostics(bundle, partial2) {
19551
19655
  const component = findComponent(bundle, group.surfaceId, group.componentId);
19552
19656
  const action = isPlainRecord(component?.action) ? component.action : void 0;
19553
19657
  const client = action && isPlainRecord(action.client) ? action.client : void 0;
19554
- if (client?.name === "ui.page.open") {
19658
+ if (client?.name === "ui.page.open" || client?.name === "ui.miniprogram.embed") {
19555
19659
  const context = isPlainRecord(client.context) ? client.context : void 0;
19556
19660
  if (typeof context?.url === "string" && !isSafePageUrl2(context.url)) {
19557
19661
  diagnostics.push({
@@ -19691,16 +19795,16 @@ function actionTargets(component, occurrenceId) {
19691
19795
  ];
19692
19796
  }
19693
19797
  const client = isPlainRecord(action.client) ? action.client : void 0;
19694
- if (client?.name === "ui.page.open") {
19798
+ if (client?.name === "ui.page.open" || client?.name === "ui.miniprogram.embed") {
19695
19799
  const context = isPlainRecord(client.context) ? client.context : void 0;
19696
19800
  const url2 = context?.url;
19697
19801
  return [
19698
19802
  {
19699
- kind: "page-open",
19803
+ kind: client.name === "ui.miniprogram.embed" ? "miniprogram-embed" : "page-open",
19700
19804
  targetId: createA2UICardAuthoringTargetId(occurrenceId, "action"),
19701
19805
  occurrenceId,
19702
19806
  propertyPath: "action",
19703
- label: "\u6253\u5F00\u9875\u9762",
19807
+ label: client.name === "ui.miniprogram.embed" ? "\u5C0F\u7A0B\u5E8F\u534A\u5C4F\u6253\u5F00" : "\u6253\u5F00\u9875\u9762",
19704
19808
  ...typeof url2 === "string" ? { url: url2 } : {},
19705
19809
  dynamic: isPlainRecord(url2) && typeof url2.path === "string"
19706
19810
  }
@@ -27219,6 +27323,9 @@ var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
27219
27323
  // ../linkque-agent-runtime/dist/esm/impl/mcp/alipay/remoteSignatureSigner.js
27220
27324
  var DEFAULT_SIGN_ENDPOINT = RUNTIME_CONFIG_DEFAULTS.LINKQUEGW_MCP_SIGN_ENDPOINT;
27221
27325
 
27326
+ // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
27327
+ var import_content_type = __toESM(require_content_type(), 1);
27328
+
27222
27329
  // ../../node_modules/pkce-challenge/dist/index.node.js
27223
27330
  var crypto2;
27224
27331
  crypto2 = globalThis.crypto?.webcrypto ?? // Node.js [18-16] REPL
@@ -40562,8 +40669,8 @@ function resolveEndpoint(value) {
40562
40669
  }
40563
40670
  }
40564
40671
  async function readResponse(response) {
40565
- const contentType = response.headers.get("content-type")?.split(";")[0].trim();
40566
- if (contentType !== "application/json" || !response.body) {
40672
+ const contentType2 = response.headers.get("content-type")?.split(";")[0].trim();
40673
+ if (contentType2 !== "application/json" || !response.body) {
40567
40674
  await response.body?.cancel();
40568
40675
  throw responseError();
40569
40676
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkque-cli-v2",
3
- "version": "1.6.11-alpha.0",
3
+ "version": "1.6.11",
4
4
  "description": "Public Linkque CLI bundle for sandbox debugging",
5
5
  "bin": {
6
6
  "linkquejs": "linkquejs.js"
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EModelProvider
3
- } from "./chunk-H7TMASQH.js";
3
+ } from "./chunk-DPHKD4SK.js";
4
4
 
5
5
  // ../linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js
6
6
  var baked;