@finchtech/cli 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +14 -0
  2. package/dist/finch.js +215 -22
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -196,3 +196,17 @@ CLI 0.5.1 allows ordinary logout and wallet switching with unfinished transactio
196
196
  ## Actionable usage errors, wallet list and network diagnostics (CLI 0.5.2)
197
197
 
198
198
  CLI 0.5.2 names the rejected option, missing argument or unknown subcommand together with the command's usage instead of a generic schema message; every command already prints JSON, so there is no `--json` option. `finch wallet list` shows the current wallet and registered addresses offline. Failed `finch mcp doctor` network checks report `httpStatus` or `networkErrorCode`, so a TLS-intercepting proxy, DNS failure or timeout is distinguishable from a server outage. Its PROD authentication-chain help also lists Injective (`1776`). Upgrade the installed executable to receive these changes; updating the Skill or website alone does not apply them.
199
+
200
+ ### Avalanche Agent transactions (0.5.5)
201
+
202
+ Use CLI 0.5.5 or newer for Agent wallet transactions on Avalanche C-Chain (`43114`). This release includes the reviewed Avalanche transaction adapter and the purchase-response contract for all reviewed Agent chains, including Injective (`1776`). Request the plan through Remote MCP, preserve its exact `chainId` and operation ID, and execute only the returned local action. Agent purchases use the deployment's USDC token; transaction gas on Avalanche uses AVAX. The CLI login authentication chain does not select a market transaction chain.
203
+
204
+ Upgrade while preserving the original wallet, Session and unfinished recovery journals. Re-read the same operation before resuming an uncertain transaction; do not create another purchase or rebroadcast a confirmed transaction. Avalanche Task creation remains closed by the server manifest; this CLI release does not open it.
205
+
206
+ ### Injective Skill transactions (0.5.4)
207
+
208
+ CLI 0.5.4 supports Skill publication, acquisition, version updates, price/supply changes and recovery on Injective EVM (`1776`). The real transaction adapter now accepts the reviewed Injective chain definition; older executables can reject these plans before reaching RPC. Use the exact chain from the Remote MCP plan; prices and gas use INJ. Upgrade the executable while preserving existing recovery journals.
209
+
210
+ ### Skill display languages (0.5.4)
211
+
212
+ Publication plans accept `sourceLocale` (`en`, `zh`, `zh-TW`). The gateway records it when the publication is confirmed; it stays outside chain metadata and SkillRoot hashes. Display edits and confirmation use Remote MCP after publication. A display-save failure retains recovery state: retry the same intent or fingerprint to finish database initialization without repeating the mint. Deploy the matching gateway and migration before using language-bearing plans.
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.5.3",
6622
+ version: "0.5.5",
6623
6623
  description: "Finch Agent CLI for wallet custody, Session-owned execution, and MCP OAuth approval.",
6624
6624
  type: "module",
6625
6625
  bin: {
@@ -21980,6 +21980,46 @@ var init_agent_service = __esm({
21980
21980
  paymentTokenSymbol: "USDC",
21981
21981
  paymentTokenDecimals: 6
21982
21982
  }
21983
+ },
21984
+ "43114": {
21985
+ enabled: true,
21986
+ network: {
21987
+ chainId: 43114,
21988
+ name: "Avalanche C-Chain",
21989
+ explorerUrl: "https://snowtrace.io",
21990
+ defaultRpcUrls: [
21991
+ "https://api.avax.network/ext/bc/C/rpc",
21992
+ "https://avalanche-c-chain-rpc.publicnode.com"
21993
+ ]
21994
+ },
21995
+ sourceRepository: "FinchipAI/Finch-Agent-Service-Protocol",
21996
+ sourceCommit: "c5f7eb3e2f6a1f783cabf50c72cb7420d2e0e5b8",
21997
+ contracts: {
21998
+ protocol: "0xbd6eeacb63a0248df1ee0d38c641bd50aac96b67",
21999
+ protocolImplementation: "0x6e8360b46225f40ecd66ef7c2b7fbfa4fa72dc82",
22000
+ protocolProxyAdmin: "0x3e8fd4020f65b3cf04a2d7678eb83b9c45186c03",
22001
+ vault: "0x2078fbcc8205432477fa1c006a08e37182d73d8b",
22002
+ vaultImplementation: "0xad8999ae8a63fc30dac591dc613105dccbb74c99",
22003
+ vaultProxyAdmin: "0x30ba3ac69b4f0a78ad6285ec3b882928a87bafc1",
22004
+ paymentToken: "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e"
22005
+ },
22006
+ authority: {
22007
+ admin: "0x4fcb985a020dc1dd8a5dfc4adf4606eac4f68075",
22008
+ treasury: "0xd5ca4d96a17723fd008b2c3f1a413cb0736a2848",
22009
+ settlementAttestor: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6",
22010
+ refundAttestor: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6",
22011
+ freezeKeeper: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6"
22012
+ },
22013
+ deployment: {
22014
+ firstBlock: "97507741",
22015
+ completedBlock: "97507776",
22016
+ confirmations: 2,
22017
+ deploymentHash: "0x3e808ff698f81bc01df4ab35290cdad2b83ef0c1928cf8241c81bb258b51d75f"
22018
+ },
22019
+ policy: {
22020
+ paymentTokenSymbol: "USDC",
22021
+ paymentTokenDecimals: 6
22022
+ }
21983
22023
  }
21984
22024
  }
21985
22025
  }
@@ -22263,6 +22303,33 @@ var init_skill_protocol = __esm({
22263
22303
  factoryFirstBlock: "96438471",
22264
22304
  confirmations: 2
22265
22305
  }
22306
+ },
22307
+ "1776": {
22308
+ enabled: true,
22309
+ network: {
22310
+ chainId: 1776,
22311
+ name: "Injective",
22312
+ explorerUrl: "https://blockscout.injective.network",
22313
+ defaultRpcUrls: [
22314
+ "https://sentry.evm-rpc.injective.network"
22315
+ ]
22316
+ },
22317
+ sourceRepository: "FinchipAI/finchip-protocol",
22318
+ sourceCommit: "fcaa22761169b1e45aca5ea783d2315341c243a5",
22319
+ abiSourceCommit: "61982867d271ea9ebf0730b1a650bee1b9894642",
22320
+ contracts: {
22321
+ skillToken: "0x7ed98f8d72a447483446f28a973288d3301863cc",
22322
+ revenueRight: "0x6e8360b46225f40ecd66ef7c2b7fbfa4fa72dc82",
22323
+ skillInstance: "0xad8999ae8a63fc30dac591dc613105dccbb74c99",
22324
+ skillFactory: "0x6a82c248ffa66b064e3ddd913aa3be18e292a5ee",
22325
+ skillMarket: "0xa21716201931de0744230a58b58f48b94462ed8c",
22326
+ feeRouter: "0x5f3ecf942953e7acbce0b9b49b2ff7e159921de9"
22327
+ },
22328
+ deployment: {
22329
+ firstBlock: "187103028",
22330
+ factoryFirstBlock: "187103063",
22331
+ confirmations: 2
22332
+ }
22266
22333
  }
22267
22334
  }
22268
22335
  }
@@ -22285,6 +22352,7 @@ var init_task_protocol = __esm({
22285
22352
  chains: {
22286
22353
  "84532": {
22287
22354
  enabled: true,
22355
+ creationOpen: true,
22288
22356
  network: {
22289
22357
  chainId: 84532,
22290
22358
  name: "Base Sepolia",
@@ -22330,6 +22398,7 @@ var init_task_protocol = __esm({
22330
22398
  chains: {
22331
22399
  "8453": {
22332
22400
  enabled: true,
22401
+ creationOpen: true,
22333
22402
  network: {
22334
22403
  chainId: 8453,
22335
22404
  name: "Base",
@@ -22370,6 +22439,7 @@ var init_task_protocol = __esm({
22370
22439
  },
22371
22440
  "1776": {
22372
22441
  enabled: true,
22442
+ creationOpen: false,
22373
22443
  network: {
22374
22444
  chainId: 1776,
22375
22445
  name: "Injective",
@@ -22405,6 +22475,46 @@ var init_task_protocol = __esm({
22405
22475
  paymentTokenSymbol: "USDC",
22406
22476
  paymentTokenDecimals: 6
22407
22477
  }
22478
+ },
22479
+ "43114": {
22480
+ enabled: true,
22481
+ creationOpen: false,
22482
+ network: {
22483
+ chainId: 43114,
22484
+ name: "Avalanche C-Chain",
22485
+ explorerUrl: "https://snowtrace.io",
22486
+ defaultRpcUrls: [
22487
+ "https://api.avax.network/ext/bc/C/rpc",
22488
+ "https://avalanche-c-chain-rpc.publicnode.com"
22489
+ ]
22490
+ },
22491
+ sourceRepository: "FinchipAI/Finch-Task-Protocol",
22492
+ sourceCommit: "1a89d732e9b2e6a87c1e89a7fb6ad2966d32f934",
22493
+ abiSourceCommit: "1a89d732e9b2e6a87c1e89a7fb6ad2966d32f934",
22494
+ contracts: {
22495
+ protocol: "0x0678ac48214c3a61c577819468d9c25c615eae12",
22496
+ protocolImplementation: "0xc4111f795b5701ac1385eae5db349337a7e669fa",
22497
+ protocolProxyAdmin: "0xeb3a69f087d7aa85581b613e689050a392455c49",
22498
+ vault: "0xe4a402a0936b275ca8ad89cf7688cdbb756cbc82",
22499
+ vaultImplementation: "0x9460be4f979ec002723c6ffab2be8b953a776937",
22500
+ vaultProxyAdmin: "0xdda4eb2592bad9c228697507b93c3ab0d9e10386",
22501
+ paymentToken: "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e"
22502
+ },
22503
+ authority: {
22504
+ admin: "0x4fcb985a020dc1dd8a5dfc4adf4606eac4f68075",
22505
+ treasury: "0xd5ca4d96a17723fd008b2c3f1a413cb0736a2848",
22506
+ awardAttestor: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6",
22507
+ freezeKeeper: "0x1dc1ccc1ebdcdd6c57a8c22776883b45c6824cf6"
22508
+ },
22509
+ deployment: {
22510
+ firstBlock: "97507648",
22511
+ completedBlock: "97507680",
22512
+ confirmations: 2
22513
+ },
22514
+ policy: {
22515
+ paymentTokenSymbol: "USDC",
22516
+ paymentTokenDecimals: 6
22517
+ }
22408
22518
  }
22409
22519
  }
22410
22520
  }
@@ -22528,7 +22638,8 @@ function getTaskProtocolDeployment(environment3, chainId) {
22528
22638
  paymentTokenDecimals: value.policy.paymentTokenDecimals,
22529
22639
  expectedAwardAttestorAddress: value.authority.awardAttestor,
22530
22640
  expectedCreditGranterAddress: value.authority.creditGranter ?? null,
22531
- defaultRpcUrls: Object.freeze([...value.network.defaultRpcUrls])
22641
+ defaultRpcUrls: Object.freeze([...value.network.defaultRpcUrls]),
22642
+ creationOpen: value.creationOpen
22532
22643
  });
22533
22644
  }
22534
22645
  function getTaskProtocolDeploymentByChainId(chainId) {
@@ -22717,6 +22828,14 @@ var init_chains = __esm({
22717
22828
  });
22718
22829
  taskActiveSchema = external_exports.strictObject({
22719
22830
  enabled: external_exports.literal(true),
22831
+ /**
22832
+ * Whether publishers may create new Tasks on this chain. A chain can be
22833
+ * deployed and reviewed — drafts, reads, and settlement stay resolvable —
22834
+ * while creation stays closed because its treasury, gas funding, or RPC
22835
+ * retention is not production-ready. Opening a chain is a one-line manifest
22836
+ * review, never a UI edit.
22837
+ */
22838
+ creationOpen: external_exports.boolean(),
22720
22839
  network: networkSchema,
22721
22840
  ...sourceSchema,
22722
22841
  abiSourceCommit: commitSchema,
@@ -22877,6 +22996,7 @@ var init_chains = __esm({
22877
22996
  8453: "production",
22878
22997
  42161: "production",
22879
22998
  43114: "production",
22999
+ 1776: "production",
22880
23000
  84532: "test"
22881
23001
  });
22882
23002
  REVIEWED_NETWORKS = Object.freeze({
@@ -22930,17 +23050,26 @@ var init_sales_inquiries = __esm({
22930
23050
  local: {
22931
23051
  enabled: false,
22932
23052
  ipHourlyLimit: 5,
22933
- emailDailyLimit: 10
23053
+ emailDailyLimit: 10,
23054
+ emailFrom: "Finch <notifications@notify.finchtech.ai>",
23055
+ emailReplyTo: "customersupport@finchtech.ai",
23056
+ opsOrigin: "http://localhost:3002"
22934
23057
  },
22935
23058
  test: {
22936
23059
  enabled: true,
22937
23060
  ipHourlyLimit: 5,
22938
- emailDailyLimit: 10
23061
+ emailDailyLimit: 10,
23062
+ emailFrom: "Finch <notifications@notify.finchtech.ai>",
23063
+ emailReplyTo: "customersupport@finchtech.ai",
23064
+ opsOrigin: "https://finch-ops-git-staging-fin-chip-team.vercel.app"
22939
23065
  },
22940
23066
  production: {
22941
23067
  enabled: false,
22942
23068
  ipHourlyLimit: 5,
22943
- emailDailyLimit: 10
23069
+ emailDailyLimit: 10,
23070
+ emailFrom: "Finch <notifications@notify.finchtech.ai>",
23071
+ emailReplyTo: "customersupport@finchtech.ai",
23072
+ opsOrigin: "https://ops.finchtech.ai"
22944
23073
  }
22945
23074
  }
22946
23075
  };
@@ -22954,7 +23083,7 @@ var init_sales_inquiries2 = __esm({
22954
23083
  "use strict";
22955
23084
  init_zod();
22956
23085
  init_sales_inquiries();
22957
- policy = external_exports.strictObject({ enabled: external_exports.boolean(), ipHourlyLimit: external_exports.number().int().min(1).max(100), emailDailyLimit: external_exports.number().int().min(1).max(100) });
23086
+ policy = external_exports.strictObject({ enabled: external_exports.boolean(), ipHourlyLimit: external_exports.number().int().min(1).max(100), emailDailyLimit: external_exports.number().int().min(1).max(100), emailFrom: external_exports.string().regex(/^Finch <[^<>\r\n]+>$/u).refine((value) => external_exports.email().safeParse(value.slice(7, -1)).success), emailReplyTo: external_exports.email(), opsOrigin: external_exports.url() });
22958
23087
  schema = external_exports.strictObject({ schemaVersion: external_exports.literal(1), kind: external_exports.literal("sales_inquiries"), environments: external_exports.strictObject({ local: policy, test: policy, production: policy }) });
22959
23088
  parseSalesInquiryManifest = (value) => schema.parse(value);
22960
23089
  parsed = parseSalesInquiryManifest(sales_inquiries_default);
@@ -23222,6 +23351,15 @@ var init_skill_delivery = __esm({
23222
23351
  pkpId: "0xdf87a5d625926cedc0ad0ef74888adb643936f25",
23223
23352
  groupId: 1
23224
23353
  }
23354
+ },
23355
+ "1776": {
23356
+ chainId: 1776,
23357
+ chainTag: "injective",
23358
+ lit: {
23359
+ provider: "chipotle",
23360
+ pkpId: "0xdf87a5d625926cedc0ad0ef74888adb643936f25",
23361
+ groupId: 1
23362
+ }
23225
23363
  }
23226
23364
  }
23227
23365
  }
@@ -23447,7 +23585,7 @@ function getSkillDeliveryDeployment(environment3, chainId) {
23447
23585
  });
23448
23586
  }
23449
23587
  function getSkillDeliveryDeploymentByChainId(chainId) {
23450
- const environment3 = chainId === 84532 ? "test" : [1, 10, 56, 8453, 42161, 43114].includes(chainId) ? "production" : void 0;
23588
+ const environment3 = chainId === 84532 ? "test" : [1, 10, 56, 8453, 42161, 43114, 1776].includes(chainId) ? "production" : void 0;
23451
23589
  if (!environment3) throw new DeploymentManifestError(`Skill delivery has no reviewed binding for chain ${chainId}.`);
23452
23590
  return getSkillDeliveryDeployment(environment3, chainId);
23453
23591
  }
@@ -23538,7 +23676,7 @@ var init_platform = __esm({
23538
23676
  });
23539
23677
  skillDeliveryBindingSchema = external_exports.strictObject({
23540
23678
  chainId: external_exports.number().int().positive(),
23541
- chainTag: external_exports.enum(["base", "baseSepolia", "ethereum", "optimism", "bsc", "arbitrum", "avalanche"]),
23679
+ chainTag: external_exports.enum(["base", "baseSepolia", "ethereum", "optimism", "bsc", "arbitrum", "avalanche", "injective"]),
23542
23680
  lit: external_exports.strictObject({
23543
23681
  provider: external_exports.literal("chipotle"),
23544
23682
  pkpId: external_exports.string().min(1).max(512),
@@ -29510,7 +29648,9 @@ var init_testnet_purchase_v1 = __esm({
29510
29648
  });
29511
29649
  testnetPurchaseTransactionResponseSchema = strictObjectSchema2({
29512
29650
  operationId: canonicalUuidSchema2,
29513
- chainId: { type: "string", enum: ["84532", "8453"] },
29651
+ // Base Sepolia (test) plus every reviewed production Agent Service chain; must
29652
+ // match the deployment manifest or non-Base purchases fail response validation.
29653
+ chainId: { type: "string", enum: ["84532", "8453", "1776", "43114"] },
29514
29654
  deploymentHash: hex32Schema,
29515
29655
  paymentTokenAddress: evmAddressSchema,
29516
29656
  totalPaidAtomic: positiveIntegerStringSchema2,
@@ -29896,7 +30036,7 @@ var init_validation_input = __esm({
29896
30036
  });
29897
30037
 
29898
30038
  // ../../packages/agent-market-contracts/src/v1/errors.ts
29899
- var creatorRequestReasonCodes, buyerStateReasonCodes, agentMarketErrorCodes, nextActionValues, AGENT_MARKET_ERROR_DEFINITIONS, nullableStringSchema, nullableUuidSchema, nullableRevisionSchema2, agentMarketErrorEnvelopeSchema;
30039
+ var creatorRequestReasonCodes, buyerStateReasonCodes, FREE_CALL_FAILURE_MESSAGES, agentMarketErrorCodes, nextActionValues, AGENT_MARKET_ERROR_DEFINITIONS, nullableStringSchema, nullableUuidSchema, nullableRevisionSchema2, agentMarketErrorEnvelopeSchema;
29900
30040
  var init_errors3 = __esm({
29901
30041
  "../../packages/agent-market-contracts/src/v1/errors.ts"() {
29902
30042
  "use strict";
@@ -29918,6 +30058,12 @@ var init_errors3 = __esm({
29918
30058
  "AVATAR_VIDEO_ACCOUNT_DAILY_LIMIT_REACHED",
29919
30059
  "AVATAR_VIDEO_PLATFORM_DAILY_LIMIT_REACHED"
29920
30060
  ];
30061
+ FREE_CALL_FAILURE_MESSAGES = Object.freeze({
30062
+ AGENT_FREE_ONLY_NOT_AVAILABLE: "This free Agent call is no longer available. Refresh your free allowance or connect your wallet to use purchased Credits.",
30063
+ AGENT_FREE_PAID_CONFIRMATION_REQUIRED: "This Agent has reached its daily free usage limit. Confirm paid Credits before continuing.",
30064
+ AGENT_FREE_DAILY_LIMIT_REACHED: "This Agent has reached its daily free usage limit. Please try again tomorrow.",
30065
+ AGENT_FREE_CALLS_PENDING: "Your remaining free calls are reserved by running requests. Wait for them to finish before starting another call."
30066
+ });
29921
30067
  agentMarketErrorCodes = [
29922
30068
  ...ONLINE_API_TECHNICAL_ERROR_CODES,
29923
30069
  "AGENT_MARKET_AUTH_REQUIRED",
@@ -29934,6 +30080,10 @@ var init_errors3 = __esm({
29934
30080
  "PRODUCTION_NOT_AVAILABLE",
29935
30081
  "INTEGRATION_FAMILY_IN_DEVELOPMENT",
29936
30082
  "AGENT_MARKET_STATE_CONFLICT",
30083
+ "AGENT_FREE_PAID_CONFIRMATION_REQUIRED",
30084
+ "AGENT_FREE_ONLY_NOT_AVAILABLE",
30085
+ "AGENT_FREE_DAILY_LIMIT_REACHED",
30086
+ "AGENT_FREE_CALLS_PENDING",
29937
30087
  "AGENT_MARKET_VALIDATION_REQUIRED",
29938
30088
  "AGENT_MARKET_OPERATION_NOT_FOUND",
29939
30089
  "AGENT_MARKET_INPUT_INVALID",
@@ -29981,6 +30131,10 @@ var init_errors3 = __esm({
29981
30131
  PRODUCTION_NOT_AVAILABLE: { httpStatus: 409, retryable: false, nextAction: "none" },
29982
30132
  INTEGRATION_FAMILY_IN_DEVELOPMENT: { httpStatus: 409, retryable: false, nextAction: "choose_supported_integration" },
29983
30133
  AGENT_MARKET_STATE_CONFLICT: { httpStatus: 409, retryable: false, nextAction: "refresh_resource" },
30134
+ AGENT_FREE_PAID_CONFIRMATION_REQUIRED: { httpStatus: 409, retryable: false, nextAction: "refresh_resource" },
30135
+ AGENT_FREE_ONLY_NOT_AVAILABLE: { httpStatus: 409, retryable: false, nextAction: "refresh_resource" },
30136
+ AGENT_FREE_DAILY_LIMIT_REACHED: { httpStatus: 429, retryable: true, nextAction: "retry_tomorrow" },
30137
+ AGENT_FREE_CALLS_PENDING: { httpStatus: 409, retryable: true, nextAction: "retry_later" },
29984
30138
  AGENT_MARKET_VALIDATION_REQUIRED: { httpStatus: 409, retryable: false, nextAction: "run_connection_test" },
29985
30139
  AGENT_MARKET_OPERATION_NOT_FOUND: { httpStatus: 404, retryable: false, nextAction: "none" },
29986
30140
  AGENT_MARKET_INPUT_INVALID: { httpStatus: 422, retryable: false, nextAction: "fix_request" },
@@ -31255,7 +31409,7 @@ function taskProjectionSchema(properties) {
31255
31409
  terminalContent: taskPresentationContentSchema
31256
31410
  }, Object.keys(properties));
31257
31411
  }
31258
- 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, taskFailureCodeSchema, taskFailureSchema, taskPresentationContentSchema, taskResponseSchema, BUYER_AGENTON_RECOVERY_CONTRACT, appendTaskInputRequestSchema, directInvocationRequestSchema, TASK_COMPLETED_CANONICALIZATION;
31412
+ 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, freeConsentFields, freeCallConsentRequestSchema, freeCallConsentResponseSchema, 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, taskFailureCodeSchema, taskFailureSchema, taskPresentationContentSchema, taskResponseSchema, BUYER_AGENTON_RECOVERY_CONTRACT, appendTaskInputRequestSchema, directInvocationRequestSchema, TASK_COMPLETED_CANONICALIZATION;
31259
31413
  var init_buyer = __esm({
31260
31414
  "../../packages/agent-market-contracts/src/v1/buyer.ts"() {
31261
31415
  "use strict";
@@ -31423,6 +31577,30 @@ var init_buyer = __esm({
31423
31577
  }
31424
31578
  }, []);
31425
31579
  described2 = (schema6, description) => Object.freeze({ ...schema6, description });
31580
+ freeConsentFields = {
31581
+ confirmed: { const: true, description: "Must be true only after the user explicitly approves paid fallback for this one call." },
31582
+ requiredUnits: { ...positiveIntegerStringSchema2, maxLength: 78, description: "Exact paid unit cost returned by call eligibility; a changed price invalidates this consent." }
31583
+ };
31584
+ freeCallConsentRequestSchema = Object.freeze({
31585
+ oneOf: [
31586
+ strictObjectSchema2({
31587
+ ...freeConsentFields,
31588
+ offerId: canonicalUuidSchema2,
31589
+ versionId: nullSchema2,
31590
+ quantity: { type: "integer", minimum: 1, maximum: 2147483647 }
31591
+ }),
31592
+ strictObjectSchema2({
31593
+ ...freeConsentFields,
31594
+ offerId: nullSchema2,
31595
+ versionId: canonicalUuidSchema2,
31596
+ quantity: { const: 1 }
31597
+ })
31598
+ ]
31599
+ });
31600
+ freeCallConsentResponseSchema = strictObjectSchema2({ confirmed: {
31601
+ const: true,
31602
+ description: "The exact one-request paid fallback consent was recorded; no invocation was admitted or charged."
31603
+ } });
31426
31604
  callEligibilityResponseSchema = strictObjectSchema2({
31427
31605
  serviceVersionId: described2(canonicalUuidSchema2, "Service version the call would run on."),
31428
31606
  offerId: { anyOf: [canonicalUuidSchema2, nullSchema2], description: "The checked AgentOn offer, or null for a Direct API version." },
@@ -31430,18 +31608,18 @@ var init_buyer = __esm({
31430
31608
  requiredUnits: described2(positiveIntegerStringSchema2, "Call-right units a paid call would reserve, as a decimal integer string."),
31431
31609
  fundingSource: {
31432
31610
  enum: ["merchant_self_test", "promotion", "paid", "insufficient"],
31433
- 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."
31611
+ description: "merchant_self_test and promotion are free; paid reserves requiredUnits purchased call rights. If unused personal calls remain but dailyRemaining is zero, paid funding requires explicit one-request confirmation first. insufficient can mean missing purchased rights or all remaining free calls are still in flight."
31434
31612
  },
31435
31613
  merchantSelfTest: described2(booleanSchema2, "True when the caller owns this contract-tested agent, so calls are a free owner self-test."),
31436
31614
  promotion: {
31437
31615
  anyOf: [strictObjectSchema2({
31438
- availableOperations: described2(nonNegativeIntegerStringSchema2, "Free calls usable now: the lower of personalRemaining and dailyRemaining."),
31439
- personalRemaining: described2(nonNegativeIntegerStringSchema2, "Free calls left for this account in the promotion."),
31440
- expiresAt: described2(canonicalSecondTimestampSchema, "When the promotion ends."),
31441
- dailyRemaining: { anyOf: [nonNegativeIntegerStringSchema2, nullSchema2], description: "Free calls left today for this agent across all buyers, or null when there is no daily limit." },
31442
- dailyResetsAt: { anyOf: [canonicalSecondTimestampSchema, nullSchema2], description: "When the daily limit resets, or null when there is no daily limit." }
31616
+ availableOperations: described2(nonNegativeIntegerStringSchema2, "Free calls usable now after deducting running reservations and applying the shared Agent daily ceiling."),
31617
+ personalRemaining: described2(nonNegativeIntegerStringSchema2, "Unexpired unused calls out of the account/Agent lifetime grant of 10. Only success consumes a call; in-flight reservations are not consumption. This balance ignores shared daily capacity."),
31618
+ expiresAt: described2(canonicalSecondTimestampSchema, "Exclusive Beijing midnight on day 31, starting on max(first Agent publication date, account registration date). Display the preceding Beijing date."),
31619
+ dailyRemaining: { anyOf: [nonNegativeIntegerStringSchema2, nullSchema2], description: "Remaining shared capacity out of 100 free calls per canonical Agent and Beijing calendar day; includes running reservations." },
31620
+ dailyResetsAt: { anyOf: [canonicalSecondTimestampSchema, nullSchema2], description: "Next Beijing (UTC+8) midnight. Revisions and republication never reset daily capacity." }
31443
31621
  }), nullSchema2],
31444
- description: "The active free promotion for this agent, or null when there is none."
31622
+ description: "The canonical account/Agent trial, including expired or exhausted trials for status display; null when no first publication is known. Never renews on login, Revision or republication."
31445
31623
  },
31446
31624
  paid: Object.freeze({
31447
31625
  ...strictObjectSchema2({
@@ -34695,6 +34873,19 @@ var init_operations = __esm({
34695
34873
  integrationFamilies: families.active,
34696
34874
  writes: false
34697
34875
  }),
34876
+ "buyer_free_call_consent.confirm": operation({
34877
+ id: "buyer_free_call_consent.confirm",
34878
+ requiredScope: "agent_market:buyer:invoke",
34879
+ http: http("post", "/api/v1/agent-market/buyer/call-eligibility", 200, {
34880
+ requestSchema: freeCallConsentRequestSchema,
34881
+ responseSchema: freeCallConsentResponseSchema,
34882
+ idempotencyRequired: true
34883
+ }),
34884
+ mcp: { name: "agent_market_buyer_free_call_consent_confirm" },
34885
+ cli: null,
34886
+ integrationFamilies: families.active,
34887
+ writes: true
34888
+ }),
34698
34889
  "buyer_p1_invocations.create": operation({
34699
34890
  id: "buyer_p1_invocations.create",
34700
34891
  requiredScope: "agent_market:buyer:invoke",
@@ -35675,6 +35866,7 @@ var init_schemas3 = __esm({
35675
35866
  deadline: nullableString,
35676
35867
  startAt: nullableString,
35677
35868
  goals: { type: "array", maxItems: 5, items: openObjectSchema2 },
35869
+ chainId: positiveInteger,
35678
35870
  publishNow: { const: false }
35679
35871
  }, ["title", "goal", "rewardAmount", "publishNow"]);
35680
35872
  taskSubmissionRequestSchema = strictObjectSchema3({
@@ -57839,7 +58031,7 @@ function publishPlan(value, context) {
57839
58031
  const chainId = assertAuthority(plan, "publish", context.walletAddress);
57840
58032
  assertLocalAction(plan.localAction, "skill publish-submit");
57841
58033
  const request2 = object2(plan.request, "Skill publish request");
57842
- exact2(request2, ["chainId", "slug", "name", "category", "licenseTypeName", "imageURI", "sourceKind", "contentMode", "unitPrice", "maxSupply", ...Object.hasOwn(request2, "summary") ? ["summary"] : []], "Skill publish request");
58034
+ exact2(request2, ["chainId", "slug", "name", "category", "licenseTypeName", "imageURI", "sourceKind", "contentMode", "unitPrice", "maxSupply", ...Object.hasOwn(request2, "summary") ? ["summary"] : [], ...Object.hasOwn(request2, "sourceLocale") ? ["sourceLocale"] : []], "Skill publish request");
57843
58035
  if (request2.chainId !== chainId) throw new TypeError("Skill publish request chain is invalid.");
57844
58036
  string4(request2.slug, "Skill slug");
57845
58037
  string4(request2.name, "Skill name");
@@ -57849,6 +58041,7 @@ function publishPlan(value, context) {
57849
58041
  throw new TypeError("Skill publish metadata is invalid.");
57850
58042
  }
57851
58043
  if (Object.hasOwn(request2, "summary") && (typeof request2.summary !== "string" || request2.summary.length > 500)) throw new TypeError("Skill summary is invalid.");
58044
+ if (request2.sourceLocale !== void 0 && !["en", "zh", "zh-TW"].includes(String(request2.sourceLocale))) throw new TypeError("Skill source language is invalid.");
57852
58045
  sourceKind(request2.sourceKind);
57853
58046
  contentMode(request2.contentMode);
57854
58047
  string4(request2.unitPrice, "Skill unitPrice", DECIMAL);
@@ -58614,7 +58807,7 @@ var init_skill_local_flow = __esm({
58614
58807
  objectKind: "manifest"
58615
58808
  });
58616
58809
  const chainMetadata = Object.fromEntries(
58617
- Object.entries(request2).filter(([key]) => key !== "sourceKind" && key !== "contentMode" && key !== "summary")
58810
+ Object.entries(request2).filter(([key]) => key !== "sourceKind" && key !== "contentMode" && key !== "summary" && key !== "sourceLocale")
58618
58811
  );
58619
58812
  const createRequest = {
58620
58813
  action: "createSkill",
@@ -62993,7 +63186,7 @@ var init_custody_chains = __esm({
62993
63186
  "use strict";
62994
63187
  init_chains2();
62995
63188
  CUSTODY_CHAINS = new Map(
62996
- [base2, injective, baseSepolia].map((chain) => [chain.id, chain])
63189
+ [base2, avalanche, injective, baseSepolia].map((chain) => [chain.id, chain])
62997
63190
  );
62998
63191
  }
62999
63192
  });
@@ -63712,7 +63905,7 @@ function textValue(value, name, allowEmpty = false) {
63712
63905
  return value;
63713
63906
  }
63714
63907
  function resolveSkillViemChain(chainId) {
63715
- const chain = [mainnet, optimism, bsc, base2, arbitrum, avalanche, baseSepolia].find((candidate) => candidate.id === chainId);
63908
+ const chain = [mainnet, optimism, bsc, base2, arbitrum, avalanche, injective, baseSepolia].find((candidate) => candidate.id === chainId);
63716
63909
  if (chain !== void 0) return chain;
63717
63910
  throw new TypeError(`Unsupported Skill chain ${String(chainId)}.`);
63718
63911
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finchtech/cli",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Finch Agent CLI for wallet custody, Session-owned execution, and MCP OAuth approval.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,11 +36,11 @@
36
36
  "typescript-eslint": "8.67.0",
37
37
  "viem": "2.55.15",
38
38
  "vitest": "4.1.10",
39
- "@finch/deployment-manifest": "0.1.0",
40
39
  "@finch/agent-market-contracts": "0.1.0",
40
+ "@finch/deployment-manifest": "0.1.0",
41
+ "@finch/skill-content": "0.1.0",
41
42
  "@finch/task-market-contracts": "0.1.0",
42
- "@finch/skill-market-contracts": "0.1.0",
43
- "@finch/skill-content": "0.1.0"
43
+ "@finch/skill-market-contracts": "0.1.0"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "esbuild src/bootstrap.ts --bundle --platform=node --format=esm --target=node20 --outfile=dist/finch.js --banner:js=\"import { createRequire as createBundleRequire } from 'node:module'; const require = createBundleRequire(import.meta.url);\"",