@finchtech/cli 0.4.0 → 0.4.1
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/README.md +5 -1
- package/dist/finch.js +848 -415
- package/package.json +4 -4
package/dist/finch.js
CHANGED
|
@@ -6619,7 +6619,7 @@ var init_package = __esm({
|
|
|
6619
6619
|
"package.json"() {
|
|
6620
6620
|
package_default = {
|
|
6621
6621
|
name: "@finchtech/cli",
|
|
6622
|
-
version: "0.4.
|
|
6622
|
+
version: "0.4.1",
|
|
6623
6623
|
description: "Finch Agent CLI for wallet-owned marketplace and MCP workflows.",
|
|
6624
6624
|
type: "module",
|
|
6625
6625
|
bin: {
|
|
@@ -11443,7 +11443,7 @@ async function buildSkillRoot(input) {
|
|
|
11443
11443
|
if (contentKey !== null) encrypted[file2.path] = { ciphertext: cid.toString(), plaintextHash: await sha256Hex(file2.content) };
|
|
11444
11444
|
}
|
|
11445
11445
|
if (!md) throw new RangeError("SkillRoot primary document is missing.");
|
|
11446
|
-
const
|
|
11446
|
+
const manifest5 = jsonBytes({
|
|
11447
11447
|
schemaVersion: "1.0",
|
|
11448
11448
|
name: input.name,
|
|
11449
11449
|
skillVersion: String(input.version),
|
|
@@ -11452,7 +11452,7 @@ async function buildSkillRoot(input) {
|
|
|
11452
11452
|
});
|
|
11453
11453
|
const root = {
|
|
11454
11454
|
md,
|
|
11455
|
-
manifest: await put(
|
|
11455
|
+
manifest: await put(manifest5),
|
|
11456
11456
|
entry: { ...md, profile: ENTRY_PROFILE },
|
|
11457
11457
|
...Object.keys(files).length ? { files } : {},
|
|
11458
11458
|
...input.previousHash === void 0 ? {} : { prev: hashCID(input.previousHash, 113) }
|
|
@@ -11466,7 +11466,7 @@ async function buildSkillRoot(input) {
|
|
|
11466
11466
|
const proof = {
|
|
11467
11467
|
scheme: SKILL_ROOT_SCHEME,
|
|
11468
11468
|
root: toBase64(rootBytes),
|
|
11469
|
-
manifest: toBase64(
|
|
11469
|
+
manifest: toBase64(manifest5),
|
|
11470
11470
|
...confidentiality === void 0 ? {} : { confidentiality: toBase64(confidentiality) }
|
|
11471
11471
|
};
|
|
11472
11472
|
const packageHash = await sha256Hex(rootBytes);
|
|
@@ -11503,8 +11503,8 @@ async function verifySkillRootProof(proof, packageHash, version6, previousHash)
|
|
|
11503
11503
|
const paths = Object.keys(refs);
|
|
11504
11504
|
if (paths.length > MAX_SKILL_IMPORT_FILES || paths.some((name) => paths.some((other) => other.startsWith(`${name}/`)))) throw new RangeError("SkillRoot file paths exceed limits or conflict.");
|
|
11505
11505
|
if (!refs[executable.path]?.equals(executable.cid)) throw new RangeError("SkillRoot entrypoint is outside the committed files.");
|
|
11506
|
-
const
|
|
11507
|
-
if (
|
|
11506
|
+
const manifest5 = await authenticatedJSON(proof.manifest, CID.asCID(root.manifest));
|
|
11507
|
+
if (manifest5.schemaVersion !== "1.0" || typeof manifest5.name !== "string" || typeof manifest5.summary !== "string" || manifest5.skillVersion !== String(version6) || manifest5.entrypoint !== executable.path) throw new RangeError("Invalid SkillRoot manifest.");
|
|
11508
11508
|
const hashes = /* @__PURE__ */ Object.create(null);
|
|
11509
11509
|
if (root.confidentiality === void 0) {
|
|
11510
11510
|
if (proof.confidentiality !== void 0) throw new RangeError("Public SkillRoot declares encrypted transport.");
|
|
@@ -11527,8 +11527,8 @@ async function verifySkillRootProof(proof, packageHash, version6, previousHash)
|
|
|
11527
11527
|
mdHash: hashes[md.path],
|
|
11528
11528
|
primaryPath: md.path,
|
|
11529
11529
|
plaintext: root.confidentiality === void 0,
|
|
11530
|
-
name:
|
|
11531
|
-
summary:
|
|
11530
|
+
name: manifest5.name,
|
|
11531
|
+
summary: manifest5.summary,
|
|
11532
11532
|
fileHashes: hashes
|
|
11533
11533
|
};
|
|
11534
11534
|
}
|
|
@@ -11781,8 +11781,8 @@ function buildManifest(entries, presentation, documents) {
|
|
|
11781
11781
|
...normalizedDocuments === void 0 ? {} : { documents: normalizedDocuments }
|
|
11782
11782
|
};
|
|
11783
11783
|
}
|
|
11784
|
-
function serializeManifest(
|
|
11785
|
-
return new TextEncoder().encode(JSON.stringify(
|
|
11784
|
+
function serializeManifest(manifest5) {
|
|
11785
|
+
return new TextEncoder().encode(JSON.stringify(manifest5));
|
|
11786
11786
|
}
|
|
11787
11787
|
function parseManifest(bytes) {
|
|
11788
11788
|
let value;
|
|
@@ -11804,14 +11804,14 @@ function parseManifest(bytes) {
|
|
|
11804
11804
|
return null;
|
|
11805
11805
|
}
|
|
11806
11806
|
}
|
|
11807
|
-
function packageForVersion(
|
|
11808
|
-
return
|
|
11807
|
+
function packageForVersion(manifest5, version6) {
|
|
11808
|
+
return manifest5.versions.find((entry2) => entry2.version === version6) ?? null;
|
|
11809
11809
|
}
|
|
11810
|
-
function withVersion(
|
|
11811
|
-
return buildManifest([...
|
|
11810
|
+
function withVersion(manifest5, entry2) {
|
|
11811
|
+
return buildManifest([...manifest5?.versions ?? [], entry2], manifest5?.presentation, manifest5?.documents);
|
|
11812
11812
|
}
|
|
11813
|
-
function withPresentation(
|
|
11814
|
-
return buildManifest(
|
|
11813
|
+
function withPresentation(manifest5, presentation) {
|
|
11814
|
+
return buildManifest(manifest5.versions, presentation, manifest5.documents);
|
|
11815
11815
|
}
|
|
11816
11816
|
var MAX_SKILL_MANIFEST_BYTES, SKILL_MANIFEST_SCHEME, SKILL_DETAIL_KINDS, DETAIL_MEDIA_TYPES, DETAIL_HASH, DETAIL_ASSET_PATH, DETAIL_IPFS_URI, DETAIL_STORAGE_URI, DETAIL_BUCKET_BY_KIND, DETAIL_MEDIA_HOST;
|
|
11817
11817
|
var init_manifest = __esm({
|
|
@@ -11943,7 +11943,7 @@ function strictObjectSchema(properties, required4 = Object.keys(properties)) {
|
|
|
11943
11943
|
additionalProperties: false
|
|
11944
11944
|
});
|
|
11945
11945
|
}
|
|
11946
|
-
var AGENT_MARKET_API_VERSION, MAX_HTTP_ARTIFACT_BYTES, MAX_MCP_ARTIFACT_BYTES, MAX_CLI_CREDENTIAL_BYTES, integrationFamilyValues, canonicalUuidPattern, canonicalUuidSchema, positiveRevisionSchema, nonNegativeGenerationSchema, positiveIntegerStringSchema, hex32Schema, evmAddressSchema, evmAddressInputSchema, canonicalSecondTimestampSchema, IDEMPOTENCY_KEY_PATTERN, UUID_PATTERN, emptyStrictObjectSchema, idempotencyHeaderSchema;
|
|
11946
|
+
var AGENT_MARKET_API_VERSION, MAX_HTTP_ARTIFACT_BYTES, MAX_MCP_ARTIFACT_BYTES, MAX_CLI_CREDENTIAL_BYTES, integrationFamilyValues, canonicalUuidPattern, canonicalUuidSchema, positiveRevisionSchema, nonNegativeGenerationSchema, positiveIntegerStringSchema, hex32Schema, evmAddressSchema, evmAddressInputSchema, canonicalSecondTimestampSchema, IDEMPOTENCY_KEY_PATTERN, UUID_PATTERN, emptyStrictObjectSchema, jsonValueTypesSchema, idempotencyHeaderSchema;
|
|
11947
11947
|
var init_common2 = __esm({
|
|
11948
11948
|
"../../packages/agent-market-contracts/src/v1/common.ts"() {
|
|
11949
11949
|
"use strict";
|
|
@@ -11994,6 +11994,16 @@ var init_common2 = __esm({
|
|
|
11994
11994
|
IDEMPOTENCY_KEY_PATTERN = /^[\x21-\x7e]{1,160}$/u;
|
|
11995
11995
|
UUID_PATTERN = new RegExp(canonicalUuidPattern, "u");
|
|
11996
11996
|
emptyStrictObjectSchema = strictObjectSchema({}, []);
|
|
11997
|
+
jsonValueTypesSchema = Object.freeze({
|
|
11998
|
+
anyOf: Object.freeze([
|
|
11999
|
+
Object.freeze({ type: "object", additionalProperties: true }),
|
|
12000
|
+
Object.freeze({ type: "array", items: true }),
|
|
12001
|
+
Object.freeze({ type: "string" }),
|
|
12002
|
+
Object.freeze({ type: "number" }),
|
|
12003
|
+
Object.freeze({ type: "boolean" }),
|
|
12004
|
+
Object.freeze({ type: "null" })
|
|
12005
|
+
])
|
|
12006
|
+
});
|
|
11997
12007
|
idempotencyHeaderSchema = Object.freeze({
|
|
11998
12008
|
type: "string",
|
|
11999
12009
|
minLength: 1,
|
|
@@ -13733,6 +13743,137 @@ var init_artifacts = __esm({
|
|
|
13733
13743
|
}
|
|
13734
13744
|
});
|
|
13735
13745
|
|
|
13746
|
+
// ../../packages/agent-market-contracts/src/v1/transfers.ts
|
|
13747
|
+
function handoff(method2, body) {
|
|
13748
|
+
return strictObjectSchema({
|
|
13749
|
+
method: { const: method2, description: `HTTP method for the transfer (${method2}).` },
|
|
13750
|
+
url: { type: "string", minLength: 1, maxLength: 2048, description: "Absolute URL to send the transfer request to." },
|
|
13751
|
+
headers: headerMapSchema,
|
|
13752
|
+
body: { const: body, description: "What the request body must be." }
|
|
13753
|
+
});
|
|
13754
|
+
}
|
|
13755
|
+
var described, nullSchema, nonNegativeIntegerStringSchema, headerMapSchema, MAX_INPUT_ARTIFACT_IDS, inputArtifactIdsSchema, prepareInputArtifactRequestSchema, prepareInputArtifactResponseSchema, artifactDownloadLinkResponseSchema, prepareAvatarUploadResponseSchema, buyerRunStatusFilterValues, buyerRunModeFilterValues, buyerRunsQuerySchema, buyerRunSchema, buyerRunsResponseSchema;
|
|
13756
|
+
var init_transfers = __esm({
|
|
13757
|
+
"../../packages/agent-market-contracts/src/v1/transfers.ts"() {
|
|
13758
|
+
"use strict";
|
|
13759
|
+
init_common2();
|
|
13760
|
+
described = (schema5, description) => Object.freeze({ ...schema5, description });
|
|
13761
|
+
nullSchema = Object.freeze({ type: "null" });
|
|
13762
|
+
nonNegativeIntegerStringSchema = Object.freeze({ type: "string", pattern: "^(0|[1-9][0-9]*)$" });
|
|
13763
|
+
headerMapSchema = Object.freeze({
|
|
13764
|
+
type: "object",
|
|
13765
|
+
additionalProperties: { type: "string", minLength: 1, maxLength: 2048 },
|
|
13766
|
+
description: "Send exactly these HTTP headers. Authorization carries a single-purpose transfer capability, not your Finch credential; treat it as a secret and do not log or repeat it."
|
|
13767
|
+
});
|
|
13768
|
+
MAX_INPUT_ARTIFACT_IDS = 32;
|
|
13769
|
+
inputArtifactIdsSchema = Object.freeze({
|
|
13770
|
+
type: "array",
|
|
13771
|
+
minItems: 1,
|
|
13772
|
+
maxItems: MAX_INPUT_ARTIFACT_IDS,
|
|
13773
|
+
uniqueItems: true,
|
|
13774
|
+
items: canonicalUuidSchema,
|
|
13775
|
+
description: "Input files for an Offer that accepts files: artifactIds from agent_market_buyer_input_artifact_prepare whose bytes you uploaded. Finch appends them after your content, as the website does."
|
|
13776
|
+
});
|
|
13777
|
+
prepareInputArtifactRequestSchema = strictObjectSchema({
|
|
13778
|
+
mediaType: {
|
|
13779
|
+
type: "string",
|
|
13780
|
+
minLength: 3,
|
|
13781
|
+
maxLength: 160,
|
|
13782
|
+
pattern: "^[a-z0-9][a-z0-9!#$&^_.+-]*/[a-z0-9][a-z0-9!#$&^_.+-]*$",
|
|
13783
|
+
description: "Media type of the file, for example application/pdf or image/png. Finch checks it against the file bytes."
|
|
13784
|
+
},
|
|
13785
|
+
filename: {
|
|
13786
|
+
type: "string",
|
|
13787
|
+
minLength: 1,
|
|
13788
|
+
maxLength: 200,
|
|
13789
|
+
pattern: "^(?!\\.{1,2}$)(?!.*[\\\\/\\u0000-\\u001f\\u007f]).+$",
|
|
13790
|
+
description: "File name shown to the Agent, without a directory."
|
|
13791
|
+
},
|
|
13792
|
+
byteLength: {
|
|
13793
|
+
type: "integer",
|
|
13794
|
+
minimum: 1,
|
|
13795
|
+
maximum: MAX_HTTP_ARTIFACT_BYTES,
|
|
13796
|
+
description: "Exact size of the file in bytes; the Offer may allow less."
|
|
13797
|
+
}
|
|
13798
|
+
});
|
|
13799
|
+
prepareInputArtifactResponseSchema = strictObjectSchema({
|
|
13800
|
+
artifactId: described(canonicalUuidSchema, "The input file; pass it in inputArtifactIds after the upload succeeds."),
|
|
13801
|
+
expiresAt: described(canonicalSecondTimestampSchema, "Upload before this time; afterwards prepare again."),
|
|
13802
|
+
upload: Object.freeze({
|
|
13803
|
+
...handoff("POST", "the raw file bytes"),
|
|
13804
|
+
description: "Upload the file bytes once with this HTTP request (for example curl --data-binary @file with every header)."
|
|
13805
|
+
})
|
|
13806
|
+
});
|
|
13807
|
+
artifactDownloadLinkResponseSchema = strictObjectSchema({
|
|
13808
|
+
artifactId: described(canonicalUuidSchema, "The file this link downloads."),
|
|
13809
|
+
expiresAt: described(canonicalSecondTimestampSchema, "The link works until this time; afterwards create another."),
|
|
13810
|
+
download: Object.freeze({
|
|
13811
|
+
...handoff("GET", "empty"),
|
|
13812
|
+
description: "Download the file bytes with this HTTP request (for example curl -o file with every header)."
|
|
13813
|
+
})
|
|
13814
|
+
});
|
|
13815
|
+
prepareAvatarUploadResponseSchema = strictObjectSchema({
|
|
13816
|
+
expiresAt: described(canonicalSecondTimestampSchema, "Upload before this time; the link works once."),
|
|
13817
|
+
upload: Object.freeze({
|
|
13818
|
+
...handoff("POST", "multipart/form-data with the avatar file in the form field named file"),
|
|
13819
|
+
description: 'Upload the avatar once with this HTTP request (for example curl -F file=@avatar.mp4 with every header). The response is {"uri","mediaType"}; use the uri as the Agent avatar.'
|
|
13820
|
+
}),
|
|
13821
|
+
accepted: Object.freeze({
|
|
13822
|
+
...strictObjectSchema({
|
|
13823
|
+
mediaTypes: { type: "array", items: { type: "string" }, description: "Accepted image and video types." },
|
|
13824
|
+
maxImageBytes: described(positiveIntegerStringSchema, "Largest accepted image, in bytes."),
|
|
13825
|
+
maxVideoBytes: described(positiveIntegerStringSchema, "Largest accepted video, in bytes.")
|
|
13826
|
+
}),
|
|
13827
|
+
description: "What the upload accepts."
|
|
13828
|
+
})
|
|
13829
|
+
});
|
|
13830
|
+
buyerRunStatusFilterValues = Object.freeze(["all", "active", "input_required", "completed", "failed"]);
|
|
13831
|
+
buyerRunModeFilterValues = Object.freeze(["all", "conversation_turn", "task", "generation", "direct_api"]);
|
|
13832
|
+
buyerRunsQuerySchema = strictObjectSchema({
|
|
13833
|
+
status: { enum: buyerRunStatusFilterValues, default: "all", description: "Only runs in this state group." },
|
|
13834
|
+
mode: { enum: buyerRunModeFilterValues, default: "all", description: "Only runs of this interaction mode." },
|
|
13835
|
+
cursorCreatedAt: { type: "string", format: "date-time", maxLength: 40, description: "nextCursor.createdAt from the previous page." },
|
|
13836
|
+
cursorInvocationId: described(canonicalUuidSchema, "nextCursor.invocationId from the previous page."),
|
|
13837
|
+
limit: { type: "integer", minimum: 1, maximum: 100, default: 20, description: "Runs per page." }
|
|
13838
|
+
}, []);
|
|
13839
|
+
buyerRunSchema = strictObjectSchema({
|
|
13840
|
+
invocationId: described(canonicalUuidSchema, "Read a conversation or Direct call with agent_market_buyer_invocation_get."),
|
|
13841
|
+
serviceVersionId: described(canonicalUuidSchema, "The Agent version that ran."),
|
|
13842
|
+
agentName: { type: "string", minLength: 1, maxLength: 200, description: "Agent display name." },
|
|
13843
|
+
offerId: { anyOf: [canonicalUuidSchema, nullSchema], description: "AgentOn Offer, or null for a Direct call." },
|
|
13844
|
+
offerName: { anyOf: [{ type: "string", minLength: 1, maxLength: 200 }, nullSchema], description: "Offer display name." },
|
|
13845
|
+
interactionMode: { enum: ["conversation_turn", "task", "generation", "direct_api"], description: "How the run interacts." },
|
|
13846
|
+
status: {
|
|
13847
|
+
enum: ["awaiting_dispatch", "dispatching", "submitted", "working", "input_required", "completed", "failed", "canceled", "expired"],
|
|
13848
|
+
description: "Current run state."
|
|
13849
|
+
},
|
|
13850
|
+
conversationId: { anyOf: [canonicalUuidSchema, nullSchema], description: "Conversation of a P1 run; pass it to start the next turn." },
|
|
13851
|
+
taskId: { anyOf: [canonicalUuidSchema, nullSchema], description: "Task of a P2/P3 run; read it with agent_market_buyer_task_get." },
|
|
13852
|
+
requestSummary: { type: "string", minLength: 1, maxLength: 500, description: "Short summary of what was asked." },
|
|
13853
|
+
resultSummary: { anyOf: [{ type: "string", maxLength: 500 }, nullSchema], description: "Short summary of the result so far." },
|
|
13854
|
+
fundingSource: {
|
|
13855
|
+
anyOf: [{ enum: ["merchant_self_test", "administrator_test", "sponsored", "promotion", "paid"] }, nullSchema],
|
|
13856
|
+
description: "The allowance the run reserved."
|
|
13857
|
+
},
|
|
13858
|
+
reservedCallRightUnits: described(nonNegativeIntegerStringSchema, "Call-right units the run reserved."),
|
|
13859
|
+
artifactCount: { type: "integer", minimum: 0, description: "Output files the run published." },
|
|
13860
|
+
createdAt: { type: "string", format: "date-time", description: "When the run started." },
|
|
13861
|
+
updatedAt: { type: "string", format: "date-time", description: "When the run last changed." },
|
|
13862
|
+
completedAt: { anyOf: [{ type: "string", format: "date-time" }, nullSchema], description: "When the run finished, if it did." }
|
|
13863
|
+
});
|
|
13864
|
+
buyerRunsResponseSchema = strictObjectSchema({
|
|
13865
|
+
items: { type: "array", maxItems: 100, items: buyerRunSchema, description: "Runs of this account, newest first." },
|
|
13866
|
+
nextCursor: {
|
|
13867
|
+
anyOf: [strictObjectSchema({
|
|
13868
|
+
createdAt: { type: "string", format: "date-time", description: "Pass as cursorCreatedAt." },
|
|
13869
|
+
invocationId: described(canonicalUuidSchema, "Pass as cursorInvocationId.")
|
|
13870
|
+
}), nullSchema],
|
|
13871
|
+
description: "Cursor for the next page, or null at the end."
|
|
13872
|
+
}
|
|
13873
|
+
});
|
|
13874
|
+
}
|
|
13875
|
+
});
|
|
13876
|
+
|
|
13736
13877
|
// ../../packages/agent-market-contracts/src/v1/buyer.ts
|
|
13737
13878
|
function supplementalQuestionMetadata(maxTextLength) {
|
|
13738
13879
|
return {
|
|
@@ -13749,30 +13890,51 @@ function supplementalQuestionMetadata(maxTextLength) {
|
|
|
13749
13890
|
}
|
|
13750
13891
|
};
|
|
13751
13892
|
}
|
|
13752
|
-
function
|
|
13753
|
-
return
|
|
13893
|
+
function taskMutationReceiptProperties(status) {
|
|
13894
|
+
return {
|
|
13754
13895
|
operationId: canonicalUuidSchema,
|
|
13755
13896
|
taskId: canonicalUuidSchema,
|
|
13756
13897
|
status: { const: status },
|
|
13757
13898
|
taskRevision: positiveRevisionSchema,
|
|
13758
13899
|
etag: taskStrongEtagSchema,
|
|
13759
13900
|
replayed: booleanSchema2
|
|
13760
|
-
}
|
|
13901
|
+
};
|
|
13761
13902
|
}
|
|
13762
|
-
|
|
13903
|
+
function taskMutationReceipt(status) {
|
|
13904
|
+
return strictObjectSchema(taskMutationReceiptProperties(status));
|
|
13905
|
+
}
|
|
13906
|
+
var booleanSchema2, jsonValueSchema, nullSchema2, agentOnInitialInputSchema, agentOnFollowUpContentSchema, feeBpsCapSchema, createPurchaseIntentRequestSchema, purchaseIntentAcceptedSchema, PURCHASE_FEE_DECISION_CONTRACT, feeSnapshotCommon, purchaseFeeDecisionSnapshotSchema, PURCHASE_LIFECYCLE_CONTRACT, FINANCIAL_AUTHORIZATION_CONTRACT, nonNegativeIntegerStringSchema2, callRightPurchaseBatchSchema, callRightsListResponseSchema, CALL_RIGHTS_PAGE_CONTRACT, CALL_FUNDING_SOURCES, fundingSourceSchema, callEligibilityQuerySchema, described2, callEligibilityResponseSchema, invocationStartRequestSchema, invocationContinueRequestSchema, runtimeHandoffStateSchema, p1InvocationReceiptProperties, p1InvocationReceiptSchema, p1InvocationAcceptedSchema, directInvocationAcceptedSchema, supplementalQuestionOptionSchema, p1QuestionSchema, p1QuestionsSchema, p1AwaitingCompletionQuestionsSchema, taskQuestionSchema, taskQuestionsSchema, closedPublicFailureSchema, timeoutFailureSchema, invocationCommon, p1InvocationResponseSchema, directInvocationCommon, directPublicFailureSchema, directInvocationResponseSchema, DIRECT_INVOCATION_READ_CONTRACT, invocationResponseSchema, createTaskRequestSchema, TASK_QUANTITY_AUTHORITY_CONTRACT, taskCreateReceiptProperties, taskCreateReceiptSchema, taskCreateAcceptedSchema, taskStrongEtagSchema, taskInputReceiptSchema, taskInputAcceptedSchema, taskCommon, buyerOutputArtifactSchema, buyerOutputArtifactsSchema, taskResponseSchema, BUYER_AGENTON_RECOVERY_CONTRACT, appendTaskInputRequestSchema, directInvocationRequestSchema, TASK_COMPLETED_CANONICALIZATION;
|
|
13763
13907
|
var init_buyer = __esm({
|
|
13764
13908
|
"../../packages/agent-market-contracts/src/v1/buyer.ts"() {
|
|
13765
13909
|
"use strict";
|
|
13766
13910
|
init_common2();
|
|
13911
|
+
init_transfers();
|
|
13767
13912
|
booleanSchema2 = Object.freeze({ type: "boolean" });
|
|
13768
13913
|
jsonValueSchema = Object.freeze({
|
|
13914
|
+
...jsonValueTypesSchema,
|
|
13769
13915
|
description: "Native JSON value; pass objects and arrays directly, never as JSON-encoded strings. finch-canonical-binary64-v1; at most 65536 UTF-8 bytes, depth 64, and 10000 nodes.",
|
|
13770
13916
|
"x-finch-canonical-json-codec": "finch-canonical-binary64-v1",
|
|
13771
13917
|
"x-finch-max-utf8-bytes": 65536,
|
|
13772
13918
|
"x-finch-max-depth": 64,
|
|
13773
13919
|
"x-finch-max-nodes": 1e4
|
|
13774
13920
|
});
|
|
13775
|
-
|
|
13921
|
+
nullSchema2 = Object.freeze({ type: "null" });
|
|
13922
|
+
agentOnInitialInputSchema = Object.freeze({
|
|
13923
|
+
...jsonValueSchema,
|
|
13924
|
+
description: 'JSON value matching the published inputSchema of the selected Offer. For a content-array schema send {"content":[{"type":"text","text":"..."}]}; for a schema without declared properties send the prompt as a string; otherwise send the structured value the schema describes. Finch validates it against that schema and converts it to Provider content the same way the Finch website does. ' + jsonValueSchema.description
|
|
13925
|
+
});
|
|
13926
|
+
agentOnFollowUpContentSchema = Object.freeze({
|
|
13927
|
+
type: "array",
|
|
13928
|
+
minItems: 1,
|
|
13929
|
+
maxItems: 100,
|
|
13930
|
+
description: "Follow-up content parts sent to the Provider in order. Use text parts for answers and JSON parts for structured data.",
|
|
13931
|
+
items: Object.freeze({
|
|
13932
|
+
oneOf: Object.freeze([
|
|
13933
|
+
strictObjectSchema({ type: Object.freeze({ const: "text" }), text: Object.freeze({ type: "string", minLength: 1, maxLength: 1e4 }) }),
|
|
13934
|
+
strictObjectSchema({ type: Object.freeze({ const: "json" }), json: jsonValueSchema })
|
|
13935
|
+
])
|
|
13936
|
+
})
|
|
13937
|
+
});
|
|
13776
13938
|
feeBpsCapSchema = Object.freeze({ type: "integer", minimum: 0, maximum: 1e4 });
|
|
13777
13939
|
createPurchaseIntentRequestSchema = strictObjectSchema({
|
|
13778
13940
|
units: positiveIntegerStringSchema,
|
|
@@ -13866,18 +14028,18 @@ var init_buyer = __esm({
|
|
|
13866
14028
|
configHashEncoding: "0x_64_lowercase_hex",
|
|
13867
14029
|
mismatchWrites: 0
|
|
13868
14030
|
});
|
|
13869
|
-
|
|
14031
|
+
nonNegativeIntegerStringSchema2 = Object.freeze({ type: "string", pattern: "^(0|[1-9][0-9]*)$" });
|
|
13870
14032
|
callRightPurchaseBatchSchema = strictObjectSchema({
|
|
13871
14033
|
purchaseBatchId: canonicalUuidSchema,
|
|
13872
14034
|
purchasedUnits: positiveIntegerStringSchema,
|
|
13873
|
-
availableUnits:
|
|
13874
|
-
reservedUnits:
|
|
13875
|
-
earningPendingUnits:
|
|
14035
|
+
availableUnits: nonNegativeIntegerStringSchema2,
|
|
14036
|
+
reservedUnits: nonNegativeIntegerStringSchema2,
|
|
14037
|
+
earningPendingUnits: nonNegativeIntegerStringSchema2,
|
|
13876
14038
|
purchasedAt: canonicalSecondTimestampSchema
|
|
13877
14039
|
});
|
|
13878
14040
|
callRightsListResponseSchema = strictObjectSchema({
|
|
13879
14041
|
items: { type: "array", maxItems: 100, items: callRightPurchaseBatchSchema },
|
|
13880
|
-
nextCursor: { anyOf: [canonicalUuidSchema,
|
|
14042
|
+
nextCursor: { anyOf: [canonicalUuidSchema, nullSchema2] }
|
|
13881
14043
|
});
|
|
13882
14044
|
CALL_RIGHTS_PAGE_CONTRACT = Object.freeze({
|
|
13883
14045
|
cursor: "exclusive_purchase_batch_uuid",
|
|
@@ -13886,17 +14048,77 @@ var init_buyer = __esm({
|
|
|
13886
14048
|
cursorAuthority: "same_actor_account_environment_and_requested_version",
|
|
13887
14049
|
invalidOrForeignCursorError: "AGENT_MARKET_RESOURCE_NOT_FOUND"
|
|
13888
14050
|
});
|
|
14051
|
+
CALL_FUNDING_SOURCES = Object.freeze([
|
|
14052
|
+
"merchant_self_test",
|
|
14053
|
+
"administrator_test",
|
|
14054
|
+
"sponsored",
|
|
14055
|
+
"promotion",
|
|
14056
|
+
"paid"
|
|
14057
|
+
]);
|
|
14058
|
+
fundingSourceSchema = Object.freeze({
|
|
14059
|
+
anyOf: [{ enum: CALL_FUNDING_SOURCES }, nullSchema2],
|
|
14060
|
+
description: "The allowance this call reserved: merchant_self_test (owner test of a contract-tested Agent, free), promotion (free promotional operation), paid (purchased Call Rights), or administrator_test/sponsored (Finch-funded). A failed call releases what it reserved."
|
|
14061
|
+
});
|
|
14062
|
+
callEligibilityQuerySchema = strictObjectSchema({
|
|
14063
|
+
offerId: { ...canonicalUuidSchema, description: "AgentOn offer to check. Pass either offerId or versionId, not both." },
|
|
14064
|
+
versionId: { ...canonicalUuidSchema, description: "Direct API service version to check. Pass either offerId or versionId, not both." },
|
|
14065
|
+
quantity: {
|
|
14066
|
+
type: "integer",
|
|
14067
|
+
minimum: 1,
|
|
14068
|
+
maximum: 2147483647,
|
|
14069
|
+
default: 1,
|
|
14070
|
+
description: "Units of work for a generation offer; 1 for conversation, task, and Direct calls."
|
|
14071
|
+
}
|
|
14072
|
+
}, []);
|
|
14073
|
+
described2 = (schema5, description) => Object.freeze({ ...schema5, description });
|
|
14074
|
+
callEligibilityResponseSchema = strictObjectSchema({
|
|
14075
|
+
serviceVersionId: described2(canonicalUuidSchema, "Service version the call would run on."),
|
|
14076
|
+
offerId: { anyOf: [canonicalUuidSchema, nullSchema2], description: "The checked AgentOn offer, or null for a Direct API version." },
|
|
14077
|
+
quantity: { type: "integer", minimum: 1, maximum: 2147483647, description: "The checked quantity." },
|
|
14078
|
+
requiredUnits: described2(positiveIntegerStringSchema, "Call-right units a paid call would reserve, as a decimal integer string."),
|
|
14079
|
+
fundingSource: {
|
|
14080
|
+
enum: ["merchant_self_test", "promotion", "paid", "insufficient"],
|
|
14081
|
+
description: "What the next call would use: merchant_self_test and promotion are free; paid consumes requiredUnits purchased call rights; insufficient means call rights must be purchased first."
|
|
14082
|
+
},
|
|
14083
|
+
merchantSelfTest: described2(booleanSchema2, "True when the caller owns this contract-tested agent, so calls are a free owner self-test."),
|
|
14084
|
+
promotion: {
|
|
14085
|
+
anyOf: [strictObjectSchema({
|
|
14086
|
+
availableOperations: described2(nonNegativeIntegerStringSchema2, "Free calls usable now: the lower of personalRemaining and dailyRemaining."),
|
|
14087
|
+
personalRemaining: described2(nonNegativeIntegerStringSchema2, "Free calls left for this account in the promotion."),
|
|
14088
|
+
expiresAt: described2(canonicalSecondTimestampSchema, "When the promotion ends."),
|
|
14089
|
+
dailyRemaining: { anyOf: [nonNegativeIntegerStringSchema2, nullSchema2], description: "Free calls left today for this agent across all buyers, or null when there is no daily limit." },
|
|
14090
|
+
dailyResetsAt: { anyOf: [canonicalSecondTimestampSchema, nullSchema2], description: "When the daily limit resets, or null when there is no daily limit." }
|
|
14091
|
+
}), nullSchema2],
|
|
14092
|
+
description: "The active free promotion for this agent, or null when there is none."
|
|
14093
|
+
},
|
|
14094
|
+
paid: Object.freeze({
|
|
14095
|
+
...strictObjectSchema({
|
|
14096
|
+
availableUnits: described2(nonNegativeIntegerStringSchema2, "Purchased call-right units available now."),
|
|
14097
|
+
reservedUnits: described2(nonNegativeIntegerStringSchema2, "Purchased call-right units held by calls still running.")
|
|
14098
|
+
}),
|
|
14099
|
+
description: "Purchased call rights for this service version."
|
|
14100
|
+
})
|
|
14101
|
+
});
|
|
13889
14102
|
invocationStartRequestSchema = strictObjectSchema({
|
|
13890
|
-
content:
|
|
13891
|
-
taskCompleted: booleanSchema2
|
|
14103
|
+
content: agentOnInitialInputSchema,
|
|
14104
|
+
taskCompleted: booleanSchema2,
|
|
14105
|
+
inputArtifactIds: inputArtifactIdsSchema,
|
|
14106
|
+
conversationId: {
|
|
14107
|
+
...canonicalUuidSchema,
|
|
14108
|
+
description: "Start the next paid turn of this earlier conversation (from a previous invocation) instead of a new conversation. Its last turn must be finished, and it must be with the same Agent."
|
|
14109
|
+
}
|
|
13892
14110
|
}, ["content"]);
|
|
13893
14111
|
invocationContinueRequestSchema = strictObjectSchema({
|
|
13894
14112
|
conversationId: canonicalUuidSchema,
|
|
13895
14113
|
expectedTurnId: canonicalUuidSchema,
|
|
13896
|
-
content:
|
|
14114
|
+
content: agentOnFollowUpContentSchema,
|
|
13897
14115
|
taskCompleted: booleanSchema2
|
|
13898
14116
|
}, ["conversationId", "expectedTurnId", "content"]);
|
|
13899
|
-
|
|
14117
|
+
runtimeHandoffStateSchema = Object.freeze({
|
|
14118
|
+
enum: Object.freeze(["acknowledged", "uncertain"]),
|
|
14119
|
+
description: "acknowledged: the runtime received the work. uncertain: the work is accepted and durable, but runtime receipt was not confirmed; Finch retries delivery automatically, so read it by its identifiers and do not resubmit with a new Idempotency-Key."
|
|
14120
|
+
});
|
|
14121
|
+
p1InvocationReceiptProperties = {
|
|
13900
14122
|
operationId: {
|
|
13901
14123
|
...canonicalUuidSchema,
|
|
13902
14124
|
description: "Durable admission identity; recover its current P1 resource identity with agent_market_operation_get."
|
|
@@ -13909,6 +14131,11 @@ var init_buyer = __esm({
|
|
|
13909
14131
|
turnId: canonicalUuidSchema,
|
|
13910
14132
|
status: { const: "awaiting_dispatch" },
|
|
13911
14133
|
replayed: booleanSchema2
|
|
14134
|
+
};
|
|
14135
|
+
p1InvocationReceiptSchema = strictObjectSchema(p1InvocationReceiptProperties);
|
|
14136
|
+
p1InvocationAcceptedSchema = strictObjectSchema({
|
|
14137
|
+
...p1InvocationReceiptProperties,
|
|
14138
|
+
handoffState: runtimeHandoffStateSchema
|
|
13912
14139
|
});
|
|
13913
14140
|
directInvocationAcceptedSchema = strictObjectSchema({
|
|
13914
14141
|
operationId: canonicalUuidSchema,
|
|
@@ -13955,12 +14182,12 @@ var init_buyer = __esm({
|
|
|
13955
14182
|
strictObjectSchema({ code: { const: "AGENT_MARKET_RUNTIME_REJECTED" }, message: { const: "The runtime rejected the request." } }),
|
|
13956
14183
|
strictObjectSchema({ code: { const: "AGENT_MARKET_RUNTIME_UNAVAILABLE" }, message: { const: "The runtime is temporarily unavailable." } }),
|
|
13957
14184
|
strictObjectSchema({ code: { const: "AGENT_MARKET_RUNTIME_TIMEOUT" }, message: { const: "The runtime did not complete before the deadline." } }),
|
|
13958
|
-
strictObjectSchema({ code: { const: "AGENT_MARKET_INTERNAL_ERROR" }, message:
|
|
14185
|
+
strictObjectSchema({ code: { const: "AGENT_MARKET_INTERNAL_ERROR" }, message: nullSchema2 })
|
|
13959
14186
|
]
|
|
13960
14187
|
});
|
|
13961
14188
|
timeoutFailureSchema = strictObjectSchema({
|
|
13962
14189
|
code: { const: "AGENT_MARKET_RUNTIME_TIMEOUT" },
|
|
13963
|
-
message:
|
|
14190
|
+
message: nullSchema2
|
|
13964
14191
|
});
|
|
13965
14192
|
invocationCommon = {
|
|
13966
14193
|
operationId: canonicalUuidSchema,
|
|
@@ -13968,15 +14195,16 @@ var init_buyer = __esm({
|
|
|
13968
14195
|
conversationId: canonicalUuidSchema,
|
|
13969
14196
|
currentTurnId: canonicalUuidSchema,
|
|
13970
14197
|
createdAt: canonicalSecondTimestampSchema,
|
|
13971
|
-
updatedAt: canonicalSecondTimestampSchema
|
|
14198
|
+
updatedAt: canonicalSecondTimestampSchema,
|
|
14199
|
+
fundingSource: fundingSourceSchema
|
|
13972
14200
|
};
|
|
13973
14201
|
p1InvocationResponseSchema = Object.freeze({
|
|
13974
14202
|
oneOf: [
|
|
13975
14203
|
...["awaiting_dispatch", "dispatching"].map((status) => strictObjectSchema({
|
|
13976
14204
|
...invocationCommon,
|
|
13977
14205
|
status: { const: status },
|
|
13978
|
-
output:
|
|
13979
|
-
error:
|
|
14206
|
+
output: nullSchema2,
|
|
14207
|
+
error: nullSchema2
|
|
13980
14208
|
})),
|
|
13981
14209
|
strictObjectSchema({
|
|
13982
14210
|
...invocationCommon,
|
|
@@ -13990,18 +14218,18 @@ var init_buyer = __esm({
|
|
|
13990
14218
|
})
|
|
13991
14219
|
]
|
|
13992
14220
|
}),
|
|
13993
|
-
error:
|
|
14221
|
+
error: nullSchema2
|
|
13994
14222
|
}),
|
|
13995
14223
|
strictObjectSchema({
|
|
13996
14224
|
...invocationCommon,
|
|
13997
14225
|
status: { const: "completed" },
|
|
13998
14226
|
output: jsonValueSchema,
|
|
13999
|
-
error:
|
|
14227
|
+
error: nullSchema2
|
|
14000
14228
|
}),
|
|
14001
14229
|
strictObjectSchema({
|
|
14002
14230
|
...invocationCommon,
|
|
14003
14231
|
status: { const: "failed" },
|
|
14004
|
-
output:
|
|
14232
|
+
output: nullSchema2,
|
|
14005
14233
|
error: closedPublicFailureSchema
|
|
14006
14234
|
})
|
|
14007
14235
|
]
|
|
@@ -14010,7 +14238,8 @@ var init_buyer = __esm({
|
|
|
14010
14238
|
operationId: canonicalUuidSchema,
|
|
14011
14239
|
invocationId: canonicalUuidSchema,
|
|
14012
14240
|
createdAt: canonicalSecondTimestampSchema,
|
|
14013
|
-
updatedAt: canonicalSecondTimestampSchema
|
|
14241
|
+
updatedAt: canonicalSecondTimestampSchema,
|
|
14242
|
+
fundingSource: fundingSourceSchema
|
|
14014
14243
|
};
|
|
14015
14244
|
directPublicFailureSchema = Object.freeze({
|
|
14016
14245
|
oneOf: [
|
|
@@ -14022,7 +14251,7 @@ var init_buyer = __esm({
|
|
|
14022
14251
|
code: { const: "AGENT_MARKET_RUNTIME_UNAVAILABLE" },
|
|
14023
14252
|
message: { const: "The runtime is temporarily unavailable." }
|
|
14024
14253
|
}),
|
|
14025
|
-
strictObjectSchema({ code: { const: "AGENT_MARKET_INTERNAL_ERROR" }, message:
|
|
14254
|
+
strictObjectSchema({ code: { const: "AGENT_MARKET_INTERNAL_ERROR" }, message: nullSchema2 })
|
|
14026
14255
|
]
|
|
14027
14256
|
});
|
|
14028
14257
|
directInvocationResponseSchema = Object.freeze({
|
|
@@ -14030,19 +14259,19 @@ var init_buyer = __esm({
|
|
|
14030
14259
|
...["awaiting_dispatch", "dispatching"].map((status) => strictObjectSchema({
|
|
14031
14260
|
...directInvocationCommon,
|
|
14032
14261
|
status: { const: status },
|
|
14033
|
-
output:
|
|
14034
|
-
error:
|
|
14262
|
+
output: nullSchema2,
|
|
14263
|
+
error: nullSchema2
|
|
14035
14264
|
})),
|
|
14036
14265
|
strictObjectSchema({
|
|
14037
14266
|
...directInvocationCommon,
|
|
14038
14267
|
status: { const: "completed" },
|
|
14039
14268
|
output: jsonValueSchema,
|
|
14040
|
-
error:
|
|
14269
|
+
error: nullSchema2
|
|
14041
14270
|
}),
|
|
14042
14271
|
strictObjectSchema({
|
|
14043
14272
|
...directInvocationCommon,
|
|
14044
14273
|
status: { const: "failed" },
|
|
14045
|
-
output:
|
|
14274
|
+
output: nullSchema2,
|
|
14046
14275
|
error: directPublicFailureSchema
|
|
14047
14276
|
})
|
|
14048
14277
|
]
|
|
@@ -14086,7 +14315,8 @@ var init_buyer = __esm({
|
|
|
14086
14315
|
});
|
|
14087
14316
|
createTaskRequestSchema = strictObjectSchema({
|
|
14088
14317
|
quantity: { type: "integer", minimum: 1, maximum: 2147483647 },
|
|
14089
|
-
content:
|
|
14318
|
+
content: agentOnInitialInputSchema,
|
|
14319
|
+
inputArtifactIds: inputArtifactIdsSchema
|
|
14090
14320
|
}, ["quantity", "content"]);
|
|
14091
14321
|
TASK_QUANTITY_AUTHORITY_CONTRACT = Object.freeze({
|
|
14092
14322
|
transport: "positive_int32",
|
|
@@ -14096,7 +14326,7 @@ var init_buyer = __esm({
|
|
|
14096
14326
|
p3BoundsAuthority: "database_offer_and_artifact_business_rules",
|
|
14097
14327
|
transportDoesNotApplyGlobal100Cap: true
|
|
14098
14328
|
});
|
|
14099
|
-
|
|
14329
|
+
taskCreateReceiptProperties = {
|
|
14100
14330
|
operationId: {
|
|
14101
14331
|
...canonicalUuidSchema,
|
|
14102
14332
|
description: "Durable admission identity; recover its current P2/P3 resource identity with agent_market_operation_get."
|
|
@@ -14107,6 +14337,11 @@ var init_buyer = __esm({
|
|
|
14107
14337
|
},
|
|
14108
14338
|
status: { const: "submitted" },
|
|
14109
14339
|
replayed: booleanSchema2
|
|
14340
|
+
};
|
|
14341
|
+
taskCreateReceiptSchema = strictObjectSchema(taskCreateReceiptProperties);
|
|
14342
|
+
taskCreateAcceptedSchema = strictObjectSchema({
|
|
14343
|
+
...taskCreateReceiptProperties,
|
|
14344
|
+
handoffState: runtimeHandoffStateSchema
|
|
14110
14345
|
});
|
|
14111
14346
|
taskStrongEtagSchema = Object.freeze({
|
|
14112
14347
|
type: "string",
|
|
@@ -14114,15 +14349,19 @@ var init_buyer = __esm({
|
|
|
14114
14349
|
"x-finch-resource-id-field": "taskId",
|
|
14115
14350
|
"x-finch-revision-field": "taskRevision"
|
|
14116
14351
|
});
|
|
14117
|
-
|
|
14118
|
-
|
|
14352
|
+
taskInputReceiptSchema = taskMutationReceipt("working");
|
|
14353
|
+
taskInputAcceptedSchema = strictObjectSchema({
|
|
14354
|
+
...taskMutationReceiptProperties("working"),
|
|
14355
|
+
handoffState: runtimeHandoffStateSchema
|
|
14356
|
+
});
|
|
14119
14357
|
taskCommon = {
|
|
14120
14358
|
operationId: canonicalUuidSchema,
|
|
14121
14359
|
taskId: canonicalUuidSchema,
|
|
14122
14360
|
taskRevision: positiveRevisionSchema,
|
|
14123
14361
|
etag: taskStrongEtagSchema,
|
|
14124
14362
|
createdAt: canonicalSecondTimestampSchema,
|
|
14125
|
-
updatedAt: canonicalSecondTimestampSchema
|
|
14363
|
+
updatedAt: canonicalSecondTimestampSchema,
|
|
14364
|
+
fundingSource: fundingSourceSchema
|
|
14126
14365
|
};
|
|
14127
14366
|
buyerOutputArtifactSchema = strictObjectSchema({
|
|
14128
14367
|
artifactId: canonicalUuidSchema,
|
|
@@ -14152,38 +14391,38 @@ var init_buyer = __esm({
|
|
|
14152
14391
|
...["submitted", "working"].map((status) => strictObjectSchema({
|
|
14153
14392
|
...taskCommon,
|
|
14154
14393
|
status: { const: status },
|
|
14155
|
-
output:
|
|
14156
|
-
error:
|
|
14394
|
+
output: nullSchema2,
|
|
14395
|
+
error: nullSchema2
|
|
14157
14396
|
})),
|
|
14158
14397
|
strictObjectSchema({
|
|
14159
14398
|
...taskCommon,
|
|
14160
14399
|
status: { const: "input_required" },
|
|
14161
14400
|
output: strictObjectSchema({ questions: taskQuestionsSchema }),
|
|
14162
|
-
error:
|
|
14401
|
+
error: nullSchema2
|
|
14163
14402
|
}),
|
|
14164
14403
|
strictObjectSchema({
|
|
14165
14404
|
...taskCommon,
|
|
14166
14405
|
status: { const: "completed" },
|
|
14167
14406
|
output: jsonValueSchema,
|
|
14168
14407
|
artifacts: buyerOutputArtifactsSchema,
|
|
14169
|
-
error:
|
|
14408
|
+
error: nullSchema2
|
|
14170
14409
|
}),
|
|
14171
14410
|
strictObjectSchema({
|
|
14172
14411
|
...taskCommon,
|
|
14173
14412
|
status: { const: "failed" },
|
|
14174
|
-
output:
|
|
14413
|
+
output: nullSchema2,
|
|
14175
14414
|
error: closedPublicFailureSchema
|
|
14176
14415
|
}),
|
|
14177
14416
|
strictObjectSchema({
|
|
14178
14417
|
...taskCommon,
|
|
14179
14418
|
status: { const: "canceled" },
|
|
14180
|
-
output:
|
|
14181
|
-
error:
|
|
14419
|
+
output: nullSchema2,
|
|
14420
|
+
error: nullSchema2
|
|
14182
14421
|
}),
|
|
14183
14422
|
strictObjectSchema({
|
|
14184
14423
|
...taskCommon,
|
|
14185
14424
|
status: { const: "expired" },
|
|
14186
|
-
output:
|
|
14425
|
+
output: nullSchema2,
|
|
14187
14426
|
error: timeoutFailureSchema
|
|
14188
14427
|
})
|
|
14189
14428
|
]
|
|
@@ -14202,8 +14441,7 @@ var init_buyer = __esm({
|
|
|
14202
14441
|
p1ContinueOperationIdIsGenericRecovery: true,
|
|
14203
14442
|
missingOrForeignOperationError: "AGENT_MARKET_OPERATION_NOT_FOUND"
|
|
14204
14443
|
});
|
|
14205
|
-
appendTaskInputRequestSchema = strictObjectSchema({ content:
|
|
14206
|
-
cancelTaskRequestSchema = strictObjectSchema({});
|
|
14444
|
+
appendTaskInputRequestSchema = strictObjectSchema({ content: agentOnFollowUpContentSchema });
|
|
14207
14445
|
directInvocationRequestSchema = strictObjectSchema({ input: jsonValueSchema });
|
|
14208
14446
|
TASK_COMPLETED_CANONICALIZATION = Object.freeze({
|
|
14209
14447
|
omitted: true,
|
|
@@ -14219,10 +14457,10 @@ function notRunStage(kind) {
|
|
|
14219
14457
|
return strictObjectSchema({
|
|
14220
14458
|
kind: { const: kind },
|
|
14221
14459
|
status: { const: "not_run" },
|
|
14222
|
-
httpStatus:
|
|
14223
|
-
resultCode:
|
|
14224
|
-
deliveryOutcome:
|
|
14225
|
-
latencyMs:
|
|
14460
|
+
httpStatus: nullSchema3,
|
|
14461
|
+
resultCode: nullSchema3,
|
|
14462
|
+
deliveryOutcome: nullSchema3,
|
|
14463
|
+
latencyMs: nullSchema3
|
|
14226
14464
|
});
|
|
14227
14465
|
}
|
|
14228
14466
|
function successfulStage(kind, httpStatus) {
|
|
@@ -14230,8 +14468,8 @@ function successfulStage(kind, httpStatus) {
|
|
|
14230
14468
|
kind: { const: kind },
|
|
14231
14469
|
status: { const: "success" },
|
|
14232
14470
|
httpStatus,
|
|
14233
|
-
resultCode:
|
|
14234
|
-
deliveryOutcome:
|
|
14471
|
+
resultCode: nullSchema3,
|
|
14472
|
+
deliveryOutcome: nullSchema3,
|
|
14235
14473
|
latencyMs: boundedLatencySchema
|
|
14236
14474
|
});
|
|
14237
14475
|
}
|
|
@@ -14239,9 +14477,9 @@ function terminalStage(kind, status, resultCodes) {
|
|
|
14239
14477
|
return strictObjectSchema({
|
|
14240
14478
|
kind: { const: kind },
|
|
14241
14479
|
status: { const: status },
|
|
14242
|
-
httpStatus: { anyOf: [boundedHttpStatusSchema,
|
|
14480
|
+
httpStatus: { anyOf: [boundedHttpStatusSchema, nullSchema3] },
|
|
14243
14481
|
resultCode: { type: "string", enum: resultCodes },
|
|
14244
|
-
deliveryOutcome: status === "uncertain" ? { const: "unknown" } : { anyOf: [{ const: "not_sent" },
|
|
14482
|
+
deliveryOutcome: status === "uncertain" ? { const: "unknown" } : { anyOf: [{ const: "not_sent" }, nullSchema3] },
|
|
14245
14483
|
latencyMs: boundedLatencySchema
|
|
14246
14484
|
});
|
|
14247
14485
|
}
|
|
@@ -14269,11 +14507,11 @@ function systemTerminalVariant(status, reason, preparingAt, executingAt, history
|
|
|
14269
14507
|
preparingAt,
|
|
14270
14508
|
executingAt,
|
|
14271
14509
|
completedAt: timestampSchema2,
|
|
14272
|
-
suiteResult:
|
|
14510
|
+
suiteResult: nullSchema3,
|
|
14273
14511
|
...history
|
|
14274
14512
|
});
|
|
14275
14513
|
}
|
|
14276
|
-
var DIRECT_CONNECTION_TEST_SUITE_ID, DIRECT_CONNECTION_TEST_SUITE_VERSION, DIRECT_CONNECTION_TEST_STAGE_KINDS, DIRECT_CONNECTION_TEST_STAGE_STATUSES, DIRECT_CONNECTION_TEST_MAX_LATENCY_MS, DIRECT_CONNECTION_TEST_AGGREGATE_FAILURE_CODES, CONNECTION_TEST_SYSTEM_FAILED_REASONS, CONNECTION_TEST_SYSTEM_UNCERTAIN_REASONS, CONNECTION_TEST_SYSTEM_TERMINAL_REASONS, CONNECTION_TEST_SYSTEM_TERMINAL_REASON_TO_PUBLIC_FAILURE_CODE, CONNECTION_TEST_SYSTEM_TERMINAL_CONTRACT, DIRECT_CONNECTION_TEST_TRANSPORT_RESULT_CODES, DIRECT_CONNECTION_TEST_HEALTH_RESULT_CODES, DIRECT_CONNECTION_TEST_PREFLIGHT_RESULT_CODES, DIRECT_CONNECTION_TEST_INVOCATION_RESULT_CODES, DIRECT_CONNECTION_TEST_INTERNAL_RESULT_CODES,
|
|
14514
|
+
var DIRECT_CONNECTION_TEST_SUITE_ID, DIRECT_CONNECTION_TEST_SUITE_VERSION, DIRECT_CONNECTION_TEST_STAGE_KINDS, DIRECT_CONNECTION_TEST_STAGE_STATUSES, DIRECT_CONNECTION_TEST_MAX_LATENCY_MS, DIRECT_CONNECTION_TEST_AGGREGATE_FAILURE_CODES, CONNECTION_TEST_SYSTEM_FAILED_REASONS, CONNECTION_TEST_SYSTEM_UNCERTAIN_REASONS, CONNECTION_TEST_SYSTEM_TERMINAL_REASONS, CONNECTION_TEST_SYSTEM_TERMINAL_REASON_TO_PUBLIC_FAILURE_CODE, CONNECTION_TEST_SYSTEM_TERMINAL_CONTRACT, DIRECT_CONNECTION_TEST_TRANSPORT_RESULT_CODES, DIRECT_CONNECTION_TEST_HEALTH_RESULT_CODES, DIRECT_CONNECTION_TEST_PREFLIGHT_RESULT_CODES, DIRECT_CONNECTION_TEST_INVOCATION_RESULT_CODES, DIRECT_CONNECTION_TEST_INTERNAL_RESULT_CODES, nullSchema3, boundedHttpStatusSchema, successfulHttpStatusSchema, boundedLatencySchema, healthSuccessSchema, healthFailedSchema, healthUncertainSchema, preflightNotRunSchema, preflightSkippedSchema, preflightSuccessSchema, preflightFailedSchema, preflightUncertainSchema, invocationNotRunSchema, invocationSuccessSchema, invocationFailedSchema, invocationUncertainSchema, directConnectionTestHealthStageSchema, directConnectionTestPreflightStageSchema, directConnectionTestInvocationStageSchema, internalResult, onlineInternalResultSchema, failedInternalResultSchemas, uncertainInternalResultSchemas, directConnectionTestInternalResultSchema, DIRECT_CONNECTION_TEST_DIAGNOSTIC_CODES, directConnectionTestDiagnostics, directConnectionTestDiagnosticsResponseSchema, timestampSchema2, systemHealthNotRunMarkerSchema, systemPreflightNotRunMarkerSchema, systemPreflightSkippedMarkerSchema, systemInvocationNotRunMarkerSchema, systemNoPriorFailedHistorySchema, systemHealthPriorFailedHistorySchema, systemPreflightSuccessPriorFailedHistorySchema, systemPreflightSkippedPriorFailedHistorySchema, systemReceiptMissingHistorySchemas, systemFailedReasonSchema, systemFailedHistorySchemas, connectionTestSystemTerminalSchema, PLACEHOLDER_STRINGS, DIRECT_CONNECTION_TEST_SUITE_CONTRACT, AGENTON_CONNECTION_TEST_SUITE_CONTRACT, CONNECTION_TEST_STORAGE_STATE_TO_PUBLIC_STATUS, CONNECTION_TEST_INTERNAL_FAILURE_TO_PUBLIC_FAILURE, OPERATION_STORAGE_KIND_TO_PUBLIC_KIND, CONNECTION_TEST_PUBLIC_PROJECTION_CONTRACT;
|
|
14277
14515
|
var init_direct_connection_test = __esm({
|
|
14278
14516
|
"../../packages/agent-market-contracts/src/v1/direct-connection-test.ts"() {
|
|
14279
14517
|
"use strict";
|
|
@@ -14385,7 +14623,7 @@ var init_direct_connection_test = __esm({
|
|
|
14385
14623
|
"network_unavailable",
|
|
14386
14624
|
"network_failure"
|
|
14387
14625
|
]);
|
|
14388
|
-
|
|
14626
|
+
nullSchema3 = { type: "null" };
|
|
14389
14627
|
boundedHttpStatusSchema = { type: "integer", minimum: 100, maximum: 599 };
|
|
14390
14628
|
successfulHttpStatusSchema = { type: "integer", minimum: 200, maximum: 299 };
|
|
14391
14629
|
boundedLatencySchema = {
|
|
@@ -14408,10 +14646,10 @@ var init_direct_connection_test = __esm({
|
|
|
14408
14646
|
preflightSkippedSchema = strictObjectSchema({
|
|
14409
14647
|
kind: { const: "preflight" },
|
|
14410
14648
|
status: { const: "skipped" },
|
|
14411
|
-
httpStatus:
|
|
14412
|
-
resultCode:
|
|
14413
|
-
deliveryOutcome:
|
|
14414
|
-
latencyMs:
|
|
14649
|
+
httpStatus: nullSchema3,
|
|
14650
|
+
resultCode: nullSchema3,
|
|
14651
|
+
deliveryOutcome: nullSchema3,
|
|
14652
|
+
latencyMs: nullSchema3
|
|
14415
14653
|
});
|
|
14416
14654
|
preflightSuccessSchema = successfulStage("preflight", successfulHttpStatusSchema);
|
|
14417
14655
|
preflightFailedSchema = terminalStage(
|
|
@@ -14461,7 +14699,7 @@ var init_direct_connection_test = __esm({
|
|
|
14461
14699
|
});
|
|
14462
14700
|
internalResult = (status, failureCode, health, preflight, invocation) => strictObjectSchema({
|
|
14463
14701
|
status: { const: status },
|
|
14464
|
-
failureCode: failureCode === null ?
|
|
14702
|
+
failureCode: failureCode === null ? nullSchema3 : { const: failureCode },
|
|
14465
14703
|
health,
|
|
14466
14704
|
preflight,
|
|
14467
14705
|
invocation
|
|
@@ -14533,29 +14771,29 @@ var init_direct_connection_test = __esm({
|
|
|
14533
14771
|
});
|
|
14534
14772
|
directConnectionTestDiagnosticsResponseSchema = Object.freeze({
|
|
14535
14773
|
oneOf: [
|
|
14536
|
-
directConnectionTestDiagnostics("authorized",
|
|
14537
|
-
directConnectionTestDiagnostics("executing",
|
|
14774
|
+
directConnectionTestDiagnostics("authorized", nullSchema3, nullSchema3),
|
|
14775
|
+
directConnectionTestDiagnostics("executing", nullSchema3, nullSchema3),
|
|
14538
14776
|
directConnectionTestDiagnostics(
|
|
14539
14777
|
"succeeded",
|
|
14540
|
-
|
|
14778
|
+
nullSchema3,
|
|
14541
14779
|
onlineInternalResultSchema
|
|
14542
14780
|
),
|
|
14543
|
-
directConnectionTestDiagnostics("failed",
|
|
14781
|
+
directConnectionTestDiagnostics("failed", nullSchema3, { oneOf: failedInternalResultSchemas }),
|
|
14544
14782
|
directConnectionTestDiagnostics("failed", {
|
|
14545
14783
|
type: "string",
|
|
14546
14784
|
enum: DIRECT_CONNECTION_TEST_DIAGNOSTIC_CODES.filter(
|
|
14547
14785
|
(code) => code !== "EXECUTION_RESULT_MISSING"
|
|
14548
14786
|
)
|
|
14549
|
-
},
|
|
14787
|
+
}, nullSchema3),
|
|
14550
14788
|
directConnectionTestDiagnostics(
|
|
14551
14789
|
"uncertain",
|
|
14552
|
-
|
|
14790
|
+
nullSchema3,
|
|
14553
14791
|
{ oneOf: uncertainInternalResultSchemas }
|
|
14554
14792
|
),
|
|
14555
14793
|
directConnectionTestDiagnostics(
|
|
14556
14794
|
"uncertain",
|
|
14557
14795
|
{ const: "EXECUTION_RESULT_MISSING" },
|
|
14558
|
-
|
|
14796
|
+
nullSchema3
|
|
14559
14797
|
)
|
|
14560
14798
|
]
|
|
14561
14799
|
});
|
|
@@ -14578,7 +14816,7 @@ var init_direct_connection_test = __esm({
|
|
|
14578
14816
|
});
|
|
14579
14817
|
systemNoPriorFailedHistorySchema = {
|
|
14580
14818
|
priorCompletedStages: exactStageTuple([]),
|
|
14581
|
-
activeStage:
|
|
14819
|
+
activeStage: nullSchema3,
|
|
14582
14820
|
remainingStages: exactStageTuple([
|
|
14583
14821
|
systemHealthNotRunMarkerSchema,
|
|
14584
14822
|
{ oneOf: [systemPreflightNotRunMarkerSchema, systemPreflightSkippedMarkerSchema] },
|
|
@@ -14587,7 +14825,7 @@ var init_direct_connection_test = __esm({
|
|
|
14587
14825
|
};
|
|
14588
14826
|
systemHealthPriorFailedHistorySchema = {
|
|
14589
14827
|
priorCompletedStages: exactStageTuple([healthSuccessSchema]),
|
|
14590
|
-
activeStage:
|
|
14828
|
+
activeStage: nullSchema3,
|
|
14591
14829
|
remainingStages: exactStageTuple([
|
|
14592
14830
|
systemPreflightNotRunMarkerSchema,
|
|
14593
14831
|
systemInvocationNotRunMarkerSchema
|
|
@@ -14595,12 +14833,12 @@ var init_direct_connection_test = __esm({
|
|
|
14595
14833
|
};
|
|
14596
14834
|
systemPreflightSuccessPriorFailedHistorySchema = {
|
|
14597
14835
|
priorCompletedStages: exactStageTuple([healthSuccessSchema, preflightSuccessSchema]),
|
|
14598
|
-
activeStage:
|
|
14836
|
+
activeStage: nullSchema3,
|
|
14599
14837
|
remainingStages: exactStageTuple([systemInvocationNotRunMarkerSchema])
|
|
14600
14838
|
};
|
|
14601
14839
|
systemPreflightSkippedPriorFailedHistorySchema = {
|
|
14602
14840
|
priorCompletedStages: exactStageTuple([healthSuccessSchema, preflightSkippedSchema]),
|
|
14603
|
-
activeStage:
|
|
14841
|
+
activeStage: nullSchema3,
|
|
14604
14842
|
remainingStages: exactStageTuple([systemInvocationNotRunMarkerSchema])
|
|
14605
14843
|
};
|
|
14606
14844
|
systemReceiptMissingHistorySchemas = [
|
|
@@ -14642,15 +14880,15 @@ var init_direct_connection_test = __esm({
|
|
|
14642
14880
|
systemTerminalVariant(
|
|
14643
14881
|
"failed",
|
|
14644
14882
|
systemFailedReasonSchema,
|
|
14645
|
-
|
|
14646
|
-
|
|
14883
|
+
nullSchema3,
|
|
14884
|
+
nullSchema3,
|
|
14647
14885
|
systemNoPriorFailedHistorySchema
|
|
14648
14886
|
),
|
|
14649
14887
|
systemTerminalVariant(
|
|
14650
14888
|
"failed",
|
|
14651
14889
|
systemFailedReasonSchema,
|
|
14652
14890
|
timestampSchema2,
|
|
14653
|
-
|
|
14891
|
+
nullSchema3,
|
|
14654
14892
|
systemNoPriorFailedHistorySchema
|
|
14655
14893
|
),
|
|
14656
14894
|
...systemFailedHistorySchemas.map((history) => systemTerminalVariant(
|
|
@@ -15335,17 +15573,17 @@ var init_localization = __esm({
|
|
|
15335
15573
|
function signedStatusVariants(kind, denialCode, executionFailureCode, successResult, extra = {}) {
|
|
15336
15574
|
const base3 = (status) => ({ ...signedBase(kind, status), ...extra });
|
|
15337
15575
|
return [
|
|
15338
|
-
strictObjectSchema({ ...base3("awaiting_signature"), authorizedAt:
|
|
15339
|
-
strictObjectSchema({ ...base3("authorized"), authorizedAt: timestampSchema3, executingAt:
|
|
15340
|
-
strictObjectSchema({ ...base3("executing"), authorizedAt: timestampSchema3, executingAt: timestampSchema3, deniedAt:
|
|
15341
|
-
strictObjectSchema({ ...base3("succeeded"), authorizedAt: timestampSchema3, executingAt: timestampSchema3, deniedAt:
|
|
15342
|
-
strictObjectSchema({ ...base3("failed"), authorizedAt:
|
|
15343
|
-
strictObjectSchema({ ...base3("failed"), authorizedAt: timestampSchema3, executingAt:
|
|
15344
|
-
strictObjectSchema({ ...base3("failed"), authorizedAt: timestampSchema3, executingAt: timestampSchema3, deniedAt:
|
|
15345
|
-
strictObjectSchema({ ...base3("denied"), authorizedAt:
|
|
15576
|
+
strictObjectSchema({ ...base3("awaiting_signature"), authorizedAt: nullSchema4, executingAt: nullSchema4, deniedAt: nullSchema4, completedAt: nullSchema4, failureCode: nullSchema4, result: nullSchema4 }),
|
|
15577
|
+
strictObjectSchema({ ...base3("authorized"), authorizedAt: timestampSchema3, executingAt: nullSchema4, deniedAt: nullSchema4, completedAt: nullSchema4, failureCode: nullSchema4, result: nullSchema4 }),
|
|
15578
|
+
strictObjectSchema({ ...base3("executing"), authorizedAt: timestampSchema3, executingAt: timestampSchema3, deniedAt: nullSchema4, completedAt: nullSchema4, failureCode: nullSchema4, result: nullSchema4 }),
|
|
15579
|
+
strictObjectSchema({ ...base3("succeeded"), authorizedAt: timestampSchema3, executingAt: timestampSchema3, deniedAt: nullSchema4, completedAt: timestampSchema3, failureCode: nullSchema4, result: successResult }),
|
|
15580
|
+
strictObjectSchema({ ...base3("failed"), authorizedAt: nullSchema4, executingAt: nullSchema4, deniedAt: nullSchema4, completedAt: timestampSchema3, failureCode: { const: executionFailureCode }, result: nullSchema4 }),
|
|
15581
|
+
strictObjectSchema({ ...base3("failed"), authorizedAt: timestampSchema3, executingAt: nullSchema4, deniedAt: nullSchema4, completedAt: timestampSchema3, failureCode: { const: executionFailureCode }, result: nullSchema4 }),
|
|
15582
|
+
strictObjectSchema({ ...base3("failed"), authorizedAt: timestampSchema3, executingAt: timestampSchema3, deniedAt: nullSchema4, completedAt: timestampSchema3, failureCode: { const: executionFailureCode }, result: nullSchema4 }),
|
|
15583
|
+
strictObjectSchema({ ...base3("denied"), authorizedAt: nullSchema4, executingAt: nullSchema4, deniedAt: timestampSchema3, completedAt: timestampSchema3, failureCode: { const: denialCode }, result: nullSchema4 })
|
|
15346
15584
|
];
|
|
15347
15585
|
}
|
|
15348
|
-
var jsonValueSchema2, jsonSchemaDocumentSchema, nullableRevisionSchema3, nullableUuidSchema2, httpsUrlSchema, agentMarketIpfsUriSchema, nullableIpfsUriSchema, avatarMediaTypeSchema, artifactCountPolicySchema, artifactBatchContractSchema, integrationOptionsResponseSchema, createAgentWithInitialVersionRequestSchema, agentResponseSchema, agentListItemSchema, agentListResponseSchema, agentOnAuditOfferSchema, agentOnAuditReportResponseSchema, versionResponseSchema, replaceVersionAvailabilityRequestSchema, refundCampaignSummarySchema, versionAvailabilityResponseSchema, createAdditionalVersionRequestSchema, beginVersionDraftRequestSchema, beginVersionDraftResponseSchema, abandonVersionDraftRequestSchema, catalogChildRevisionStatusValues, ABANDON_VERSION_DRAFT_CHILD_STATUS_CONTRACT, abandonVersionDraftResponseSchema, agentOnRuntimeRequestSchema, directRuntimeRequestSchema, replaceRuntimeRequestSchema, runtimeResponseSchema, replaceAgentOnRailRequestSchema, agentOnRailResponseSchema, agentOnOfferModeValues, offerConfigurationProperties, createOfferRequestSchema, replaceOfferRequestSchema, offerResponseSchema, offerListResponseSchema, replaceDirectContractRequestSchema, directContractResponseSchema, createCredentialSetupRequestSchema, CREDENTIAL_SETUP_TTL_CONTRACT, credentialSetupBase, agentOnMaterialDownloadActionSchema, directMaterialFulfillmentActionSchema, requiresLocalActionSchema, credentialSetupResponseSchema, AGENTON_PLATFORM_ISSUED_CREDENTIAL_CONTRACT, agentOnConnectionTargetSchema, directConnectionTargetSchema, createConnectionTestRequestSchema, createPublishIntentRequestSchema, createOfferRetirementIntentRequestSchema, publicationIntentResponseSchema, OPERATION_STATUS_CONTRACT, timestampSchema3,
|
|
15586
|
+
var jsonValueSchema2, jsonSchemaDocumentSchema, nullableRevisionSchema3, nullableUuidSchema2, httpsUrlSchema, agentMarketIpfsUriSchema, nullableIpfsUriSchema, avatarMediaTypeSchema, artifactCountPolicySchema, artifactBatchContractSchema, integrationOptionsResponseSchema, createAgentWithInitialVersionRequestSchema, agentResponseSchema, agentListItemSchema, agentListResponseSchema, agentOnAuditOfferSchema, agentOnAuditReportResponseSchema, versionResponseSchema, replaceVersionAvailabilityRequestSchema, refundCampaignSummarySchema, versionAvailabilityResponseSchema, createAdditionalVersionRequestSchema, beginVersionDraftRequestSchema, beginVersionDraftResponseSchema, abandonVersionDraftRequestSchema, catalogChildRevisionStatusValues, ABANDON_VERSION_DRAFT_CHILD_STATUS_CONTRACT, abandonVersionDraftResponseSchema, agentOnRuntimeRequestSchema, directRuntimeRequestSchema, replaceRuntimeRequestSchema, runtimeResponseSchema, replaceAgentOnRailRequestSchema, agentOnRailResponseSchema, agentOnOfferModeValues, offerConfigurationProperties, createOfferRequestSchema, replaceOfferRequestSchema, offerResponseSchema, offerListResponseSchema, replaceDirectContractRequestSchema, directContractResponseSchema, createCredentialSetupRequestSchema, CREDENTIAL_SETUP_TTL_CONTRACT, credentialSetupBase, agentOnMaterialDownloadActionSchema, directMaterialFulfillmentActionSchema, requiresLocalActionSchema, credentialSetupResponseSchema, AGENTON_PLATFORM_ISSUED_CREDENTIAL_CONTRACT, agentOnConnectionTargetSchema, directConnectionTargetSchema, createConnectionTestRequestSchema, createPublishIntentRequestSchema, createOfferRetirementIntentRequestSchema, publicationIntentResponseSchema, OPERATION_STATUS_CONTRACT, timestampSchema3, nullSchema4, signedBase, publicationOperationResultSchema, localPurchaseOperationResultSchema, localPurchaseChildrenSchema, publicationOperationVariants, localPurchaseOperationVariants, signedOperationResponseSchema, connectionBase, connectionTestResultSchema, connectionOperationVariants, connectionTestOperationResponseSchema, buyerOperationFailureSchema, p1OperationBase, p1OperationVariants, agentOnTaskOperationBase, agentOnTaskOperationVariants, operationResponseSchema, connectionTestAcceptedResponseSchema;
|
|
15349
15587
|
var init_merchant = __esm({
|
|
15350
15588
|
"../../packages/agent-market-contracts/src/v1/merchant.ts"() {
|
|
15351
15589
|
"use strict";
|
|
@@ -15354,16 +15592,7 @@ var init_merchant = __esm({
|
|
|
15354
15592
|
init_validation_input();
|
|
15355
15593
|
init_display();
|
|
15356
15594
|
init_actions();
|
|
15357
|
-
jsonValueSchema2 =
|
|
15358
|
-
anyOf: Object.freeze([
|
|
15359
|
-
Object.freeze({ type: "object", additionalProperties: true }),
|
|
15360
|
-
Object.freeze({ type: "array", items: true }),
|
|
15361
|
-
Object.freeze({ type: "string" }),
|
|
15362
|
-
Object.freeze({ type: "number" }),
|
|
15363
|
-
Object.freeze({ type: "boolean" }),
|
|
15364
|
-
Object.freeze({ type: "null" })
|
|
15365
|
-
])
|
|
15366
|
-
});
|
|
15595
|
+
jsonValueSchema2 = jsonValueTypesSchema;
|
|
15367
15596
|
jsonSchemaDocumentSchema = { type: ["object", "boolean"] };
|
|
15368
15597
|
nullableRevisionSchema3 = { anyOf: [positiveRevisionSchema, { type: "null" }] };
|
|
15369
15598
|
nullableUuidSchema2 = { anyOf: [canonicalUuidSchema, { type: "null" }] };
|
|
@@ -15720,7 +15949,7 @@ var init_merchant = __esm({
|
|
|
15720
15949
|
agenton_task: Object.freeze(["submitted", "working", "input_required", "completed", "failed", "canceled", "expired"])
|
|
15721
15950
|
});
|
|
15722
15951
|
timestampSchema3 = { type: "string", format: "date-time" };
|
|
15723
|
-
|
|
15952
|
+
nullSchema4 = { type: "null" };
|
|
15724
15953
|
signedBase = (kind, status) => ({
|
|
15725
15954
|
operationId: canonicalUuidSchema,
|
|
15726
15955
|
kind: { const: kind },
|
|
@@ -15730,7 +15959,7 @@ var init_merchant = __esm({
|
|
|
15730
15959
|
});
|
|
15731
15960
|
publicationOperationResultSchema = strictObjectSchema({
|
|
15732
15961
|
serviceVersionId: canonicalUuidSchema,
|
|
15733
|
-
publicationGeneration: { anyOf: [nonNegativeGenerationSchema,
|
|
15962
|
+
publicationGeneration: { anyOf: [nonNegativeGenerationSchema, nullSchema4] },
|
|
15734
15963
|
activeVersionRevision: positiveRevisionSchema
|
|
15735
15964
|
});
|
|
15736
15965
|
localPurchaseOperationResultSchema = strictObjectSchema({
|
|
@@ -15771,13 +16000,13 @@ var init_merchant = __esm({
|
|
|
15771
16000
|
passed: { const: true }
|
|
15772
16001
|
});
|
|
15773
16002
|
connectionOperationVariants = [
|
|
15774
|
-
strictObjectSchema({ ...connectionBase("authorized"), preparingAt:
|
|
15775
|
-
strictObjectSchema({ ...connectionBase("executing"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt:
|
|
15776
|
-
strictObjectSchema({ ...connectionBase("succeeded"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt: timestampSchema3, failureCode:
|
|
15777
|
-
strictObjectSchema({ ...connectionBase("failed"), preparingAt:
|
|
15778
|
-
strictObjectSchema({ ...connectionBase("failed"), preparingAt: timestampSchema3, executingAt:
|
|
15779
|
-
strictObjectSchema({ ...connectionBase("failed"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt: timestampSchema3, failureCode: { const: "CONNECTION_TEST_FAILED" }, result:
|
|
15780
|
-
strictObjectSchema({ ...connectionBase("uncertain"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt: timestampSchema3, failureCode: { const: "CONNECTION_TEST_UNCERTAIN" }, result:
|
|
16003
|
+
strictObjectSchema({ ...connectionBase("authorized"), preparingAt: nullSchema4, executingAt: nullSchema4, completedAt: nullSchema4, failureCode: nullSchema4, result: nullSchema4 }),
|
|
16004
|
+
strictObjectSchema({ ...connectionBase("executing"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt: nullSchema4, failureCode: nullSchema4, result: nullSchema4 }),
|
|
16005
|
+
strictObjectSchema({ ...connectionBase("succeeded"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt: timestampSchema3, failureCode: nullSchema4, result: connectionTestResultSchema }),
|
|
16006
|
+
strictObjectSchema({ ...connectionBase("failed"), preparingAt: nullSchema4, executingAt: nullSchema4, completedAt: timestampSchema3, failureCode: { const: "CONNECTION_TEST_FAILED" }, result: nullSchema4 }),
|
|
16007
|
+
strictObjectSchema({ ...connectionBase("failed"), preparingAt: timestampSchema3, executingAt: nullSchema4, completedAt: timestampSchema3, failureCode: { const: "CONNECTION_TEST_FAILED" }, result: nullSchema4 }),
|
|
16008
|
+
strictObjectSchema({ ...connectionBase("failed"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt: timestampSchema3, failureCode: { const: "CONNECTION_TEST_FAILED" }, result: nullSchema4 }),
|
|
16009
|
+
strictObjectSchema({ ...connectionBase("uncertain"), preparingAt: timestampSchema3, executingAt: timestampSchema3, completedAt: timestampSchema3, failureCode: { const: "CONNECTION_TEST_UNCERTAIN" }, result: nullSchema4 })
|
|
15781
16010
|
];
|
|
15782
16011
|
connectionTestOperationResponseSchema = Object.freeze({
|
|
15783
16012
|
oneOf: connectionOperationVariants,
|
|
@@ -15802,13 +16031,13 @@ var init_merchant = __esm({
|
|
|
15802
16031
|
p1OperationVariants = [
|
|
15803
16032
|
...["awaiting_dispatch", "dispatching", "input_required"].map((status) => strictObjectSchema({
|
|
15804
16033
|
...p1OperationBase(status),
|
|
15805
|
-
completedAt:
|
|
15806
|
-
failureCode:
|
|
16034
|
+
completedAt: nullSchema4,
|
|
16035
|
+
failureCode: nullSchema4
|
|
15807
16036
|
})),
|
|
15808
16037
|
strictObjectSchema({
|
|
15809
16038
|
...p1OperationBase("completed"),
|
|
15810
16039
|
completedAt: timestampSchema3,
|
|
15811
|
-
failureCode:
|
|
16040
|
+
failureCode: nullSchema4
|
|
15812
16041
|
}),
|
|
15813
16042
|
strictObjectSchema({
|
|
15814
16043
|
...p1OperationBase("failed"),
|
|
@@ -15828,13 +16057,13 @@ var init_merchant = __esm({
|
|
|
15828
16057
|
agentOnTaskOperationVariants = [
|
|
15829
16058
|
...["submitted", "working", "input_required"].map((status) => strictObjectSchema({
|
|
15830
16059
|
...agentOnTaskOperationBase(status),
|
|
15831
|
-
completedAt:
|
|
15832
|
-
failureCode:
|
|
16060
|
+
completedAt: nullSchema4,
|
|
16061
|
+
failureCode: nullSchema4
|
|
15833
16062
|
})),
|
|
15834
16063
|
strictObjectSchema({
|
|
15835
16064
|
...agentOnTaskOperationBase("completed"),
|
|
15836
16065
|
completedAt: timestampSchema3,
|
|
15837
|
-
failureCode:
|
|
16066
|
+
failureCode: nullSchema4
|
|
15838
16067
|
}),
|
|
15839
16068
|
strictObjectSchema({
|
|
15840
16069
|
...agentOnTaskOperationBase("failed"),
|
|
@@ -15844,7 +16073,7 @@ var init_merchant = __esm({
|
|
|
15844
16073
|
strictObjectSchema({
|
|
15845
16074
|
...agentOnTaskOperationBase("canceled"),
|
|
15846
16075
|
completedAt: timestampSchema3,
|
|
15847
|
-
failureCode:
|
|
16076
|
+
failureCode: nullSchema4
|
|
15848
16077
|
}),
|
|
15849
16078
|
strictObjectSchema({
|
|
15850
16079
|
...agentOnTaskOperationBase("expired"),
|
|
@@ -15868,7 +16097,7 @@ var init_merchant = __esm({
|
|
|
15868
16097
|
status: { const: "authorized" },
|
|
15869
16098
|
attempt: positiveRevisionSchema,
|
|
15870
16099
|
generation: positiveRevisionSchema,
|
|
15871
|
-
preparingAt:
|
|
16100
|
+
preparingAt: nullSchema4
|
|
15872
16101
|
});
|
|
15873
16102
|
}
|
|
15874
16103
|
});
|
|
@@ -16202,7 +16431,7 @@ function pageSchema(schema5) {
|
|
|
16202
16431
|
services: { ...properties.services, items: publicCatalogWireServiceSchema }
|
|
16203
16432
|
} };
|
|
16204
16433
|
}
|
|
16205
|
-
var descriptions,
|
|
16434
|
+
var descriptions, described3, catalogChainIdSchema, summaryProperties, publicCatalogWireServiceSchema, publicCatalogWireListResponseSchema, publicCatalogWireSearchResponseSchema, publicCatalogWireDetailResponseSchema;
|
|
16206
16435
|
var init_public_catalog_wire = __esm({
|
|
16207
16436
|
"../../packages/agent-market-contracts/src/v1/public-catalog-wire.ts"() {
|
|
16208
16437
|
"use strict";
|
|
@@ -16231,13 +16460,13 @@ var init_public_catalog_wire = __esm({
|
|
|
16231
16460
|
bytes: "Size of the report file in bytes, up to 20 MiB.",
|
|
16232
16461
|
uploadedAt: "Upload timestamp recorded for the audit report."
|
|
16233
16462
|
};
|
|
16234
|
-
|
|
16463
|
+
described3 = describeSummary(publicBuyerServiceSchema).properties;
|
|
16235
16464
|
catalogChainIdSchema = Object.freeze({
|
|
16236
16465
|
type: "integer",
|
|
16237
16466
|
minimum: 1,
|
|
16238
16467
|
description: "EVM chain ID for this service's payments. Currently 8453 (Base mainnet) in production and 84532 (Base Sepolia) in test."
|
|
16239
16468
|
});
|
|
16240
|
-
summaryProperties = Object.fromEntries(Object.entries(
|
|
16469
|
+
summaryProperties = Object.fromEntries(Object.entries(described3).filter(([name]) => name !== "versionRevision" && name !== "runtimeConfigHash"));
|
|
16241
16470
|
publicCatalogWireServiceSchema = {
|
|
16242
16471
|
...strictObjectSchema({ ...summaryProperties, chainId: catalogChainIdSchema }),
|
|
16243
16472
|
description: "Public catalog summary for one agent service."
|
|
@@ -16251,7 +16480,7 @@ var init_public_catalog_wire = __esm({
|
|
|
16251
16480
|
properties: {
|
|
16252
16481
|
...variant.properties,
|
|
16253
16482
|
chainId: catalogChainIdSchema,
|
|
16254
|
-
paymentToken:
|
|
16483
|
+
paymentToken: described3.paymentToken
|
|
16255
16484
|
},
|
|
16256
16485
|
required: [...variant.required, "chainId"]
|
|
16257
16486
|
}))
|
|
@@ -16320,6 +16549,7 @@ var init_operations = __esm({
|
|
|
16320
16549
|
"use strict";
|
|
16321
16550
|
init_localization();
|
|
16322
16551
|
init_artifacts();
|
|
16552
|
+
init_transfers();
|
|
16323
16553
|
init_agent_cli();
|
|
16324
16554
|
init_buyer();
|
|
16325
16555
|
init_testnet_purchase_v1();
|
|
@@ -16802,6 +17032,18 @@ var init_operations = __esm({
|
|
|
16802
17032
|
integrationFamilies: families.active,
|
|
16803
17033
|
writes: false
|
|
16804
17034
|
}),
|
|
17035
|
+
"buyer_call_eligibility.get": operation({
|
|
17036
|
+
id: "buyer_call_eligibility.get",
|
|
17037
|
+
requiredScope: "agent_market:buyer:read",
|
|
17038
|
+
http: http("get", "/api/v1/agent-market/buyer/call-eligibility", 200, {
|
|
17039
|
+
querySchema: callEligibilityQuerySchema,
|
|
17040
|
+
responseSchema: callEligibilityResponseSchema
|
|
17041
|
+
}),
|
|
17042
|
+
mcp: { name: "agent_market_buyer_call_eligibility_get" },
|
|
17043
|
+
cli: null,
|
|
17044
|
+
integrationFamilies: families.active,
|
|
17045
|
+
writes: false
|
|
17046
|
+
}),
|
|
16805
17047
|
"buyer_p1_invocations.create": operation({
|
|
16806
17048
|
id: "buyer_p1_invocations.create",
|
|
16807
17049
|
requiredScope: "agent_market:buyer:invoke",
|
|
@@ -16894,21 +17136,17 @@ var init_operations = __esm({
|
|
|
16894
17136
|
integrationFamilies: families.agenton,
|
|
16895
17137
|
writes: true
|
|
16896
17138
|
}),
|
|
16897
|
-
"
|
|
16898
|
-
id: "
|
|
16899
|
-
requiredScope: "agent_market:buyer:
|
|
16900
|
-
http: http("
|
|
16901
|
-
|
|
16902
|
-
responseSchema:
|
|
16903
|
-
idempotencyRequired: true,
|
|
16904
|
-
ifMatchRequired: true,
|
|
16905
|
-
ifMatchResourceKind: "task",
|
|
16906
|
-
etagReturned: true
|
|
17139
|
+
"buyer_runs.list": operation({
|
|
17140
|
+
id: "buyer_runs.list",
|
|
17141
|
+
requiredScope: "agent_market:buyer:read",
|
|
17142
|
+
http: http("get", "/api/v1/agent-market/buyer/runs", 200, {
|
|
17143
|
+
querySchema: buyerRunsQuerySchema,
|
|
17144
|
+
responseSchema: buyerRunsResponseSchema
|
|
16907
17145
|
}),
|
|
16908
|
-
mcp: { name: "
|
|
17146
|
+
mcp: { name: "agent_market_buyer_runs_list" },
|
|
16909
17147
|
cli: null,
|
|
16910
|
-
integrationFamilies: families.
|
|
16911
|
-
writes:
|
|
17148
|
+
integrationFamilies: families.active,
|
|
17149
|
+
writes: false
|
|
16912
17150
|
}),
|
|
16913
17151
|
"buyer_direct_invocations.create": operation({
|
|
16914
17152
|
id: "buyer_direct_invocations.create",
|
|
@@ -16923,31 +17161,17 @@ var init_operations = __esm({
|
|
|
16923
17161
|
integrationFamilies: families.direct,
|
|
16924
17162
|
writes: true
|
|
16925
17163
|
}),
|
|
16926
|
-
"
|
|
16927
|
-
id: "
|
|
17164
|
+
"buyer_input_artifacts.prepare": operation({
|
|
17165
|
+
id: "buyer_input_artifacts.prepare",
|
|
16928
17166
|
requiredScope: "agent_market:buyer:invoke",
|
|
16929
|
-
http: http("
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
"Content-Length": positiveIntegerStringSchema,
|
|
16933
|
-
"X-Finch-Content-SHA256": hex32Schema
|
|
16934
|
-
},
|
|
17167
|
+
http: http("post", "/api/v1/agent-market/buyer/offers/{offerId}/input-artifacts", 201, {
|
|
17168
|
+
requestSchema: prepareInputArtifactRequestSchema,
|
|
17169
|
+
responseSchema: prepareInputArtifactResponseSchema,
|
|
16935
17170
|
idempotencyRequired: true
|
|
16936
17171
|
}),
|
|
16937
|
-
mcp: {
|
|
16938
|
-
name: "agent_market_buyer_artifact_upload_base64",
|
|
16939
|
-
sensitiveContentFields: [MCP_ARTIFACT_BASE64_CONTRACT.field],
|
|
16940
|
-
sensitive_content: true,
|
|
16941
|
-
echoSensitiveContent: false,
|
|
16942
|
-
logSensitiveContent: false,
|
|
16943
|
-
compositeInputProperties: {
|
|
16944
|
-
expectedByteLength: positiveIntegerStringSchema,
|
|
16945
|
-
contentSha256: hex32Schema
|
|
16946
|
-
},
|
|
16947
|
-
compositeInputRequired: ["expectedByteLength", "contentSha256"]
|
|
16948
|
-
},
|
|
17172
|
+
mcp: { name: "agent_market_buyer_input_artifact_prepare" },
|
|
16949
17173
|
cli: null,
|
|
16950
|
-
integrationFamilies: families.
|
|
17174
|
+
integrationFamilies: families.agenton,
|
|
16951
17175
|
writes: true
|
|
16952
17176
|
}),
|
|
16953
17177
|
"buyer_artifacts.download": operation({
|
|
@@ -16967,36 +17191,24 @@ var init_operations = __esm({
|
|
|
16967
17191
|
integrationFamilies: families.active,
|
|
16968
17192
|
writes: false
|
|
16969
17193
|
}),
|
|
16970
|
-
"
|
|
16971
|
-
id: "
|
|
16972
|
-
requiredScope: "agent_market:
|
|
16973
|
-
http: http("
|
|
16974
|
-
|
|
16975
|
-
idempotencyRequired: true
|
|
17194
|
+
"buyer_artifact_download_links.create": operation({
|
|
17195
|
+
id: "buyer_artifact_download_links.create",
|
|
17196
|
+
requiredScope: "agent_market:buyer:read",
|
|
17197
|
+
http: http("post", "/api/v1/agent-market/buyer/artifacts/{artifactId}/download-links", 201, {
|
|
17198
|
+
responseSchema: artifactDownloadLinkResponseSchema
|
|
16976
17199
|
}),
|
|
16977
|
-
mcp: {
|
|
16978
|
-
name: "agent_market_artifact_upload_base64",
|
|
16979
|
-
sensitiveContentFields: [MCP_ARTIFACT_BASE64_CONTRACT.field],
|
|
16980
|
-
sensitive_content: true,
|
|
16981
|
-
echoSensitiveContent: false,
|
|
16982
|
-
logSensitiveContent: false
|
|
16983
|
-
},
|
|
17200
|
+
mcp: { name: "agent_market_buyer_artifact_download_link_create" },
|
|
16984
17201
|
cli: null,
|
|
16985
|
-
|
|
17202
|
+
integrationFamilies: families.active,
|
|
17203
|
+
writes: false
|
|
16986
17204
|
}),
|
|
16987
|
-
"
|
|
16988
|
-
id: "
|
|
16989
|
-
requiredScope: "agent_market:merchant:
|
|
16990
|
-
http: http("
|
|
16991
|
-
|
|
17205
|
+
"merchant_avatar_uploads.prepare": operation({
|
|
17206
|
+
id: "merchant_avatar_uploads.prepare",
|
|
17207
|
+
requiredScope: "agent_market:merchant:write",
|
|
17208
|
+
http: http("post", "/api/v1/agent-market/merchant/avatar-uploads", 201, {
|
|
17209
|
+
responseSchema: prepareAvatarUploadResponseSchema
|
|
16992
17210
|
}),
|
|
16993
|
-
mcp: {
|
|
16994
|
-
name: "agent_market_artifact_download_base64",
|
|
16995
|
-
sensitiveContentFields: [MCP_ARTIFACT_BASE64_CONTRACT.field],
|
|
16996
|
-
sensitive_content: true,
|
|
16997
|
-
echoSensitiveContent: false,
|
|
16998
|
-
logSensitiveContent: false
|
|
16999
|
-
},
|
|
17211
|
+
mcp: { name: "agent_market_merchant_avatar_upload_prepare" },
|
|
17000
17212
|
cli: null,
|
|
17001
17213
|
writes: false
|
|
17002
17214
|
}),
|
|
@@ -17086,25 +17298,19 @@ var init_operations = __esm({
|
|
|
17086
17298
|
"merchant_credential_setups.create": "merchant_credential_setups.create",
|
|
17087
17299
|
"merchant_connection_tests.create": "connection_test",
|
|
17088
17300
|
"merchant_publish_intents.create": "publish",
|
|
17089
|
-
"artifacts.upload": "artifacts.upload",
|
|
17090
17301
|
"buyer_purchase_intents.create": "local_purchase",
|
|
17091
17302
|
"buyer_p1_invocations.create": "buyer_p1_invocations.create",
|
|
17092
17303
|
"buyer_p1_invocations.continue": "buyer_p1_invocations.continue",
|
|
17093
17304
|
"buyer_tasks.create": "buyer_tasks.create",
|
|
17094
17305
|
"buyer_tasks.input": "buyer_tasks.input",
|
|
17095
|
-
"buyer_tasks.cancel": "buyer_tasks.cancel",
|
|
17096
17306
|
"buyer_direct_invocations.create": "buyer_direct_invocations.create",
|
|
17097
|
-
"
|
|
17307
|
+
"buyer_input_artifacts.prepare": "buyer_input_artifacts.prepare",
|
|
17098
17308
|
"signing_intents.approve": "signing_approve",
|
|
17099
17309
|
"signing_intents.deny": "signing_deny",
|
|
17100
17310
|
"credential_setups.claim": "credential_claim",
|
|
17101
17311
|
"credential_setups.fulfill": "credential_fulfill"
|
|
17102
17312
|
});
|
|
17103
17313
|
fingerprintSemanticOverrides = Object.freeze({
|
|
17104
|
-
"artifacts.upload": Object.freeze({
|
|
17105
|
-
properties: Object.freeze({ byteLength: positiveIntegerStringSchema, contentSha256: hex32Schema }),
|
|
17106
|
-
required: Object.freeze(["byteLength", "contentSha256"])
|
|
17107
|
-
}),
|
|
17108
17314
|
"credential_setups.claim": Object.freeze({ properties: Object.freeze({}), required: Object.freeze([]) }),
|
|
17109
17315
|
"credential_setups.fulfill": Object.freeze({
|
|
17110
17316
|
variants: Object.freeze([
|
|
@@ -17671,6 +17877,7 @@ var init_v1 = __esm({
|
|
|
17671
17877
|
init_public_catalog_wire();
|
|
17672
17878
|
init_snapshot();
|
|
17673
17879
|
init_testnet_purchase_v1();
|
|
17880
|
+
init_transfers();
|
|
17674
17881
|
init_validation_input();
|
|
17675
17882
|
init_localization();
|
|
17676
17883
|
}
|
|
@@ -33040,80 +33247,92 @@ var init_agent_service = __esm({
|
|
|
33040
33247
|
deployments: {
|
|
33041
33248
|
test: {
|
|
33042
33249
|
enabled: true,
|
|
33043
|
-
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33048
|
-
|
|
33049
|
-
|
|
33050
|
-
|
|
33051
|
-
|
|
33052
|
-
|
|
33053
|
-
|
|
33054
|
-
|
|
33055
|
-
|
|
33056
|
-
|
|
33057
|
-
|
|
33058
|
-
|
|
33059
|
-
|
|
33060
|
-
|
|
33061
|
-
|
|
33062
|
-
|
|
33063
|
-
|
|
33064
|
-
|
|
33065
|
-
|
|
33066
|
-
|
|
33067
|
-
|
|
33068
|
-
|
|
33069
|
-
|
|
33070
|
-
|
|
33071
|
-
|
|
33072
|
-
|
|
33073
|
-
|
|
33074
|
-
|
|
33075
|
-
|
|
33076
|
-
|
|
33250
|
+
defaultChainId: 84532,
|
|
33251
|
+
chains: {
|
|
33252
|
+
"84532": {
|
|
33253
|
+
enabled: true,
|
|
33254
|
+
network: {
|
|
33255
|
+
chainId: 84532,
|
|
33256
|
+
name: "Base Sepolia",
|
|
33257
|
+
explorerUrl: "https://sepolia.basescan.org",
|
|
33258
|
+
defaultRpcUrls: [
|
|
33259
|
+
"https://sepolia.base.org",
|
|
33260
|
+
"https://base-sepolia-rpc.publicnode.com"
|
|
33261
|
+
]
|
|
33262
|
+
},
|
|
33263
|
+
sourceRepository: "FinchipAI/Finch-Agent-Service-Protocol",
|
|
33264
|
+
sourceCommit: "c3066da940945f9bf48d4770a7f89a1e42676771",
|
|
33265
|
+
contracts: {
|
|
33266
|
+
protocol: "0xad9041b2299ffcf01f98cbdb8c053bfad7396d90",
|
|
33267
|
+
vault: "0xd57b21072200c15273617bd13f1e53c9cfacb5fb",
|
|
33268
|
+
vaultImplementation: "0x61669707dcdcd976df19d095bda4a05728e240e0",
|
|
33269
|
+
vaultProxyAdmin: "0xd9d11f658af6f0a056b77b8268f7b2dc840d0b8a",
|
|
33270
|
+
paymentToken: "0x036cbd53842c5426634e7929541ec2318f3dcf7e"
|
|
33271
|
+
},
|
|
33272
|
+
authority: {
|
|
33273
|
+
admin: "0xe2c7b4967df7a83c13e5f504c4f58dbc5a8fd60c",
|
|
33274
|
+
treasury: "0xe2c7b4967df7a83c13e5f504c4f58dbc5a8fd60c",
|
|
33275
|
+
settlementAttestor: "0xe77ec989158829fe2182868d442a8170c9e4e337",
|
|
33276
|
+
refundAttestor: "0xe77ec989158829fe2182868d442a8170c9e4e337",
|
|
33277
|
+
freezeKeeper: "0xe2c7b4967df7a83c13e5f504c4f58dbc5a8fd60c"
|
|
33278
|
+
},
|
|
33279
|
+
deployment: {
|
|
33280
|
+
firstBlock: "45675409",
|
|
33281
|
+
completedBlock: "45675424",
|
|
33282
|
+
confirmations: 2,
|
|
33283
|
+
deploymentHash: "0x974663ec798a69cc5f98f119dcbdd091235424d7ac519cdb878fa0ed8d556c6d"
|
|
33284
|
+
},
|
|
33285
|
+
policy: {
|
|
33286
|
+
paymentTokenSymbol: "USDC",
|
|
33287
|
+
paymentTokenDecimals: 6
|
|
33288
|
+
}
|
|
33289
|
+
}
|
|
33077
33290
|
}
|
|
33078
33291
|
},
|
|
33079
33292
|
production: {
|
|
33080
33293
|
enabled: true,
|
|
33081
|
-
|
|
33082
|
-
|
|
33083
|
-
|
|
33084
|
-
|
|
33085
|
-
|
|
33086
|
-
|
|
33087
|
-
|
|
33088
|
-
|
|
33089
|
-
|
|
33090
|
-
|
|
33091
|
-
|
|
33092
|
-
|
|
33093
|
-
|
|
33094
|
-
|
|
33095
|
-
|
|
33096
|
-
|
|
33097
|
-
|
|
33098
|
-
|
|
33099
|
-
|
|
33100
|
-
|
|
33101
|
-
|
|
33102
|
-
|
|
33103
|
-
|
|
33104
|
-
|
|
33105
|
-
|
|
33106
|
-
|
|
33107
|
-
|
|
33108
|
-
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
|
|
33112
|
-
|
|
33113
|
-
|
|
33114
|
-
|
|
33115
|
-
|
|
33116
|
-
|
|
33294
|
+
defaultChainId: 8453,
|
|
33295
|
+
chains: {
|
|
33296
|
+
"8453": {
|
|
33297
|
+
enabled: true,
|
|
33298
|
+
network: {
|
|
33299
|
+
chainId: 8453,
|
|
33300
|
+
name: "Base",
|
|
33301
|
+
explorerUrl: "https://basescan.org",
|
|
33302
|
+
defaultRpcUrls: [
|
|
33303
|
+
"https://mainnet.base.org",
|
|
33304
|
+
"https://base.drpc.org"
|
|
33305
|
+
]
|
|
33306
|
+
},
|
|
33307
|
+
sourceRepository: "FinchipAI/Finch-Agent-Service-Protocol",
|
|
33308
|
+
sourceCommit: "baf5341d0f14ac43960c13915535d6e466a6c156",
|
|
33309
|
+
contracts: {
|
|
33310
|
+
protocol: "0xe6eca38efc29613cde82d38484620092eaab079d",
|
|
33311
|
+
protocolImplementation: "0x092d79bb2941d53b378b329f8785452c134a84c1",
|
|
33312
|
+
protocolProxyAdmin: "0xc4a54503f3782ebd1e319a104e56e2b4744aa4c0",
|
|
33313
|
+
vault: "0xd2e55cfac96a620f374e581cf43ed522adef4604",
|
|
33314
|
+
vaultImplementation: "0x6e36a58f464d419039808b4fd297419224feafa0",
|
|
33315
|
+
vaultProxyAdmin: "0xd81dbdd22d7ce06a80a310462094c0eede4554fd",
|
|
33316
|
+
paymentToken: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
33317
|
+
},
|
|
33318
|
+
authority: {
|
|
33319
|
+
admin: "0x4fcb985a020dc1dd8a5dfc4adf4606eac4f68075",
|
|
33320
|
+
treasury: "0xc664d467ad91aead3711a140b57fb0e70faeb978",
|
|
33321
|
+
settlementAttestor: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6",
|
|
33322
|
+
refundAttestor: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6",
|
|
33323
|
+
freezeKeeper: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6"
|
|
33324
|
+
},
|
|
33325
|
+
deployment: {
|
|
33326
|
+
firstBlock: "50636410",
|
|
33327
|
+
completedBlock: "50636427",
|
|
33328
|
+
confirmations: 2,
|
|
33329
|
+
deploymentHash: "0x65b6fa11fdf0ad8f20f4f4fedac8986d4b19657e0816fac7238ae94ff0ccd518"
|
|
33330
|
+
},
|
|
33331
|
+
policy: {
|
|
33332
|
+
paymentTokenSymbol: "USDC",
|
|
33333
|
+
paymentTokenDecimals: 6
|
|
33334
|
+
}
|
|
33335
|
+
}
|
|
33117
33336
|
}
|
|
33118
33337
|
}
|
|
33119
33338
|
}
|
|
@@ -33194,7 +33413,8 @@ var init_skill_protocol = __esm({
|
|
|
33194
33413
|
defaultRpcUrls: [
|
|
33195
33414
|
"https://sepolia.base.org",
|
|
33196
33415
|
"https://base-sepolia-rpc.publicnode.com"
|
|
33197
|
-
]
|
|
33416
|
+
],
|
|
33417
|
+
maxLogBlockRange: 1e3
|
|
33198
33418
|
},
|
|
33199
33419
|
sourceRepository: "FinchipAI/finchip-protocol",
|
|
33200
33420
|
sourceCommit: "2944849eabf1f1a8f5ccfd03c2f92502487002db",
|
|
@@ -33367,6 +33587,34 @@ var init_skill_protocol = __esm({
|
|
|
33367
33587
|
factoryFirstBlock: "498556878",
|
|
33368
33588
|
confirmations: 2
|
|
33369
33589
|
}
|
|
33590
|
+
},
|
|
33591
|
+
"43114": {
|
|
33592
|
+
enabled: true,
|
|
33593
|
+
network: {
|
|
33594
|
+
chainId: 43114,
|
|
33595
|
+
name: "Avalanche C-Chain",
|
|
33596
|
+
explorerUrl: "https://snowtrace.io",
|
|
33597
|
+
defaultRpcUrls: [
|
|
33598
|
+
"https://api.avax.network/ext/bc/C/rpc",
|
|
33599
|
+
"https://avalanche-c-chain-rpc.publicnode.com"
|
|
33600
|
+
]
|
|
33601
|
+
},
|
|
33602
|
+
sourceRepository: "FinchipAI/finchip-protocol",
|
|
33603
|
+
sourceCommit: "61982867d271ea9ebf0730b1a650bee1b9894642",
|
|
33604
|
+
abiSourceCommit: "61982867d271ea9ebf0730b1a650bee1b9894642",
|
|
33605
|
+
contracts: {
|
|
33606
|
+
skillToken: "0xcb19ea4fa56c3fc0c03892ec4b76e546572ba2b8",
|
|
33607
|
+
revenueRight: "0x0f9b050b69cd0361ab3baed1adff4a7faa709fbc",
|
|
33608
|
+
skillInstance: "0x1a111ef24408805b76913e03d6765a9be3313c6e",
|
|
33609
|
+
skillFactory: "0x6f75930c9631c77d88e979ad98a209fb896e9764",
|
|
33610
|
+
skillMarket: "0x200e39cb510a36a5b6d26efba61993af0aab70cf",
|
|
33611
|
+
feeRouter: "0xe520cd670add2f8813e3c76bd69a033c5cfa5b92"
|
|
33612
|
+
},
|
|
33613
|
+
deployment: {
|
|
33614
|
+
firstBlock: "96438446",
|
|
33615
|
+
factoryFirstBlock: "96438471",
|
|
33616
|
+
confirmations: 2
|
|
33617
|
+
}
|
|
33370
33618
|
}
|
|
33371
33619
|
}
|
|
33372
33620
|
}
|
|
@@ -33385,81 +33633,93 @@ var init_task_protocol = __esm({
|
|
|
33385
33633
|
deployments: {
|
|
33386
33634
|
test: {
|
|
33387
33635
|
enabled: true,
|
|
33388
|
-
|
|
33389
|
-
|
|
33390
|
-
|
|
33391
|
-
|
|
33392
|
-
|
|
33393
|
-
|
|
33394
|
-
|
|
33395
|
-
|
|
33396
|
-
|
|
33397
|
-
|
|
33398
|
-
|
|
33399
|
-
|
|
33400
|
-
|
|
33401
|
-
|
|
33402
|
-
|
|
33403
|
-
|
|
33404
|
-
|
|
33405
|
-
|
|
33406
|
-
|
|
33407
|
-
|
|
33408
|
-
|
|
33409
|
-
|
|
33410
|
-
|
|
33411
|
-
|
|
33412
|
-
|
|
33413
|
-
|
|
33414
|
-
|
|
33415
|
-
|
|
33416
|
-
|
|
33417
|
-
|
|
33418
|
-
|
|
33419
|
-
|
|
33420
|
-
|
|
33421
|
-
|
|
33422
|
-
|
|
33636
|
+
defaultChainId: 84532,
|
|
33637
|
+
chains: {
|
|
33638
|
+
"84532": {
|
|
33639
|
+
enabled: true,
|
|
33640
|
+
network: {
|
|
33641
|
+
chainId: 84532,
|
|
33642
|
+
name: "Base Sepolia",
|
|
33643
|
+
explorerUrl: "https://sepolia.basescan.org",
|
|
33644
|
+
defaultRpcUrls: [
|
|
33645
|
+
"https://sepolia.base.org",
|
|
33646
|
+
"https://base-sepolia-rpc.publicnode.com"
|
|
33647
|
+
]
|
|
33648
|
+
},
|
|
33649
|
+
sourceRepository: "FinchipAI/Finch-Task-Protocol",
|
|
33650
|
+
sourceCommit: "ae220fa6866c95330472ea7aa50a1d46260231c8",
|
|
33651
|
+
abiSourceCommit: "c4491b8fe85a09840c5873bc6ac142c580febd32",
|
|
33652
|
+
vaultSourceCommit: "c4491b8fe85a09840c5873bc6ac142c580febd32",
|
|
33653
|
+
contracts: {
|
|
33654
|
+
protocol: "0x233f2cb1d7b46c4e2422336b4430b556b53b8749",
|
|
33655
|
+
vault: "0x0a4fa1147b46cef51e5c8775ecbb6324e229a94d",
|
|
33656
|
+
vaultImplementation: "0x344e84544e52601a83260ba48b0215ad0c28c1cf",
|
|
33657
|
+
vaultProxyAdmin: "0xdddaa163dc4789150db52e7c89f3001f11ff2c12",
|
|
33658
|
+
paymentToken: "0x036cbd53842c5426634e7929541ec2318f3dcf7e"
|
|
33659
|
+
},
|
|
33660
|
+
authority: {
|
|
33661
|
+
admin: "0xc93c26eeac4aeb8d6c756e5d55a67baa9f83992c",
|
|
33662
|
+
treasury: "0xc93c26eeac4aeb8d6c756e5d55a67baa9f83992c",
|
|
33663
|
+
awardAttestor: "0xc3322f290d00270fde207600eb064fc7852ac122",
|
|
33664
|
+
creditGranter: "0x6f49129455e6edafe1e4c37045bc1bbe6906ea3b",
|
|
33665
|
+
freezeKeeper: "0xfb6739091592b38cbca76dfab5dab739b39accb8"
|
|
33666
|
+
},
|
|
33667
|
+
deployment: {
|
|
33668
|
+
firstBlock: "45763543",
|
|
33669
|
+
completedBlock: "45763543",
|
|
33670
|
+
confirmations: 1
|
|
33671
|
+
},
|
|
33672
|
+
policy: {
|
|
33673
|
+
paymentTokenSymbol: "USDC",
|
|
33674
|
+
paymentTokenDecimals: 6
|
|
33675
|
+
}
|
|
33676
|
+
}
|
|
33423
33677
|
}
|
|
33424
33678
|
},
|
|
33425
33679
|
production: {
|
|
33426
33680
|
enabled: true,
|
|
33427
|
-
|
|
33428
|
-
|
|
33429
|
-
|
|
33430
|
-
|
|
33431
|
-
|
|
33432
|
-
|
|
33433
|
-
|
|
33434
|
-
|
|
33435
|
-
|
|
33436
|
-
|
|
33437
|
-
|
|
33438
|
-
|
|
33439
|
-
|
|
33440
|
-
|
|
33441
|
-
|
|
33442
|
-
|
|
33443
|
-
|
|
33444
|
-
|
|
33445
|
-
|
|
33446
|
-
|
|
33447
|
-
|
|
33448
|
-
|
|
33449
|
-
|
|
33450
|
-
|
|
33451
|
-
|
|
33452
|
-
|
|
33453
|
-
|
|
33454
|
-
|
|
33455
|
-
|
|
33456
|
-
|
|
33457
|
-
|
|
33458
|
-
|
|
33459
|
-
|
|
33460
|
-
|
|
33461
|
-
|
|
33462
|
-
|
|
33681
|
+
defaultChainId: 8453,
|
|
33682
|
+
chains: {
|
|
33683
|
+
"8453": {
|
|
33684
|
+
enabled: true,
|
|
33685
|
+
network: {
|
|
33686
|
+
chainId: 8453,
|
|
33687
|
+
name: "Base",
|
|
33688
|
+
explorerUrl: "https://basescan.org",
|
|
33689
|
+
defaultRpcUrls: [
|
|
33690
|
+
"https://mainnet.base.org",
|
|
33691
|
+
"https://base.drpc.org"
|
|
33692
|
+
]
|
|
33693
|
+
},
|
|
33694
|
+
sourceRepository: "FinchipAI/Finch-Task-Protocol",
|
|
33695
|
+
sourceCommit: "456624f9a46af94d39a77dc60955f51695607fbb",
|
|
33696
|
+
abiSourceCommit: "c4491b8fe85a09840c5873bc6ac142c580febd32",
|
|
33697
|
+
contracts: {
|
|
33698
|
+
protocol: "0x5e80c59c8d369b3b36f2e809fcc99e1ee67d4eb0",
|
|
33699
|
+
protocolImplementation: "0x75e2485205a222a6a43470093a99a0330b41104c",
|
|
33700
|
+
protocolProxyAdmin: "0x081e42d65da9c7a82bd31de942b01a5b9584b743",
|
|
33701
|
+
vault: "0xddbf3b1d7df7e2ba1655b4895d228a1bed8a1f99",
|
|
33702
|
+
vaultImplementation: "0xd0d882588228db944b599eb7eabf841343644ae5",
|
|
33703
|
+
vaultProxyAdmin: "0x6e90e5a4ed8a1e4db13fac9606c5867c4e48a896",
|
|
33704
|
+
paymentToken: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
|
|
33705
|
+
},
|
|
33706
|
+
authority: {
|
|
33707
|
+
admin: "0x4fcb985a020dc1dd8a5dfc4adf4606eac4f68075",
|
|
33708
|
+
treasury: "0xc664d467ad91aead3711a140b57fb0e70faeb978",
|
|
33709
|
+
awardAttestor: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6",
|
|
33710
|
+
creditGranter: "0x1cf667f5d7075cab21fcc0497c469e7fe492b394",
|
|
33711
|
+
freezeKeeper: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6"
|
|
33712
|
+
},
|
|
33713
|
+
deployment: {
|
|
33714
|
+
firstBlock: "50517972",
|
|
33715
|
+
completedBlock: "50518702",
|
|
33716
|
+
confirmations: 2
|
|
33717
|
+
},
|
|
33718
|
+
policy: {
|
|
33719
|
+
paymentTokenSymbol: "USDC",
|
|
33720
|
+
paymentTokenDecimals: 6
|
|
33721
|
+
}
|
|
33722
|
+
}
|
|
33463
33723
|
}
|
|
33464
33724
|
}
|
|
33465
33725
|
}
|
|
@@ -33483,6 +33743,21 @@ function parseTypedRegistry(schema5, value) {
|
|
|
33483
33743
|
}
|
|
33484
33744
|
return parsed2.data;
|
|
33485
33745
|
}
|
|
33746
|
+
function clientDeploymentsByChain(protocol, deployments) {
|
|
33747
|
+
const byChain = {};
|
|
33748
|
+
for (const environment3 of ["test", "production"]) {
|
|
33749
|
+
const deployment = deployments[environment3];
|
|
33750
|
+
if (!deployment.enabled || !deployment.chains) continue;
|
|
33751
|
+
for (const key of Object.keys(deployment.chains)) {
|
|
33752
|
+
const chainId = Number(key);
|
|
33753
|
+
if (byChain[chainId]) {
|
|
33754
|
+
throw new DeploymentManifestError(`${protocol} lists chain ${chainId} in both test and production.`);
|
|
33755
|
+
}
|
|
33756
|
+
byChain[chainId] = environment3;
|
|
33757
|
+
}
|
|
33758
|
+
}
|
|
33759
|
+
return Object.freeze(byChain);
|
|
33760
|
+
}
|
|
33486
33761
|
function activeDeployment(protocol, deployments, environment3) {
|
|
33487
33762
|
if (environment3 === "local") {
|
|
33488
33763
|
throw new DeploymentManifestError(
|
|
@@ -33495,15 +33770,27 @@ function activeDeployment(protocol, deployments, environment3) {
|
|
|
33495
33770
|
}
|
|
33496
33771
|
return deployment;
|
|
33497
33772
|
}
|
|
33773
|
+
function chainOf(protocol, deployments, environment3, chainId) {
|
|
33774
|
+
const selected = chainId ?? deployments.defaultChainId;
|
|
33775
|
+
const value = deployments.chains[String(selected)];
|
|
33776
|
+
if (!value) {
|
|
33777
|
+
throw new DeploymentManifestError(
|
|
33778
|
+
`${protocol} is not deployed to chain ${selected} in ${environment3}. Deployed: ${Object.keys(deployments.chains).join(", ")}.`
|
|
33779
|
+
);
|
|
33780
|
+
}
|
|
33781
|
+
return value;
|
|
33782
|
+
}
|
|
33783
|
+
function sortedChainIds(chains) {
|
|
33784
|
+
return Object.freeze(Object.keys(chains).map(Number).sort((left, right) => left - right));
|
|
33785
|
+
}
|
|
33498
33786
|
function isTaskProtocolDeploymentEnabled(environment3) {
|
|
33499
33787
|
return environment3 !== "local" && taskRegistry.deployments[environment3].enabled;
|
|
33500
33788
|
}
|
|
33501
|
-
function
|
|
33502
|
-
|
|
33503
|
-
|
|
33504
|
-
|
|
33505
|
-
|
|
33506
|
-
);
|
|
33789
|
+
function agentEnvironment(environment3) {
|
|
33790
|
+
return activeDeployment(agentRegistry.protocol, agentRegistry.deployments, environment3);
|
|
33791
|
+
}
|
|
33792
|
+
function getAgentServiceDeployment(environment3, chainId) {
|
|
33793
|
+
const value = chainOf(agentRegistry.protocol, agentEnvironment(environment3), environment3, chainId);
|
|
33507
33794
|
return Object.freeze({
|
|
33508
33795
|
chainId: value.network.chainId,
|
|
33509
33796
|
networkName: value.network.name,
|
|
@@ -33529,16 +33816,13 @@ function getAgentServiceDeployment(environment3) {
|
|
|
33529
33816
|
function getAgentServiceDeploymentByChainId(chainId) {
|
|
33530
33817
|
const selected = AGENT_CLIENT_DEPLOYMENT_BY_CHAIN[chainId];
|
|
33531
33818
|
if (!selected) throw new DeploymentManifestError(`agent_service_v0 has no reviewed custody authority for chain ${chainId}.`);
|
|
33532
|
-
|
|
33533
|
-
if (deployment.chainId !== chainId) throw new DeploymentManifestError(`agent_service_v0 custody catalogue is stale for chain ${chainId}.`);
|
|
33534
|
-
return deployment;
|
|
33819
|
+
return getAgentServiceDeployment(selected, chainId);
|
|
33535
33820
|
}
|
|
33536
|
-
function
|
|
33537
|
-
|
|
33538
|
-
|
|
33539
|
-
|
|
33540
|
-
|
|
33541
|
-
);
|
|
33821
|
+
function taskEnvironment(environment3) {
|
|
33822
|
+
return activeDeployment(taskRegistry.protocol, taskRegistry.deployments, environment3);
|
|
33823
|
+
}
|
|
33824
|
+
function getTaskProtocolDeployment(environment3, chainId) {
|
|
33825
|
+
const value = chainOf(taskRegistry.protocol, taskEnvironment(environment3), environment3, chainId);
|
|
33542
33826
|
return Object.freeze({
|
|
33543
33827
|
chainId: value.network.chainId,
|
|
33544
33828
|
protocolAddress: value.contracts.protocol,
|
|
@@ -33564,9 +33848,7 @@ function getTaskProtocolDeployment(environment3) {
|
|
|
33564
33848
|
function getTaskProtocolDeploymentByChainId(chainId) {
|
|
33565
33849
|
const selected = TASK_CLIENT_DEPLOYMENT_BY_CHAIN[chainId];
|
|
33566
33850
|
if (!selected) throw new DeploymentManifestError(`task_protocol_v0 has no reviewed custody authority for chain ${chainId}.`);
|
|
33567
|
-
|
|
33568
|
-
if (deployment.chainId !== chainId) throw new DeploymentManifestError(`task_protocol_v0 custody catalogue is stale for chain ${chainId}.`);
|
|
33569
|
-
return deployment;
|
|
33851
|
+
return getTaskProtocolDeployment(selected, chainId);
|
|
33570
33852
|
}
|
|
33571
33853
|
function skillEnvironment(environment3) {
|
|
33572
33854
|
return activeDeployment(
|
|
@@ -33576,22 +33858,13 @@ function skillEnvironment(environment3) {
|
|
|
33576
33858
|
);
|
|
33577
33859
|
}
|
|
33578
33860
|
function getSkillProtocolChainIds(environment3) {
|
|
33579
|
-
return
|
|
33580
|
-
Object.keys(skillEnvironment(environment3).chains).map(Number).sort((a, b) => a - b)
|
|
33581
|
-
);
|
|
33861
|
+
return sortedChainIds(skillEnvironment(environment3).chains);
|
|
33582
33862
|
}
|
|
33583
33863
|
function getSkillProtocolDefaultChainId(environment3) {
|
|
33584
33864
|
return skillEnvironment(environment3).defaultChainId;
|
|
33585
33865
|
}
|
|
33586
33866
|
function getSkillProtocolDeployment(environment3, chainId) {
|
|
33587
|
-
const
|
|
33588
|
-
const selected = chainId ?? deployments.defaultChainId;
|
|
33589
|
-
const value = deployments.chains[String(selected)];
|
|
33590
|
-
if (!value) {
|
|
33591
|
-
throw new DeploymentManifestError(
|
|
33592
|
-
`${skillRegistry.protocol} is not deployed to chain ${selected} in ${environment3}. Deployed: ${Object.keys(deployments.chains).join(", ")}.`
|
|
33593
|
-
);
|
|
33594
|
-
}
|
|
33867
|
+
const value = chainOf(skillRegistry.protocol, skillEnvironment(environment3), environment3, chainId);
|
|
33595
33868
|
return Object.freeze({
|
|
33596
33869
|
chainId: value.network.chainId,
|
|
33597
33870
|
explorerUrl: value.network.explorerUrl,
|
|
@@ -33619,7 +33892,35 @@ function getSkillProtocolDeploymentByChainId(chainId) {
|
|
|
33619
33892
|
function getAllSkillProtocolChainIds() {
|
|
33620
33893
|
return Object.freeze(Object.keys(SKILL_CLIENT_DEPLOYMENT_BY_CHAIN).map(Number).sort((left, right) => left - right));
|
|
33621
33894
|
}
|
|
33622
|
-
|
|
33895
|
+
function reviewedNetworks(environment3) {
|
|
33896
|
+
const selected = environment3 === "local" ? "test" : environment3;
|
|
33897
|
+
const byChain = /* @__PURE__ */ new Map();
|
|
33898
|
+
const sources = [skillRegistry.deployments[selected], taskRegistry.deployments[selected], agentRegistry.deployments[selected]];
|
|
33899
|
+
for (const deployment of sources) {
|
|
33900
|
+
if (!deployment.enabled) continue;
|
|
33901
|
+
for (const entry2 of Object.values(deployment.chains)) {
|
|
33902
|
+
const { chainId, name, explorerUrl, defaultRpcUrls } = entry2.network;
|
|
33903
|
+
const known = byChain.get(chainId);
|
|
33904
|
+
if (!known) {
|
|
33905
|
+
byChain.set(chainId, { name, explorerUrl, urls: [...defaultRpcUrls] });
|
|
33906
|
+
continue;
|
|
33907
|
+
}
|
|
33908
|
+
if (known.explorerUrl !== explorerUrl) {
|
|
33909
|
+
throw new DeploymentManifestError(
|
|
33910
|
+
`Chain ${chainId} has two explorers in ${selected}: ${known.explorerUrl} and ${explorerUrl}.`
|
|
33911
|
+
);
|
|
33912
|
+
}
|
|
33913
|
+
for (const url2 of defaultRpcUrls) if (!known.urls.includes(url2)) known.urls.push(url2);
|
|
33914
|
+
}
|
|
33915
|
+
}
|
|
33916
|
+
return new Map([...byChain].map(([chainId, value]) => [chainId, Object.freeze({
|
|
33917
|
+
chainId,
|
|
33918
|
+
name: value.name,
|
|
33919
|
+
explorerUrl: value.explorerUrl,
|
|
33920
|
+
defaultRpcUrls: Object.freeze([...value.urls])
|
|
33921
|
+
})]));
|
|
33922
|
+
}
|
|
33923
|
+
var canonicalAddressSchema, hashSchema, commitSchema, positiveDecimalSchema, DEFAULT_LOG_BLOCK_RANGE, DEFAULT_CONCURRENT_REQUESTS, networkSchema, publicRpcUrlsSchema, legacySkillIndexerChainSchema, legacySkillIndexerRegistrySchema, sourceSchema, disabledDeploymentSchema, deploymentsShape, agentActiveSchema, taskActiveSchema, skillActiveSchema, multiChainEnvironmentSchema, agentEnvironmentSchema, taskEnvironmentSchema, skillEnvironmentSchema, agentRegistrySchema, taskRegistrySchema, skillRegistrySchema, registrySchema, agentRegistry, taskRegistry, skillRegistry, legacySkillIndexerRegistry, AGENT_CLIENT_DEPLOYMENT_BY_CHAIN, TASK_CLIENT_DEPLOYMENT_BY_CHAIN, SKILL_CLIENT_DEPLOYMENT_BY_CHAIN, REVIEWED_NETWORKS;
|
|
33623
33924
|
var init_chains = __esm({
|
|
33624
33925
|
"../../packages/deployment-manifest/src/chains/index.ts"() {
|
|
33625
33926
|
"use strict";
|
|
@@ -33827,31 +34128,20 @@ var init_chains = __esm({
|
|
|
33827
34128
|
context.addIssue({ code: "custom", message: "firstBlock must not exceed factoryFirstBlock." });
|
|
33828
34129
|
}
|
|
33829
34130
|
});
|
|
33830
|
-
|
|
33831
|
-
schemaVersion: external_exports.literal(1),
|
|
33832
|
-
protocol: external_exports.literal("agent_service_v0"),
|
|
33833
|
-
deployments: deploymentsShape(agentActiveSchema)
|
|
33834
|
-
});
|
|
33835
|
-
taskRegistrySchema = external_exports.strictObject({
|
|
33836
|
-
schemaVersion: external_exports.literal(1),
|
|
33837
|
-
protocol: external_exports.literal("task_protocol_v0"),
|
|
33838
|
-
deployments: deploymentsShape(taskActiveSchema)
|
|
33839
|
-
});
|
|
33840
|
-
skillEnvironmentSchema = external_exports.strictObject({
|
|
34131
|
+
multiChainEnvironmentSchema = (label, chain) => external_exports.strictObject({
|
|
33841
34132
|
enabled: external_exports.literal(true),
|
|
33842
|
-
/** Where publishing lands, and what an unqualified read resolves against. */
|
|
33843
34133
|
defaultChainId: external_exports.number().int().positive(),
|
|
33844
|
-
chains: external_exports.record(external_exports.string().regex(/^[1-9][0-9]*$/u),
|
|
34134
|
+
chains: external_exports.record(external_exports.string().regex(/^[1-9][0-9]*$/u), chain)
|
|
33845
34135
|
}).superRefine((value, context) => {
|
|
33846
34136
|
const ids = Object.keys(value.chains);
|
|
33847
34137
|
if (ids.length === 0) {
|
|
33848
|
-
context.addIssue({ code: "custom", message:
|
|
34138
|
+
context.addIssue({ code: "custom", message: `An enabled ${label} environment must list at least one chain.` });
|
|
33849
34139
|
}
|
|
33850
|
-
for (const [key,
|
|
33851
|
-
if (Number(key) !==
|
|
34140
|
+
for (const [key, entry2] of Object.entries(value.chains)) {
|
|
34141
|
+
if (Number(key) !== entry2.network.chainId) {
|
|
33852
34142
|
context.addIssue({
|
|
33853
34143
|
code: "custom",
|
|
33854
|
-
message:
|
|
34144
|
+
message: `${label} chain key ${key} does not match its network.chainId ${entry2.network.chainId}.`
|
|
33855
34145
|
});
|
|
33856
34146
|
}
|
|
33857
34147
|
}
|
|
@@ -33862,6 +34152,19 @@ var init_chains = __esm({
|
|
|
33862
34152
|
});
|
|
33863
34153
|
}
|
|
33864
34154
|
});
|
|
34155
|
+
agentEnvironmentSchema = multiChainEnvironmentSchema("Agent Service", agentActiveSchema);
|
|
34156
|
+
taskEnvironmentSchema = multiChainEnvironmentSchema("Task", taskActiveSchema);
|
|
34157
|
+
skillEnvironmentSchema = multiChainEnvironmentSchema("Skill", skillActiveSchema);
|
|
34158
|
+
agentRegistrySchema = external_exports.strictObject({
|
|
34159
|
+
schemaVersion: external_exports.literal(1),
|
|
34160
|
+
protocol: external_exports.literal("agent_service_v0"),
|
|
34161
|
+
deployments: deploymentsShape(agentEnvironmentSchema)
|
|
34162
|
+
});
|
|
34163
|
+
taskRegistrySchema = external_exports.strictObject({
|
|
34164
|
+
schemaVersion: external_exports.literal(1),
|
|
34165
|
+
protocol: external_exports.literal("task_protocol_v0"),
|
|
34166
|
+
deployments: deploymentsShape(taskEnvironmentSchema)
|
|
34167
|
+
});
|
|
33865
34168
|
skillRegistrySchema = external_exports.strictObject({
|
|
33866
34169
|
schemaVersion: external_exports.literal(1),
|
|
33867
34170
|
protocol: external_exports.literal("skill_protocol_v3"),
|
|
@@ -33879,22 +34182,21 @@ var init_chains = __esm({
|
|
|
33879
34182
|
legacySkillIndexerRegistrySchema,
|
|
33880
34183
|
legacy_skill_indexer_default
|
|
33881
34184
|
);
|
|
33882
|
-
AGENT_CLIENT_DEPLOYMENT_BY_CHAIN =
|
|
33883
|
-
|
|
33884
|
-
84532: "test"
|
|
33885
|
-
});
|
|
33886
|
-
TASK_CLIENT_DEPLOYMENT_BY_CHAIN = Object.freeze({
|
|
33887
|
-
8453: "production",
|
|
33888
|
-
84532: "test"
|
|
33889
|
-
});
|
|
34185
|
+
AGENT_CLIENT_DEPLOYMENT_BY_CHAIN = clientDeploymentsByChain(agentRegistry.protocol, agentRegistry.deployments);
|
|
34186
|
+
TASK_CLIENT_DEPLOYMENT_BY_CHAIN = clientDeploymentsByChain(taskRegistry.protocol, taskRegistry.deployments);
|
|
33890
34187
|
SKILL_CLIENT_DEPLOYMENT_BY_CHAIN = Object.freeze({
|
|
33891
34188
|
1: "production",
|
|
33892
34189
|
10: "production",
|
|
33893
34190
|
56: "production",
|
|
33894
34191
|
8453: "production",
|
|
33895
34192
|
42161: "production",
|
|
34193
|
+
43114: "production",
|
|
33896
34194
|
84532: "test"
|
|
33897
34195
|
});
|
|
34196
|
+
REVIEWED_NETWORKS = Object.freeze({
|
|
34197
|
+
test: reviewedNetworks("test"),
|
|
34198
|
+
production: reviewedNetworks("production")
|
|
34199
|
+
});
|
|
33898
34200
|
}
|
|
33899
34201
|
});
|
|
33900
34202
|
|
|
@@ -34039,12 +34341,15 @@ var internal_apps_default;
|
|
|
34039
34341
|
var init_internal_apps = __esm({
|
|
34040
34342
|
"../../packages/deployment-manifest/src/platform/internal-apps.json"() {
|
|
34041
34343
|
internal_apps_default = {
|
|
34042
|
-
schemaVersion:
|
|
34344
|
+
schemaVersion: 2,
|
|
34043
34345
|
kind: "internal_apps",
|
|
34044
34346
|
environments: {
|
|
34045
34347
|
local: {
|
|
34046
34348
|
data: {
|
|
34047
|
-
sessionTtlSeconds: 28800
|
|
34349
|
+
sessionTtlSeconds: 28800,
|
|
34350
|
+
queryAgentEnabled: true,
|
|
34351
|
+
aiBaseUrl: "https://api.tokenrouter.com/v1",
|
|
34352
|
+
aiModel: "xiaomi/mimo-v2.6-flash"
|
|
34048
34353
|
},
|
|
34049
34354
|
ops: {
|
|
34050
34355
|
sessionTtlSeconds: 28800,
|
|
@@ -34053,7 +34358,10 @@ var init_internal_apps = __esm({
|
|
|
34053
34358
|
},
|
|
34054
34359
|
test: {
|
|
34055
34360
|
data: {
|
|
34056
|
-
sessionTtlSeconds: 28800
|
|
34361
|
+
sessionTtlSeconds: 28800,
|
|
34362
|
+
queryAgentEnabled: true,
|
|
34363
|
+
aiBaseUrl: "https://api.tokenrouter.com/v1",
|
|
34364
|
+
aiModel: "xiaomi/mimo-v2.6-flash"
|
|
34057
34365
|
},
|
|
34058
34366
|
ops: {
|
|
34059
34367
|
sessionTtlSeconds: 28800,
|
|
@@ -34062,7 +34370,10 @@ var init_internal_apps = __esm({
|
|
|
34062
34370
|
},
|
|
34063
34371
|
production: {
|
|
34064
34372
|
data: {
|
|
34065
|
-
sessionTtlSeconds: 28800
|
|
34373
|
+
sessionTtlSeconds: 28800,
|
|
34374
|
+
queryAgentEnabled: false,
|
|
34375
|
+
aiBaseUrl: "https://api.tokenrouter.com/v1",
|
|
34376
|
+
aiModel: "xiaomi/mimo-v2.6-flash"
|
|
34066
34377
|
},
|
|
34067
34378
|
ops: {
|
|
34068
34379
|
sessionTtlSeconds: 28800,
|
|
@@ -34141,6 +34452,15 @@ var init_skill_delivery = __esm({
|
|
|
34141
34452
|
pkpId: "0xdf87a5d625926cedc0ad0ef74888adb643936f25",
|
|
34142
34453
|
groupId: 1
|
|
34143
34454
|
}
|
|
34455
|
+
},
|
|
34456
|
+
"43114": {
|
|
34457
|
+
chainId: 43114,
|
|
34458
|
+
chainTag: "avalanche",
|
|
34459
|
+
lit: {
|
|
34460
|
+
provider: "chipotle",
|
|
34461
|
+
pkpId: "0xdf87a5d625926cedc0ad0ef74888adb643936f25",
|
|
34462
|
+
groupId: 1
|
|
34463
|
+
}
|
|
34144
34464
|
}
|
|
34145
34465
|
}
|
|
34146
34466
|
}
|
|
@@ -34304,6 +34624,31 @@ var init_merchant_avatar_video2 = __esm({
|
|
|
34304
34624
|
}
|
|
34305
34625
|
});
|
|
34306
34626
|
|
|
34627
|
+
// ../../packages/deployment-manifest/src/platform/generator.json
|
|
34628
|
+
var generator_default;
|
|
34629
|
+
var init_generator = __esm({
|
|
34630
|
+
"../../packages/deployment-manifest/src/platform/generator.json"() {
|
|
34631
|
+
generator_default = {
|
|
34632
|
+
schemaVersion: 1,
|
|
34633
|
+
kind: "generator",
|
|
34634
|
+
provider: { endpoint: "https://api.tokenrouter.com/v1", model: "openai/gpt-6-luna" },
|
|
34635
|
+
environments: { local: { enabled: true }, test: { enabled: true }, production: { enabled: false } }
|
|
34636
|
+
};
|
|
34637
|
+
}
|
|
34638
|
+
});
|
|
34639
|
+
|
|
34640
|
+
// ../../packages/deployment-manifest/src/platform/generator.ts
|
|
34641
|
+
var policy3, manifest4;
|
|
34642
|
+
var init_generator2 = __esm({
|
|
34643
|
+
"../../packages/deployment-manifest/src/platform/generator.ts"() {
|
|
34644
|
+
"use strict";
|
|
34645
|
+
init_zod();
|
|
34646
|
+
init_generator();
|
|
34647
|
+
policy3 = external_exports.strictObject({ enabled: external_exports.boolean() });
|
|
34648
|
+
manifest4 = external_exports.strictObject({ schemaVersion: external_exports.literal(1), kind: external_exports.literal("generator"), provider: external_exports.strictObject({ endpoint: external_exports.literal("https://api.tokenrouter.com/v1"), model: external_exports.literal("openai/gpt-6-luna") }), environments: external_exports.strictObject({ local: policy3, test: policy3, production: policy3 }) }).parse(generator_default);
|
|
34649
|
+
}
|
|
34650
|
+
});
|
|
34651
|
+
|
|
34307
34652
|
// ../../packages/deployment-manifest/src/platform/index.ts
|
|
34308
34653
|
function parseManifest2(label, schema5, value) {
|
|
34309
34654
|
const parsed2 = schema5.safeParse(value);
|
|
@@ -34341,7 +34686,7 @@ function getSkillDeliveryDeployment(environment3, chainId) {
|
|
|
34341
34686
|
});
|
|
34342
34687
|
}
|
|
34343
34688
|
function getSkillDeliveryDeploymentByChainId(chainId) {
|
|
34344
|
-
const environment3 = chainId === 84532 ? "test" : [1, 10, 56, 8453, 42161].includes(chainId) ? "production" : void 0;
|
|
34689
|
+
const environment3 = chainId === 84532 ? "test" : [1, 10, 56, 8453, 42161, 43114].includes(chainId) ? "production" : void 0;
|
|
34345
34690
|
if (!environment3) throw new DeploymentManifestError(`Skill delivery has no reviewed binding for chain ${chainId}.`);
|
|
34346
34691
|
return getSkillDeliveryDeployment(environment3, chainId);
|
|
34347
34692
|
}
|
|
@@ -34361,18 +34706,26 @@ var init_platform = __esm({
|
|
|
34361
34706
|
init_task_platform();
|
|
34362
34707
|
init_agenton_payout2();
|
|
34363
34708
|
init_merchant_avatar_video2();
|
|
34709
|
+
init_generator2();
|
|
34364
34710
|
internalAppSchema = external_exports.strictObject({
|
|
34365
34711
|
sessionTtlSeconds: external_exports.number().int().min(60).max(24 * 60 * 60)
|
|
34366
34712
|
});
|
|
34367
34713
|
internalAppsEnvironmentSchema = external_exports.strictObject({
|
|
34368
|
-
data: internalAppSchema
|
|
34714
|
+
data: internalAppSchema.extend({
|
|
34715
|
+
queryAgentEnabled: external_exports.boolean(),
|
|
34716
|
+
aiBaseUrl: external_exports.url().refine((value) => {
|
|
34717
|
+
const url2 = new URL(value);
|
|
34718
|
+
return url2.protocol === "https:" && !url2.username && !url2.password && !url2.search && !url2.hash;
|
|
34719
|
+
}, "The AI base URL must be HTTPS without credentials, query or fragment."),
|
|
34720
|
+
aiModel: external_exports.string().trim().min(1).max(200)
|
|
34721
|
+
}),
|
|
34369
34722
|
ops: internalAppSchema.extend({ webOrigin: external_exports.url().refine((value) => {
|
|
34370
34723
|
const url2 = new URL(value);
|
|
34371
34724
|
return url2.origin === value && (url2.protocol === "https:" || value === "http://localhost:3000");
|
|
34372
34725
|
}, "An exact reviewed Web origin is required.") })
|
|
34373
34726
|
});
|
|
34374
34727
|
internalAppsManifestSchema = external_exports.strictObject({
|
|
34375
|
-
schemaVersion: external_exports.literal(
|
|
34728
|
+
schemaVersion: external_exports.literal(2),
|
|
34376
34729
|
kind: external_exports.literal("internal_apps"),
|
|
34377
34730
|
environments: external_exports.strictObject({
|
|
34378
34731
|
local: internalAppsEnvironmentSchema,
|
|
@@ -34422,7 +34775,7 @@ var init_platform = __esm({
|
|
|
34422
34775
|
});
|
|
34423
34776
|
skillDeliveryBindingSchema = external_exports.strictObject({
|
|
34424
34777
|
chainId: external_exports.number().int().positive(),
|
|
34425
|
-
chainTag: external_exports.enum(["base", "baseSepolia", "ethereum", "optimism", "bsc", "arbitrum"]),
|
|
34778
|
+
chainTag: external_exports.enum(["base", "baseSepolia", "ethereum", "optimism", "bsc", "arbitrum", "avalanche"]),
|
|
34426
34779
|
lit: external_exports.strictObject({
|
|
34427
34780
|
provider: external_exports.literal("chipotle"),
|
|
34428
34781
|
pkpId: external_exports.string().min(1).max(512),
|
|
@@ -61028,6 +61381,40 @@ var init_arbitrum = __esm({
|
|
|
61028
61381
|
}
|
|
61029
61382
|
});
|
|
61030
61383
|
|
|
61384
|
+
// ../../node_modules/.pnpm/viem@2.55.15_bufferutil@4.1_ce20031be19c56210207d462110a7a29/node_modules/viem/_esm/chains/definitions/avalanche.js
|
|
61385
|
+
var avalanche;
|
|
61386
|
+
var init_avalanche = __esm({
|
|
61387
|
+
"../../node_modules/.pnpm/viem@2.55.15_bufferutil@4.1_ce20031be19c56210207d462110a7a29/node_modules/viem/_esm/chains/definitions/avalanche.js"() {
|
|
61388
|
+
init_defineChain();
|
|
61389
|
+
avalanche = /* @__PURE__ */ defineChain({
|
|
61390
|
+
id: 43114,
|
|
61391
|
+
name: "Avalanche",
|
|
61392
|
+
blockTime: 1700,
|
|
61393
|
+
nativeCurrency: {
|
|
61394
|
+
decimals: 18,
|
|
61395
|
+
name: "Avalanche",
|
|
61396
|
+
symbol: "AVAX"
|
|
61397
|
+
},
|
|
61398
|
+
rpcUrls: {
|
|
61399
|
+
default: { http: ["https://api.avax.network/ext/bc/C/rpc"] }
|
|
61400
|
+
},
|
|
61401
|
+
blockExplorers: {
|
|
61402
|
+
default: {
|
|
61403
|
+
name: "SnowTrace",
|
|
61404
|
+
url: "https://snowtrace.io",
|
|
61405
|
+
apiUrl: "https://api.snowtrace.io"
|
|
61406
|
+
}
|
|
61407
|
+
},
|
|
61408
|
+
contracts: {
|
|
61409
|
+
multicall3: {
|
|
61410
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
61411
|
+
blockCreated: 11907934
|
|
61412
|
+
}
|
|
61413
|
+
}
|
|
61414
|
+
});
|
|
61415
|
+
}
|
|
61416
|
+
});
|
|
61417
|
+
|
|
61031
61418
|
// ../../node_modules/.pnpm/viem@2.55.15_bufferutil@4.1_ce20031be19c56210207d462110a7a29/node_modules/viem/_esm/chains/definitions/base.js
|
|
61032
61419
|
var sourceId, base2, basePreconf;
|
|
61033
61420
|
var init_base3 = __esm({
|
|
@@ -61198,6 +61585,37 @@ var init_bsc = __esm({
|
|
|
61198
61585
|
}
|
|
61199
61586
|
});
|
|
61200
61587
|
|
|
61588
|
+
// ../../node_modules/.pnpm/viem@2.55.15_bufferutil@4.1_ce20031be19c56210207d462110a7a29/node_modules/viem/_esm/chains/definitions/injective.js
|
|
61589
|
+
var injective;
|
|
61590
|
+
var init_injective = __esm({
|
|
61591
|
+
"../../node_modules/.pnpm/viem@2.55.15_bufferutil@4.1_ce20031be19c56210207d462110a7a29/node_modules/viem/_esm/chains/definitions/injective.js"() {
|
|
61592
|
+
init_defineChain();
|
|
61593
|
+
injective = /* @__PURE__ */ defineChain({
|
|
61594
|
+
id: 1776,
|
|
61595
|
+
name: "Injective",
|
|
61596
|
+
nativeCurrency: {
|
|
61597
|
+
decimals: 18,
|
|
61598
|
+
name: "Injective",
|
|
61599
|
+
symbol: "INJ"
|
|
61600
|
+
},
|
|
61601
|
+
rpcUrls: {
|
|
61602
|
+
default: {
|
|
61603
|
+
http: ["https://sentry.evm-rpc.injective.network"],
|
|
61604
|
+
webSocket: ["wss://sentry.evm-ws.injective.network"]
|
|
61605
|
+
}
|
|
61606
|
+
},
|
|
61607
|
+
blockExplorers: {
|
|
61608
|
+
default: {
|
|
61609
|
+
name: "Injective Explorer",
|
|
61610
|
+
url: "https://blockscout.injective.network",
|
|
61611
|
+
apiUrl: "https://blockscout.injective.network/api"
|
|
61612
|
+
}
|
|
61613
|
+
},
|
|
61614
|
+
testnet: false
|
|
61615
|
+
});
|
|
61616
|
+
}
|
|
61617
|
+
});
|
|
61618
|
+
|
|
61201
61619
|
// ../../node_modules/.pnpm/viem@2.55.15_bufferutil@4.1_ce20031be19c56210207d462110a7a29/node_modules/viem/_esm/chains/definitions/mainnet.js
|
|
61202
61620
|
var mainnet;
|
|
61203
61621
|
var init_mainnet = __esm({
|
|
@@ -61294,14 +61712,33 @@ var init_optimism = __esm({
|
|
|
61294
61712
|
var init_chains2 = __esm({
|
|
61295
61713
|
"../../node_modules/.pnpm/viem@2.55.15_bufferutil@4.1_ce20031be19c56210207d462110a7a29/node_modules/viem/_esm/chains/index.js"() {
|
|
61296
61714
|
init_arbitrum();
|
|
61715
|
+
init_avalanche();
|
|
61297
61716
|
init_base3();
|
|
61298
61717
|
init_baseSepolia();
|
|
61299
61718
|
init_bsc();
|
|
61719
|
+
init_injective();
|
|
61300
61720
|
init_mainnet();
|
|
61301
61721
|
init_optimism();
|
|
61302
61722
|
}
|
|
61303
61723
|
});
|
|
61304
61724
|
|
|
61725
|
+
// src/custody-chains.ts
|
|
61726
|
+
function custodyViemChain(chainId, purpose) {
|
|
61727
|
+
const chain = CUSTODY_CHAINS.get(chainId);
|
|
61728
|
+
if (!chain) throw new TypeError(`${purpose} custody has no reviewed viem chain for ${chainId}.`);
|
|
61729
|
+
return chain;
|
|
61730
|
+
}
|
|
61731
|
+
var CUSTODY_CHAINS;
|
|
61732
|
+
var init_custody_chains = __esm({
|
|
61733
|
+
"src/custody-chains.ts"() {
|
|
61734
|
+
"use strict";
|
|
61735
|
+
init_chains2();
|
|
61736
|
+
CUSTODY_CHAINS = new Map(
|
|
61737
|
+
[base2, injective, baseSepolia].map((chain) => [chain.id, chain])
|
|
61738
|
+
);
|
|
61739
|
+
}
|
|
61740
|
+
});
|
|
61741
|
+
|
|
61305
61742
|
// src/purchase-sender.ts
|
|
61306
61743
|
function parseRpcUrl(value) {
|
|
61307
61744
|
const parsed2 = new URL(value);
|
|
@@ -61356,9 +61793,7 @@ function assertCanonicalPlanTransactions(input) {
|
|
|
61356
61793
|
}
|
|
61357
61794
|
}
|
|
61358
61795
|
function planChain(chainId) {
|
|
61359
|
-
|
|
61360
|
-
if (chainId === baseSepolia.id) return baseSepolia;
|
|
61361
|
-
throw new TypeError(`Agent custody has no reviewed viem chain for ${chainId}.`);
|
|
61796
|
+
return custodyViemChain(chainId, "Agent");
|
|
61362
61797
|
}
|
|
61363
61798
|
function viemRpcFactory(rpcUrl, chainId, confirmations) {
|
|
61364
61799
|
const chain = planChain(chainId);
|
|
@@ -61478,7 +61913,7 @@ var init_purchase_sender = __esm({
|
|
|
61478
61913
|
"use strict";
|
|
61479
61914
|
init_esm2();
|
|
61480
61915
|
init_accounts();
|
|
61481
|
-
|
|
61916
|
+
init_custody_chains();
|
|
61482
61917
|
erc20ApproveAbi = [{
|
|
61483
61918
|
type: "function",
|
|
61484
61919
|
name: "approve",
|
|
@@ -61646,9 +62081,7 @@ function uint16(value, name) {
|
|
|
61646
62081
|
return Number(value);
|
|
61647
62082
|
}
|
|
61648
62083
|
function planChain2(chainId) {
|
|
61649
|
-
|
|
61650
|
-
if (chainId === baseSepolia.id) return baseSepolia;
|
|
61651
|
-
throw new TypeError(`Task custody has no reviewed viem chain for ${chainId}.`);
|
|
62084
|
+
return custodyViemChain(chainId, "Task");
|
|
61652
62085
|
}
|
|
61653
62086
|
function viemFactory(rpcUrl, chainId, confirmations) {
|
|
61654
62087
|
const chain = planChain2(chainId);
|
|
@@ -61786,7 +62219,7 @@ var init_task_protocol_sender = __esm({
|
|
|
61786
62219
|
"use strict";
|
|
61787
62220
|
init_esm2();
|
|
61788
62221
|
init_accounts();
|
|
61789
|
-
|
|
62222
|
+
init_custody_chains();
|
|
61790
62223
|
init_chains();
|
|
61791
62224
|
erc20Abi2 = parseAbi([
|
|
61792
62225
|
"function allowance(address owner, address spender) view returns (uint256)",
|
|
@@ -62020,7 +62453,7 @@ function textValue(value, name, allowEmpty = false) {
|
|
|
62020
62453
|
return value;
|
|
62021
62454
|
}
|
|
62022
62455
|
function resolveSkillViemChain(chainId) {
|
|
62023
|
-
const chain = [mainnet, optimism, bsc, base2, arbitrum, baseSepolia].find((candidate) => candidate.id === chainId);
|
|
62456
|
+
const chain = [mainnet, optimism, bsc, base2, arbitrum, avalanche, baseSepolia].find((candidate) => candidate.id === chainId);
|
|
62024
62457
|
if (chain !== void 0) return chain;
|
|
62025
62458
|
throw new TypeError(`Unsupported Skill chain ${String(chainId)}.`);
|
|
62026
62459
|
}
|
|
@@ -63473,12 +63906,12 @@ var init_skill_local_flow = __esm({
|
|
|
63473
63906
|
const plan = deliveryPlan(planValue, context);
|
|
63474
63907
|
if (!context) throw new TypeError("Sign in with Finch CLI before downloading Skills.");
|
|
63475
63908
|
const located = await this.fetchDeliveryContent(plan.packageURI, context?.bearer);
|
|
63476
|
-
const
|
|
63909
|
+
const manifest5 = parseManifest(located);
|
|
63477
63910
|
let stored = located;
|
|
63478
63911
|
const expectedHash = plan.packageHash;
|
|
63479
|
-
const root =
|
|
63480
|
-
if (
|
|
63481
|
-
const entry2 = packageForVersion(
|
|
63912
|
+
const root = manifest5 === null ? void 0 : packageForVersion(manifest5, plan.version)?.skillRoot;
|
|
63913
|
+
if (manifest5 !== null) {
|
|
63914
|
+
const entry2 = packageForVersion(manifest5, plan.version);
|
|
63482
63915
|
if (entry2 === null) throw new TypeError(`Skill manifest does not list version ${plan.version}.`);
|
|
63483
63916
|
if (entry2.packageHash.toLowerCase() !== plan.packageHash.toLowerCase()) throw new TypeError("Skill manifest package hash does not match chain authority.");
|
|
63484
63917
|
stored = await this.fetchDeliveryContent(entry2.packageURI, context?.bearer);
|