linkque-cli-v2 1.2.1 → 1.2.3
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/linkquejs.js +714 -351
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-NRTXRI33.js → chunk-F3IESVDW.js} +27 -6
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-IXJFWSVE.js → chunk-RRQKGME5.js} +342 -69
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +348 -21
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +1 -1
- package/worker.js +326 -71
package/package.json
CHANGED
package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-NRTXRI33.js → chunk-F3IESVDW.js}
RENAMED
|
@@ -11930,7 +11930,10 @@ function createPaymentActionStore(databases, databaseId, tableId) {
|
|
|
11930
11930
|
const { invocationId, actionContext, ...fields } = invocation;
|
|
11931
11931
|
try {
|
|
11932
11932
|
const document = await databases.createDocument(databaseId, tableId, invocationId, { ...fields, actionContext: JSON.stringify(actionContext) }, []);
|
|
11933
|
-
return {
|
|
11933
|
+
return {
|
|
11934
|
+
kind: "created",
|
|
11935
|
+
invocation: readInvocation2(document) ?? invocation
|
|
11936
|
+
};
|
|
11934
11937
|
} catch (error) {
|
|
11935
11938
|
if (!isConflict2(error))
|
|
11936
11939
|
throw error;
|
|
@@ -11997,7 +12000,9 @@ function readInvocation2(value) {
|
|
|
11997
12000
|
status: row.status,
|
|
11998
12001
|
...typeof row.tradeNO === "string" ? { tradeNO: row.tradeNO } : {},
|
|
11999
12002
|
...typeof row.callback === "string" && parseJsonObject(row.callback) ? { callback: parseJsonObject(row.callback) } : {},
|
|
12000
|
-
...typeof row.verification === "string" && parseVerification(row.verification) ? {
|
|
12003
|
+
...typeof row.verification === "string" && parseVerification(row.verification) ? {
|
|
12004
|
+
verification: parseVerification(row.verification)
|
|
12005
|
+
} : {},
|
|
12001
12006
|
createdAt: row.createdAt,
|
|
12002
12007
|
expiresAt: row.expiresAt
|
|
12003
12008
|
};
|
|
@@ -12073,6 +12078,7 @@ var API_KEY_HEADER = "x-appwrite-key";
|
|
|
12073
12078
|
var TRIGGER_HEADER = "x-appwrite-trigger";
|
|
12074
12079
|
var ENV_SELECTOR_HEADER = "x-linkque-env";
|
|
12075
12080
|
var TRACE_ID_HEADER = "x-trace-id";
|
|
12081
|
+
var TEMPORARY_FRONTEND_APP_ID_HEADER = "x-linkque-alipay-app-id";
|
|
12076
12082
|
function readEnvSelector(headers) {
|
|
12077
12083
|
if (!headers)
|
|
12078
12084
|
return "PROD";
|
|
@@ -12105,6 +12111,23 @@ function readTraceId(headers) {
|
|
|
12105
12111
|
}
|
|
12106
12112
|
return void 0;
|
|
12107
12113
|
}
|
|
12114
|
+
function readTemporaryFrontendAppId(headers) {
|
|
12115
|
+
if (!headers)
|
|
12116
|
+
return void 0;
|
|
12117
|
+
const direct = normalizeTemporaryFrontendAppId(headers[TEMPORARY_FRONTEND_APP_ID_HEADER]);
|
|
12118
|
+
if (direct)
|
|
12119
|
+
return direct;
|
|
12120
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
12121
|
+
if (key.toLowerCase() === TEMPORARY_FRONTEND_APP_ID_HEADER) {
|
|
12122
|
+
return normalizeTemporaryFrontendAppId(value);
|
|
12123
|
+
}
|
|
12124
|
+
}
|
|
12125
|
+
return void 0;
|
|
12126
|
+
}
|
|
12127
|
+
function normalizeTemporaryFrontendAppId(value) {
|
|
12128
|
+
const normalized = headValue(value);
|
|
12129
|
+
return normalized && !/[\r\n]/u.test(normalized) ? normalized : void 0;
|
|
12130
|
+
}
|
|
12108
12131
|
function readAuthenticatedUserId(headers) {
|
|
12109
12132
|
if (!headers)
|
|
12110
12133
|
return void 0;
|
|
@@ -12203,10 +12226,7 @@ async function clientCapability(ctx) {
|
|
|
12203
12226
|
const paymentDeleted = await createPaymentActionStore(handle.databases, process.env.A2UI_ACTION_DATABASE_ID, process.env.A2UI_ACTION_TABLE_ID).cleanup((/* @__PURE__ */ new Date()).toISOString());
|
|
12204
12227
|
result = {
|
|
12205
12228
|
status: 200,
|
|
12206
|
-
body: {
|
|
12207
|
-
...result.body,
|
|
12208
|
-
paymentDeleted
|
|
12209
|
-
}
|
|
12229
|
+
body: { ...result.body, paymentDeleted }
|
|
12210
12230
|
};
|
|
12211
12231
|
}
|
|
12212
12232
|
} catch (error) {
|
|
@@ -12259,6 +12279,7 @@ export {
|
|
|
12259
12279
|
jsonError,
|
|
12260
12280
|
readEnvSelector,
|
|
12261
12281
|
readTraceId,
|
|
12282
|
+
readTemporaryFrontendAppId,
|
|
12262
12283
|
readAuthenticatedUserId,
|
|
12263
12284
|
readAppwriteApiKey,
|
|
12264
12285
|
Query,
|