@xiashe/skill 0.1.18 → 0.1.19
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/bin/xiashe-skill.mjs +10 -2
- package/package.json +1 -1
package/bin/xiashe-skill.mjs
CHANGED
|
@@ -1071,7 +1071,9 @@ async function writeManifest(root, flags) {
|
|
|
1071
1071
|
creatorProfile,
|
|
1072
1072
|
eventSchemaVersion: EVENT_SCHEMA_VERSION,
|
|
1073
1073
|
signing: {
|
|
1074
|
-
mode: normalizeText(flags['signing-secret'],
|
|
1074
|
+
mode: normalizeText(claim?.signingMode || existingRegistry.signing?.mode || existingRegistry.signingMode, 20) || (normalizeText(claim?.signingSecret || flags['signing-secret'] || existingRegistry.signing?.secret, 512) ? 'optional' : 'off'),
|
|
1075
|
+
secret: normalizeText(flags['signing-secret'] || claim?.signingSecret || existingRegistry.signing?.secret, 512) || undefined,
|
|
1076
|
+
secretHint: normalizeText(claim?.signingSecretHint || existingRegistry.signing?.secretHint, 80) || undefined,
|
|
1075
1077
|
secretEnv: `${REGISTRY_PROVIDER.toUpperCase()}_SKILL_SIGNING_SECRET`
|
|
1076
1078
|
},
|
|
1077
1079
|
analytics: {
|
|
@@ -2186,7 +2188,13 @@ async function submitTrackEvent(root, flags) {
|
|
|
2186
2188
|
idempotencyKey: normalizeText(flags.idempotencyKey || flags['idempotency-key'], 220) || `${invocationId}:${eventType}`,
|
|
2187
2189
|
occurredAt: Number.isFinite(occurredAt) ? occurredAt : Date.now()
|
|
2188
2190
|
};
|
|
2189
|
-
const signingSecret = normalizeText(
|
|
2191
|
+
const signingSecret = normalizeText(
|
|
2192
|
+
flags['signing-secret'] ||
|
|
2193
|
+
registry.signing?.secret ||
|
|
2194
|
+
process.env[registry.signing?.secretEnv || ''] ||
|
|
2195
|
+
process.env.XIASHE_SKILL_SIGNING_SECRET,
|
|
2196
|
+
512
|
|
2197
|
+
);
|
|
2190
2198
|
const signature = signEventPayload(payload, signingSecret);
|
|
2191
2199
|
if (signature) {
|
|
2192
2200
|
payload.signature = signature;
|