@agentsgot/agent-kit 0.0.0-stage → 1.0.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/ARCHITECTURE.md +5 -0
- package/README.md +13 -2
- package/dist/a2a.d.ts +35 -0
- package/dist/a2a.d.ts.map +1 -0
- package/dist/a2a.js +109 -0
- package/dist/a2a.js.map +1 -0
- package/dist/cli/binding.d.ts +24 -0
- package/dist/cli/binding.d.ts.map +1 -0
- package/dist/cli/binding.js +52 -0
- package/dist/cli/binding.js.map +1 -0
- package/dist/cli/commands.d.ts +18 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +191 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/context.d.ts +61 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +147 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/doctor.d.ts +34 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +109 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/home.d.ts +37 -0
- package/dist/cli/home.d.ts.map +1 -0
- package/dist/cli/home.js +77 -0
- package/dist/cli/home.js.map +1 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +120 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/install.d.ts +19 -0
- package/dist/cli/install.d.ts.map +1 -0
- package/dist/cli/install.js +64 -0
- package/dist/cli/install.js.map +1 -0
- package/dist/cli/keystore.d.ts +25 -0
- package/dist/cli/keystore.d.ts.map +1 -0
- package/dist/cli/keystore.js +57 -0
- package/dist/cli/keystore.js.map +1 -0
- package/dist/cli/mcp.d.ts +7 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +28 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/prompt.d.ts +10 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +71 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/reports.d.ts +42 -0
- package/dist/cli/reports.d.ts.map +1 -0
- package/dist/cli/reports.js +121 -0
- package/dist/cli/reports.js.map +1 -0
- package/dist/cli/run.d.ts +21 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +125 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/wallet.d.ts +19 -0
- package/dist/cli/wallet.d.ts.map +1 -0
- package/dist/cli/wallet.js +58 -0
- package/dist/cli/wallet.js.map +1 -0
- package/dist/guides.d.ts +7 -0
- package/dist/guides.d.ts.map +1 -0
- package/dist/guides.js +94 -0
- package/dist/guides.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/llm.d.ts +16 -0
- package/dist/llm.d.ts.map +1 -0
- package/dist/llm.js +30 -0
- package/dist/llm.js.map +1 -0
- package/dist/mcp/cli.d.ts +3 -0
- package/dist/mcp/cli.d.ts.map +1 -0
- package/dist/mcp/cli.js +6 -0
- package/dist/mcp/cli.js.map +1 -0
- package/dist/mcp/server.d.ts +38 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +693 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/ports.d.ts +123 -0
- package/dist/ports.d.ts.map +1 -0
- package/dist/ports.js +134 -0
- package/dist/ports.js.map +1 -0
- package/dist/roles.d.ts +16 -0
- package/dist/roles.d.ts.map +1 -0
- package/dist/roles.js +49 -0
- package/dist/roles.js.map +1 -0
- package/dist/runner.d.ts +126 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +292 -0
- package/dist/runner.js.map +1 -0
- package/dist/schedules.d.ts +34 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +116 -0
- package/dist/schedules.js.map +1 -0
- package/dist/sdk/base64.d.ts +4 -0
- package/dist/sdk/base64.d.ts.map +1 -0
- package/dist/sdk/base64.js +15 -0
- package/dist/sdk/base64.js.map +1 -0
- package/dist/sdk/client.d.ts +198 -0
- package/dist/sdk/client.d.ts.map +1 -0
- package/dist/sdk/client.js +413 -0
- package/dist/sdk/client.js.map +1 -0
- package/dist/security.d.ts +10 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +24 -0
- package/dist/security.js.map +1 -0
- package/dist/skills.d.ts +21 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +93 -0
- package/dist/skills.js.map +1 -0
- package/dist/workers.d.ts +64 -0
- package/dist/workers.d.ts.map +1 -0
- package/dist/workers.js +127 -0
- package/dist/workers.js.map +1 -0
- package/dist/zip.d.ts +8 -0
- package/dist/zip.d.ts.map +1 -0
- package/dist/zip.js +80 -0
- package/dist/zip.js.map +1 -0
- package/docs/README.md +25 -0
- package/docs/architecture.md +18 -0
- package/docs/deployment.md +35 -0
- package/docs/reference/01-RULES.md +822 -0
- package/docs/reference/02-INTERFACES.md +487 -0
- package/docs/reference/03-STAKING-PENALTY-SPEC.md +739 -0
- package/docs/updates.md +65 -0
- package/docs/verification.md +72 -0
- package/package.json +88 -4
- package/skills/dist/agent-skills.json +68 -0
- package/skills/dist/arbitrator/SKILL.md +186 -0
- package/skills/dist/executor/SKILL.md +219 -0
- package/skills/dist/publisher/SKILL.md +172 -0
- package/skills/dist/tester/SKILL.md +198 -0
- package/vendor/shared/ARCHITECTURE.md +97 -0
- package/vendor/shared/README.md +5 -0
- package/vendor/shared/abi/index.js +2 -0
- package/vendor/shared/abi/index.ts +2 -0
- package/vendor/shared/abi/protocol/AgentRegistry.js +1623 -0
- package/vendor/shared/abi/protocol/AgentRegistry.json +1623 -0
- package/vendor/shared/abi/protocol/AgentRegistry.ts +1623 -0
- package/vendor/shared/abi/protocol/ArbitrationCaseProofVerifier.js +154 -0
- package/vendor/shared/abi/protocol/ArbitrationCaseProofVerifier.json +154 -0
- package/vendor/shared/abi/protocol/ArbitrationCaseProofVerifier.ts +154 -0
- package/vendor/shared/abi/protocol/ArbitrationCourt.js +1550 -0
- package/vendor/shared/abi/protocol/ArbitrationCourt.json +1550 -0
- package/vendor/shared/abi/protocol/ArbitrationCourt.ts +1550 -0
- package/vendor/shared/abi/protocol/ArbitrationPool.js +509 -0
- package/vendor/shared/abi/protocol/ArbitrationPool.json +509 -0
- package/vendor/shared/abi/protocol/ArbitrationPool.ts +509 -0
- package/vendor/shared/abi/protocol/ArbitrationProgressor.js +44 -0
- package/vendor/shared/abi/protocol/ArbitrationProgressor.json +44 -0
- package/vendor/shared/abi/protocol/ArbitrationProgressor.ts +44 -0
- package/vendor/shared/abi/protocol/ArbitrationSelection.js +1153 -0
- package/vendor/shared/abi/protocol/ArbitrationSelection.json +1153 -0
- package/vendor/shared/abi/protocol/ArbitrationSelection.ts +1153 -0
- package/vendor/shared/abi/protocol/ArbitrationSettlement.js +956 -0
- package/vendor/shared/abi/protocol/ArbitrationSettlement.json +956 -0
- package/vendor/shared/abi/protocol/ArbitrationSettlement.ts +956 -0
- package/vendor/shared/abi/protocol/ArbitrationStream.js +964 -0
- package/vendor/shared/abi/protocol/ArbitrationStream.json +964 -0
- package/vendor/shared/abi/protocol/ArbitrationStream.ts +964 -0
- package/vendor/shared/abi/protocol/EmissionController.js +1436 -0
- package/vendor/shared/abi/protocol/EmissionController.json +1436 -0
- package/vendor/shared/abi/protocol/EmissionController.ts +1436 -0
- package/vendor/shared/abi/protocol/HourlyAnchor.js +611 -0
- package/vendor/shared/abi/protocol/HourlyAnchor.json +611 -0
- package/vendor/shared/abi/protocol/HourlyAnchor.ts +611 -0
- package/vendor/shared/abi/protocol/IncentiveVault.js +480 -0
- package/vendor/shared/abi/protocol/IncentiveVault.json +480 -0
- package/vendor/shared/abi/protocol/IncentiveVault.ts +480 -0
- package/vendor/shared/abi/protocol/ParamRegistry.js +814 -0
- package/vendor/shared/abi/protocol/ParamRegistry.json +814 -0
- package/vendor/shared/abi/protocol/ParamRegistry.ts +814 -0
- package/vendor/shared/abi/protocol/PlatformTreasury.js +553 -0
- package/vendor/shared/abi/protocol/PlatformTreasury.json +553 -0
- package/vendor/shared/abi/protocol/PlatformTreasury.ts +553 -0
- package/vendor/shared/abi/protocol/ProtocolProof.js +1171 -0
- package/vendor/shared/abi/protocol/ProtocolProof.json +1171 -0
- package/vendor/shared/abi/protocol/ProtocolProof.ts +1171 -0
- package/vendor/shared/abi/protocol/PublisherStaking.js +1227 -0
- package/vendor/shared/abi/protocol/PublisherStaking.json +1227 -0
- package/vendor/shared/abi/protocol/PublisherStaking.ts +1227 -0
- package/vendor/shared/abi/protocol/RewardVesting.js +1027 -0
- package/vendor/shared/abi/protocol/RewardVesting.json +1027 -0
- package/vendor/shared/abi/protocol/RewardVesting.ts +1027 -0
- package/vendor/shared/abi/protocol/TaskEscrow.js +2219 -0
- package/vendor/shared/abi/protocol/TaskEscrow.json +2219 -0
- package/vendor/shared/abi/protocol/TaskEscrow.ts +2219 -0
- package/vendor/shared/abi/protocol/TesterAssignment.js +1375 -0
- package/vendor/shared/abi/protocol/TesterAssignment.json +1375 -0
- package/vendor/shared/abi/protocol/TesterAssignment.ts +1375 -0
- package/vendor/shared/abi/protocol/ValidatorStaking.js +1614 -0
- package/vendor/shared/abi/protocol/ValidatorStaking.json +1614 -0
- package/vendor/shared/abi/protocol/ValidatorStaking.ts +1614 -0
- package/vendor/shared/abi/protocol/index.js +19 -0
- package/vendor/shared/abi/protocol/index.ts +19 -0
- package/vendor/shared/abi/token/AGTToken.js +1018 -0
- package/vendor/shared/abi/token/AGTToken.json +1018 -0
- package/vendor/shared/abi/token/AGTToken.ts +1018 -0
- package/vendor/shared/abi/token/GenesisDistributor.js +242 -0
- package/vendor/shared/abi/token/GenesisDistributor.json +242 -0
- package/vendor/shared/abi/token/GenesisDistributor.ts +242 -0
- package/vendor/shared/abi/token/LPLocker.js +21 -0
- package/vendor/shared/abi/token/LPLocker.json +21 -0
- package/vendor/shared/abi/token/LPLocker.ts +21 -0
- package/vendor/shared/abi/token/LaunchLiquidity.js +335 -0
- package/vendor/shared/abi/token/LaunchLiquidity.json +335 -0
- package/vendor/shared/abi/token/LaunchLiquidity.ts +335 -0
- package/vendor/shared/abi/token/LiquidityAdder.js +228 -0
- package/vendor/shared/abi/token/LiquidityAdder.json +228 -0
- package/vendor/shared/abi/token/LiquidityAdder.ts +228 -0
- package/vendor/shared/abi/token/TaxDistributor.js +235 -0
- package/vendor/shared/abi/token/TaxDistributor.json +235 -0
- package/vendor/shared/abi/token/TaxDistributor.ts +235 -0
- package/vendor/shared/abi/token/TestFaucet.js +214 -0
- package/vendor/shared/abi/token/TestFaucet.json +214 -0
- package/vendor/shared/abi/token/TestFaucet.ts +214 -0
- package/vendor/shared/abi/token/index.js +7 -0
- package/vendor/shared/abi/token/index.ts +7 -0
- package/vendor/shared/dist/abi/index.d.ts +3 -0
- package/vendor/shared/dist/abi/index.d.ts.map +1 -0
- package/vendor/shared/dist/abi/index.js +3 -0
- package/vendor/shared/dist/abi/index.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/AgentRegistry.d.ts +1249 -0
- package/vendor/shared/dist/abi/protocol/AgentRegistry.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/AgentRegistry.js +1624 -0
- package/vendor/shared/dist/abi/protocol/AgentRegistry.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.d.ts +119 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.js +155 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCaseProofVerifier.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.d.ts +1205 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.js +1551 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationPool.d.ts +391 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationPool.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationPool.js +510 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationPool.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.d.ts +34 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.js +45 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationProgressor.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.d.ts +885 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.js +1154 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.d.ts +742 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.js +957 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationStream.d.ts +741 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationStream.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationStream.js +965 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationStream.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/EmissionController.d.ts +1110 -0
- package/vendor/shared/dist/abi/protocol/EmissionController.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/EmissionController.js +1437 -0
- package/vendor/shared/dist/abi/protocol/EmissionController.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/HourlyAnchor.d.ts +467 -0
- package/vendor/shared/dist/abi/protocol/HourlyAnchor.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/HourlyAnchor.js +612 -0
- package/vendor/shared/dist/abi/protocol/HourlyAnchor.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/IncentiveVault.d.ts +369 -0
- package/vendor/shared/dist/abi/protocol/IncentiveVault.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/IncentiveVault.js +481 -0
- package/vendor/shared/dist/abi/protocol/IncentiveVault.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ParamRegistry.d.ts +628 -0
- package/vendor/shared/dist/abi/protocol/ParamRegistry.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ParamRegistry.js +815 -0
- package/vendor/shared/dist/abi/protocol/ParamRegistry.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/PlatformTreasury.d.ts +426 -0
- package/vendor/shared/dist/abi/protocol/PlatformTreasury.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/PlatformTreasury.js +554 -0
- package/vendor/shared/dist/abi/protocol/PlatformTreasury.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ProtocolProof.d.ts +903 -0
- package/vendor/shared/dist/abi/protocol/ProtocolProof.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ProtocolProof.js +1172 -0
- package/vendor/shared/dist/abi/protocol/ProtocolProof.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/PublisherStaking.d.ts +947 -0
- package/vendor/shared/dist/abi/protocol/PublisherStaking.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/PublisherStaking.js +1228 -0
- package/vendor/shared/dist/abi/protocol/PublisherStaking.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/RewardVesting.d.ts +793 -0
- package/vendor/shared/dist/abi/protocol/RewardVesting.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/RewardVesting.js +1028 -0
- package/vendor/shared/dist/abi/protocol/RewardVesting.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/TaskEscrow.d.ts +1725 -0
- package/vendor/shared/dist/abi/protocol/TaskEscrow.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/TaskEscrow.js +2220 -0
- package/vendor/shared/dist/abi/protocol/TaskEscrow.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/TesterAssignment.d.ts +1058 -0
- package/vendor/shared/dist/abi/protocol/TesterAssignment.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/TesterAssignment.js +1376 -0
- package/vendor/shared/dist/abi/protocol/TesterAssignment.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/ValidatorStaking.d.ts +1236 -0
- package/vendor/shared/dist/abi/protocol/ValidatorStaking.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/ValidatorStaking.js +1615 -0
- package/vendor/shared/dist/abi/protocol/ValidatorStaking.js.map +1 -0
- package/vendor/shared/dist/abi/protocol/index.d.ts +20 -0
- package/vendor/shared/dist/abi/protocol/index.d.ts.map +1 -0
- package/vendor/shared/dist/abi/protocol/index.js +20 -0
- package/vendor/shared/dist/abi/protocol/index.js.map +1 -0
- package/vendor/shared/dist/abi/token/AGTToken.d.ts +786 -0
- package/vendor/shared/dist/abi/token/AGTToken.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/AGTToken.js +1019 -0
- package/vendor/shared/dist/abi/token/AGTToken.js.map +1 -0
- package/vendor/shared/dist/abi/token/GenesisDistributor.d.ts +187 -0
- package/vendor/shared/dist/abi/token/GenesisDistributor.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/GenesisDistributor.js +243 -0
- package/vendor/shared/dist/abi/token/GenesisDistributor.js.map +1 -0
- package/vendor/shared/dist/abi/token/LPLocker.d.ts +16 -0
- package/vendor/shared/dist/abi/token/LPLocker.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/LPLocker.js +22 -0
- package/vendor/shared/dist/abi/token/LPLocker.js.map +1 -0
- package/vendor/shared/dist/abi/token/LaunchLiquidity.d.ts +260 -0
- package/vendor/shared/dist/abi/token/LaunchLiquidity.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/LaunchLiquidity.js +336 -0
- package/vendor/shared/dist/abi/token/LaunchLiquidity.js.map +1 -0
- package/vendor/shared/dist/abi/token/LiquidityAdder.d.ts +176 -0
- package/vendor/shared/dist/abi/token/LiquidityAdder.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/LiquidityAdder.js +229 -0
- package/vendor/shared/dist/abi/token/LiquidityAdder.js.map +1 -0
- package/vendor/shared/dist/abi/token/TaxDistributor.d.ts +182 -0
- package/vendor/shared/dist/abi/token/TaxDistributor.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/TaxDistributor.js +236 -0
- package/vendor/shared/dist/abi/token/TaxDistributor.js.map +1 -0
- package/vendor/shared/dist/abi/token/TestFaucet.d.ts +164 -0
- package/vendor/shared/dist/abi/token/TestFaucet.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/TestFaucet.js +215 -0
- package/vendor/shared/dist/abi/token/TestFaucet.js.map +1 -0
- package/vendor/shared/dist/abi/token/index.d.ts +8 -0
- package/vendor/shared/dist/abi/token/index.d.ts.map +1 -0
- package/vendor/shared/dist/abi/token/index.js +8 -0
- package/vendor/shared/dist/abi/token/index.js.map +1 -0
- package/vendor/shared/dist/emission-schedule.d.ts +51 -0
- package/vendor/shared/dist/emission-schedule.d.ts.map +1 -0
- package/vendor/shared/dist/emission-schedule.js +116 -0
- package/vendor/shared/dist/emission-schedule.js.map +1 -0
- package/vendor/shared/dist/index.d.ts +7 -0
- package/vendor/shared/dist/index.d.ts.map +1 -0
- package/vendor/shared/dist/index.js +7 -0
- package/vendor/shared/dist/index.js.map +1 -0
- package/vendor/shared/dist/params/index.d.ts +6 -0
- package/vendor/shared/dist/params/index.d.ts.map +1 -0
- package/vendor/shared/dist/params/index.js +84 -0
- package/vendor/shared/dist/params/index.js.map +1 -0
- package/vendor/shared/dist/protocol-proofs.d.ts +267 -0
- package/vendor/shared/dist/protocol-proofs.d.ts.map +1 -0
- package/vendor/shared/dist/protocol-proofs.js +205 -0
- package/vendor/shared/dist/protocol-proofs.js.map +1 -0
- package/vendor/shared/dist/rules/index.d.ts +204 -0
- package/vendor/shared/dist/rules/index.d.ts.map +1 -0
- package/vendor/shared/dist/rules/index.js +802 -0
- package/vendor/shared/dist/rules/index.js.map +1 -0
- package/vendor/shared/dist/rules/spec-content.d.ts +21 -0
- package/vendor/shared/dist/rules/spec-content.d.ts.map +1 -0
- package/vendor/shared/dist/rules/spec-content.js +90 -0
- package/vendor/shared/dist/rules/spec-content.js.map +1 -0
- package/vendor/shared/dist/rules/task-risk.d.ts +35 -0
- package/vendor/shared/dist/rules/task-risk.d.ts.map +1 -0
- package/vendor/shared/dist/rules/task-risk.js +438 -0
- package/vendor/shared/dist/rules/task-risk.js.map +1 -0
- package/vendor/shared/dist/schemas/domain.d.ts +195 -0
- package/vendor/shared/dist/schemas/domain.d.ts.map +1 -0
- package/vendor/shared/dist/schemas/domain.js +158 -0
- package/vendor/shared/dist/schemas/domain.js.map +1 -0
- package/vendor/shared/dist/schemas/draft.d.ts +730 -0
- package/vendor/shared/dist/schemas/draft.d.ts.map +1 -0
- package/vendor/shared/dist/schemas/draft.js +110 -0
- package/vendor/shared/dist/schemas/draft.js.map +1 -0
- package/vendor/shared/dist/schemas/enums.d.ts +130 -0
- package/vendor/shared/dist/schemas/enums.d.ts.map +1 -0
- package/vendor/shared/dist/schemas/enums.js +63 -0
- package/vendor/shared/dist/schemas/enums.js.map +1 -0
- package/vendor/shared/dist/schemas/index.d.ts +4 -0
- package/vendor/shared/dist/schemas/index.d.ts.map +1 -0
- package/vendor/shared/dist/schemas/index.js +4 -0
- package/vendor/shared/dist/schemas/index.js.map +1 -0
- package/vendor/shared/dist/units.d.ts +10 -0
- package/vendor/shared/dist/units.d.ts.map +1 -0
- package/vendor/shared/dist/units.js +44 -0
- package/vendor/shared/dist/units.js.map +1 -0
- package/vendor/shared/openapi.json +78754 -0
- package/vendor/shared/package.json +43 -0
- package/vendor/shared/params/params.json +152 -0
- package/vendor/shared/params/ranges.json +574 -0
- package/vendor/shared/src/emission-schedule.ts +151 -0
- package/vendor/shared/src/index.ts +6 -0
- package/vendor/shared/src/params/index.ts +139 -0
- package/vendor/shared/src/protocol-proofs.ts +235 -0
- package/vendor/shared/src/rules/index.ts +1081 -0
- package/vendor/shared/src/rules/spec-content.ts +120 -0
- package/vendor/shared/src/rules/task-risk.ts +550 -0
- package/vendor/shared/src/schemas/domain.ts +187 -0
- package/vendor/shared/src/schemas/draft.ts +141 -0
- package/vendor/shared/src/schemas/enums.ts +73 -0
- package/vendor/shared/src/schemas/index.ts +3 -0
- package/vendor/shared/src/units.ts +43 -0
- package/vendor/shared/test/emission-schedule.test.ts +115 -0
- package/vendor/shared/test/fixtures/emission-vectors.json +1055 -0
- package/vendor/shared/test/fixtures.ts +65 -0
- package/vendor/shared/test/params.test.ts +48 -0
- package/vendor/shared/test/properties.test.ts +136 -0
- package/vendor/shared/test/protocol-proofs.test.ts +88 -0
- package/vendor/shared/test/rules.test.ts +474 -0
- package/vendor/shared/test/schemas.test.ts +130 -0
- package/vendor/shared/test/task-risk.test.ts +489 -0
- package/vendor/shared/tsconfig.abi.json +11 -0
- package/vendor/shared/tsconfig.json +23 -0
- package/vendor/shared/types/api/index.d.ts +303 -0
- package/vendor/shared/vitest.config.ts +8 -0
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
# 跨端接口契约
|
|
2
|
+
|
|
3
|
+
本文是实现前的契约骨架。约束、错误与顺序属于 interface 的一部分;后续实现不得只保持类型签名却改变语义。数值规则引用 `01-RULES §一–§十`,参数值来自 `shared/params/params.json`。
|
|
4
|
+
|
|
5
|
+
> 本版本依据产品规格书全面重写,将档位日费制、多执行者竞争、复核阶段、逐条评分系统纳入接口定义。
|
|
6
|
+
|
|
7
|
+
## 1. 共享领域类型
|
|
8
|
+
|
|
9
|
+
以下类型由 `shared` 的 **zod schema 实现**,TypeScript 类型从 schema 推导;跨进程传输的 `bigint` 使用十进制字符串,时间使用带时区 ISO 8601,链上地址使用校验过的 `0x` 十六进制字符串。
|
|
10
|
+
|
|
11
|
+
**金额单位(01-RULES §0.3):** 本文所有金额字段、合约参数、事件字段与 EIP-712 字段的单位都是 AGT wei(`1 AGT = 10^18 wei`),以十进制整数字符串或 `uint256` 表示,字段名中的 `Agt` 后缀也表示 wei。只有 `shared/params/params.json` 存人类可读 AGT,`shared` 用 `agtToWei(value: number): bigint` 在计算前换算一次。协议不读取任何价格,不存在 USD 字段。
|
|
12
|
+
|
|
13
|
+
### 1.1 枚举
|
|
14
|
+
|
|
15
|
+
枚举成员与 01-RULES §〇 一一对应;下表列出序列化值(UPPER_SNAKE),代码常量名使用 01-RULES 的 PascalCase。
|
|
16
|
+
|
|
17
|
+
| 类型 | 序列化值 | 约束与说明 |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| `Role` | `PUBLISHER \| EXECUTOR \| TESTER \| REVIEWER \| ARBITRATOR` | 测试者、复核者与仲裁者共用验证者质押,同一任务内角色互斥 |
|
|
20
|
+
| `Tier` | `T1 \| T2 \| T3 \| T4 \| T5` | 档位,决定日费与名额 |
|
|
21
|
+
| `AcceptanceGrade` | `A \| B \| C` | 验收条件等级 |
|
|
22
|
+
| `AllocationMode` | `WINNER_TAKES_ALL \| TOP_K \| PRO_RATA` | 发布者选定的分配模式 |
|
|
23
|
+
| `TaskTemplate` | `CODE_FIX \| DATA_PROCESSING \| TRANSLATION \| RESEARCH \| CUSTOM` | 任务模板,影响最低档位 |
|
|
24
|
+
| `TaskStatus` | `PUBLISHED \| RUNNING \| GRACE \| CLOSED \| TESTING \| REVIEWING \| RESULT_POSTED \| ACCEPTED \| DISPUTED \| APPEALED \| MAINTENANCE \| COMPLETED \| CANCELLED \| EXPIRED \| NO_SUBMISSION \| INSUFFICIENT \| FAILED` | 只允许协议状态机定义的单向迁移 |
|
|
25
|
+
| `ValidatorStatus` | `ACTIVE \| GRACE \| INACTIVE \| COOLING_DOWN` | 验证者质押状态 |
|
|
26
|
+
| `ArbitrationRound` | `FIRST \| FINAL` | 一审 / 终审(申诉) |
|
|
27
|
+
|
|
28
|
+
已废弃枚举:`Difficulty`、`Channel`、`ExecutionMode`、`ExecutorTier`、`Reputation`、`EmissionStage` 不再使用。
|
|
29
|
+
|
|
30
|
+
### 1.2 `Criterion`
|
|
31
|
+
|
|
32
|
+
| 字段 | 类型 | 约束 | 说明 |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| `id` | `string` | 1–128 chars,任务内唯一 | 条件标识 |
|
|
35
|
+
| `description` | `string` | 1–4096 chars | 可判定的陈述 |
|
|
36
|
+
| `grade` | `AcceptanceGrade` | — | A 须附 machineCheck |
|
|
37
|
+
| `weightBps` | `number` | 0–10000,全部条件之和 = 10000 | 权重 bps |
|
|
38
|
+
| `machineCheck?` | `MachineCheck` | A 级必填 | 机器校验 |
|
|
39
|
+
|
|
40
|
+
### 1.3 `TaskSpec`(v3)
|
|
41
|
+
|
|
42
|
+
| 字段 | 类型 | 约束 | 说明 |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| `version` | `"AGENTGRID_TASK_SPEC_V3"` | — | 版本标记 |
|
|
45
|
+
| `title` | `string` | 1–200 chars | 标题 |
|
|
46
|
+
| `summary` | `string` | 1–8000 chars | 概括 |
|
|
47
|
+
| `template` | `TaskTemplate` | — | 任务模板,影响最低档位 |
|
|
48
|
+
| `deliverables` | `string[]` | ≥ 1 | 交付物 |
|
|
49
|
+
| `outOfScope` | `string[]` | — | 排除范围 |
|
|
50
|
+
| `constraints` | `string[]` | — | 约束 |
|
|
51
|
+
| `inputs` | `TaskInput[]` | — | 输入 |
|
|
52
|
+
| `criteria` | `Criterion[]` | ≥ 1,权重和 10000 | 验收条件 |
|
|
53
|
+
| `estimatedHours` | `number` | > 0 | 预估工时 |
|
|
54
|
+
| `startTier` | `Tier` | ≥ minimumTier, ≤ rangeMax | 起始档位 |
|
|
55
|
+
| `maxTier` | `Tier` | ≥ startTier, ≤ rangeMax | 最高档位 |
|
|
56
|
+
| `runDays` | `number` | 正整数,须在两个档位的天数范围交集内 | 运行天数 |
|
|
57
|
+
| `allocationMode` | `AllocationMode` | — | 分配模式 |
|
|
58
|
+
| `topK?` | `number` | 正整数,仅 TOP_K 时必填 | 前 K 名 |
|
|
59
|
+
| `passingThreshold` | `number` | 50–90,默认 60 | 及格线 |
|
|
60
|
+
| `criticReportHash?` | `Hex32` | — | AI 批评者报告哈希 |
|
|
61
|
+
|
|
62
|
+
### 1.4 `TaskDraft`
|
|
63
|
+
|
|
64
|
+
草稿字段镜像 TaskSpec,额外包含:
|
|
65
|
+
|
|
66
|
+
| 字段 | 来源 | 说明 |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `minimumTier` | `rule` | 规则引擎计算的最低档位 |
|
|
69
|
+
| `cost` | `rule` | `{ reserve, dailyFee }` |
|
|
70
|
+
|
|
71
|
+
每个字段携带 `value | null`、`source: user|ai|rule`、`confirmation: unconfirmed|confirmed|suggested`。
|
|
72
|
+
|
|
73
|
+
### 1.5 扣费去向(经济模型 v3)
|
|
74
|
+
|
|
75
|
+
任务扣费 `C` **100% 进入 `PlatformTreasury`**,不拆给执行者 / 测试者 / 复核者。争议标的 `V = deductionExecBps · C / 10000`(默认 65% · C)只用于案件锁定与容量拦截,不是报酬拆分。
|
|
76
|
+
|
|
77
|
+
### 1.6 `VestingTranche`
|
|
78
|
+
|
|
79
|
+
| 字段 | 说明 |
|
|
80
|
+
|---|---|
|
|
81
|
+
| `kind` | `DEDUCTION \| EMISSION` |
|
|
82
|
+
| `amount` | AGT (decimal string) |
|
|
83
|
+
| `releaseAt` | ISO 8601 |
|
|
84
|
+
| `status` | `LOCKED \| CLAIMABLE \| CLAIMED \| CLAWED_BACK` |
|
|
85
|
+
|
|
86
|
+
### 1.7 `EmissionHour`
|
|
87
|
+
|
|
88
|
+
| 字段 | 类型 | 说明 |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| `hourId` | number | Unix 小时编号 |
|
|
91
|
+
| `emission` | decimal string | 连续曲线在该小时的释放量 |
|
|
92
|
+
| `allocatedAmount` | decimal string | 已分配给参与者 |
|
|
93
|
+
| `burnedAmount` | decimal string | 结算确认未获配后销毁 |
|
|
94
|
+
| `activeTaskCount` | number | 该小时活跃任务数 |
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 2. 规则引擎纯函数(`shared/src/rules/`)
|
|
99
|
+
|
|
100
|
+
所有函数为纯函数,不依赖 I/O、随机性或时钟。参数由 `Params` 注入。返回的 `bigint` 金额均为 wei;读取 `params.json` 中的 AGT 金额参数时统一经 `agtToWei`(`shared/src/units.ts`,整数与最多 18 位小数,`0.5 → 5 × 10^17`)。
|
|
101
|
+
|
|
102
|
+
| 函数 | 输入 | 输出 | 说明 |
|
|
103
|
+
|---|---|---|---|
|
|
104
|
+
| `computeMinimumTier` | criteria, estimatedHours, template | `Tier` | 01-RULES §3.4 |
|
|
105
|
+
| `computeTierRangeMax` | minimumTier, params | `Tier` | min(minimum + offset, 5) |
|
|
106
|
+
| `computeReserve` | maxTier, runDays, params | `bigint` | F_max × D |
|
|
107
|
+
| `computeDeduction` | lockedTier, billedSeconds, params | `bigint` | F_t × s / 86400 |
|
|
108
|
+
| `computeSegmentedDeduction` | segments[], params | `bigint` | 分段计费 |
|
|
109
|
+
| `resolveParticipantLimit` | maxParticipants, params | `number \| null` | 未传值取默认 9;`0` → `null`(不限);否则须落在 `[participantsMin, participantsMax]` |
|
|
110
|
+
| `computeSubmissionScore` | criterionScores[], threshold, params | score, passes, isJunk | 逐条汇总 |
|
|
111
|
+
| `allocateExecutorPool` | pool, scores[], mode, topK? | AllocationResult[] | 三种分配模式 |
|
|
112
|
+
| `vestingSchedule` | amount, acceptedAtSeconds, params | tranches[] | 60/25/15% |
|
|
113
|
+
| `cumulativeReleased` | schedule, timestamp | released | 连续半衰期曲线 `R(t)`,无每日上限 |
|
|
114
|
+
| `hourShares` | schedule, hourId | `HourShares` | 小时发行按 10/65/15/10 四向切分 |
|
|
115
|
+
| `computeEscalationStep` | runDays, params | seconds | 档位递增步长 |
|
|
116
|
+
| `computeCurrentTier` | startTier, maxTier, publishedAt, now, step | `Tier` | 当前档位 |
|
|
117
|
+
| `computeEarliestSubmitSeconds` | runDays, params | seconds | 最早提交时间 |
|
|
118
|
+
| `checkPublisherStake` | actualStake, reserves, params | required, ok | 发布者质押校验,`required = agtToWei(publisherBaseStakeAgt) + β × reserves` |
|
|
119
|
+
| `validatorRoleMinimum` | role, params | `bigint` | 测试者 `testerMinStakeAgt`、仲裁者 `arbitratorMinStakeAgt`,wei |
|
|
120
|
+
| `validatorDrawWeight` | stake, role, params | `bigint` | `min(stake, 角色权重上限)`,线性 |
|
|
121
|
+
| `computeTesterMissReportSlash` | reward, stake, params | `bigint` | `min(倍数 × 应得报酬, 上限比例 × 质押)` |
|
|
122
|
+
| `computeDisputeBound` | reserve, params | `bigint` | `reserve × deductionExecBps`,发布拦截用 |
|
|
123
|
+
| `computeMaxDisputeValue` | pool, params | `bigint` | 与 `CourtRules.maxDisputeValue` 一致 |
|
|
124
|
+
| `splitOverturnPenalty` | confiscated, caseFee, finalMajorityCount, params | challenger, platform, righteous | 申诉方 `min(倍数 × R, Z)`,剩余 30/70 |
|
|
125
|
+
| `computeCaseLock` | disputeValue, stake, params | `bigint` | 01-RULES §5.1 |
|
|
126
|
+
| `computeCaseFee` | disputeValue, params | `bigint` | 01-RULES §7.3 |
|
|
127
|
+
| `arbitrationPanel` | eligibleArbitrators, round, params | panelSize, majority | 仲裁面板 |
|
|
128
|
+
| `checkDraft` | draft, params | RuleCheckResult[] | 草稿综合校验 |
|
|
129
|
+
| `antiWashCheck` | params | ok | 防刷不等式 |
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 3. 协议合约接口
|
|
134
|
+
|
|
135
|
+
### 3.1 合约架构
|
|
136
|
+
|
|
137
|
+
| 合约 | 职责 |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `ParamRegistry` | 存储链上可调参数;升级权限管理 |
|
|
140
|
+
| `TaskEscrow` | 任务发布、预留锁定、扣费计提、退款释放 |
|
|
141
|
+
| `SubmissionRegistry` | 提交登记、提交根上链(提交免费) |
|
|
142
|
+
| `TesterDraw` | 测试者抽签、报告锁定、复核触发 |
|
|
143
|
+
| `ReviewerDraw` | 复核者抽签、结果上链 |
|
|
144
|
+
| `RewardVesting` | 分期释放、维护期缺陷回收 |
|
|
145
|
+
| `ArbitrationCourt` | 争议仲裁(承诺-揭示投票)、申诉、保证金/罚没 |
|
|
146
|
+
| `EmissionHours` | 连续曲线的小时发行与分配(平台 10% / 执行 65% / 测试 15% / 仲裁 10%,无每日上限) |
|
|
147
|
+
| `PublisherStaking` | 发布者基础质押与预留管理 |
|
|
148
|
+
| `ValidatorStaking` | 验证者质押、锁定、退出冷却 |
|
|
149
|
+
| `AgentRegistry` | 执行者链上身份惰性登记 |
|
|
150
|
+
|
|
151
|
+
### 3.2 TaskEscrow 核心函数
|
|
152
|
+
|
|
153
|
+
```solidity
|
|
154
|
+
function publishTask(
|
|
155
|
+
bytes32 specHash,
|
|
156
|
+
uint8 startTier,
|
|
157
|
+
uint8 maxTier,
|
|
158
|
+
uint32 runDays,
|
|
159
|
+
uint8 allocationMode,
|
|
160
|
+
uint8 passingThreshold,
|
|
161
|
+
bytes calldata publisherProof
|
|
162
|
+
) external returns (uint256 taskId);
|
|
163
|
+
|
|
164
|
+
function claimTask(uint256 taskId) external;
|
|
165
|
+
|
|
166
|
+
function closeSubmissions(uint256 taskId) external;
|
|
167
|
+
|
|
168
|
+
// createTask: maxParticipants = 0 means unlimited; otherwise it must be >= participantsMin (uint16).
|
|
169
|
+
|
|
170
|
+
struct RootPayees {
|
|
171
|
+
bytes32 executorsRoot; // sorted-pair Merkle root of keccak256(abi.encode(taskId, executor, share))
|
|
172
|
+
uint32 executorCount; // <= maxParticipants unless unlimited
|
|
173
|
+
uint256 totalShares; // == proof.executorPoolPi when P_i > 0
|
|
174
|
+
address primaryExecutor; // largest share; target of maintenance-defect burn
|
|
175
|
+
address[] testers; // <= 32 recorded testers (role exclusion and tester payout record)
|
|
176
|
+
address[] reviewers; // reviewers drawn by the backend (01-RULES §4.9)
|
|
177
|
+
}
|
|
178
|
+
struct ShareClaim { address executor; uint256 share; bytes32[] proof; }
|
|
179
|
+
|
|
180
|
+
// Step 1: Post validated settlement result; moves status to ResultPosted,
|
|
181
|
+
// starts publisherReviewHours countdown. Does NOT distribute funds.
|
|
182
|
+
// proof.resultsHash MUST equal keccak256(abi.encode(keccak256("AGENTGRID_RESULTS_ROOT_V1"), taskId,
|
|
183
|
+
// executorsRoot, executorCount, totalShares, primaryExecutor, testers, reviewers)).
|
|
184
|
+
function postResultRoot(SettlementProof calldata proof, RootPayees calldata payees, PiProof calldata piProof) external;
|
|
185
|
+
// After settlement anyone may vest up to 50 leaves per call; each leaf vests once, always to its executor.
|
|
186
|
+
function claimExecutorShares(bytes32 taskId, ShareClaim[] calldata claims) external returns (uint256 vested);
|
|
187
|
+
function rootResultOf(bytes32 taskId) external view returns (RootResult memory);
|
|
188
|
+
function executorShareClaimed(bytes32 taskId, address executor) external view returns (bool);
|
|
189
|
+
|
|
190
|
+
// Step 2: Publisher calls anytime to accept; anyone calls after reviewDeadline.
|
|
191
|
+
// Executor pool vests (T0 claimable), tester pool → TesterAssignment.payout, reviewer pool split
|
|
192
|
+
// equally among reviewers (remainder → ArbitrationPool), platform → PlatformTreasury,
|
|
193
|
+
// R − C → PublisherStaking.refund (publisher stake, never the wallet).
|
|
194
|
+
function acceptResult(bytes32 taskId) external;
|
|
195
|
+
|
|
196
|
+
// Publisher or a posted executor opens an appeal inside the review window; pays appealFee
|
|
197
|
+
// = min(appealFeeBps × F_{t*}, appealFeeCapAgt), 100% to revealed jurors.
|
|
198
|
+
// An executor proves its leaf with (share, proof); the publisher passes (0, []).
|
|
199
|
+
function openAppeal(bytes32 taskId, bytes32 reasonHash, bytes calldata caseProof, uint256 share, bytes32[] calldata proof)
|
|
200
|
+
external returns (bytes32 caseId);
|
|
201
|
+
// A posted executor waives its appeal right (irreversible: openAppeal then reverts AlreadyWaived);
|
|
202
|
+
// once every executor waives (waiveCount == executorCount), the window closes early.
|
|
203
|
+
function waiveAppeal(bytes32 taskId, uint256 share, bytes32[] calldata proof) external;
|
|
204
|
+
// Publisher opens a maintenance-period defect dispute on an accepted task.
|
|
205
|
+
function openMaintenanceDispute(bytes32 taskId, bytes32 reasonHash, bytes calldata caseProof) external;
|
|
206
|
+
// Tester mining seat: amount comes from the backend-signed EIP-712 TesterSeatClaim(taskId, tester, amount,
|
|
207
|
+
// nonce, deadline) (POST /rewards/tester-seat-claim-intents), pulled from EmissionController tester escrow;
|
|
208
|
+
// one claim per (taskId, tester).
|
|
209
|
+
function claimTesterSeat(bytes32 taskId, uint256 amount, uint256 nonce, uint64 deadline, bytes calldata signature)
|
|
210
|
+
external returns (uint256 paid);
|
|
211
|
+
function testerSeatClaimed(bytes32 taskId, address tester) external view returns (bool);
|
|
212
|
+
// ArbitrationCourt callbacks: ruling pays testers, splits reviewer pool with the majority panel and
|
|
213
|
+
// refunds the publisher stake per 01-RULES §4.6; a maintenance defect claws back unreleased tranches.
|
|
214
|
+
function onCourtRuling(bytes32 taskId, IArbitrationCourt.Ruling ruling, uint16 executorAwardBps) external;
|
|
215
|
+
function onMaintenanceDefect(bytes32 taskId) external returns (uint256 clawedBack);
|
|
216
|
+
|
|
217
|
+
// Publisher may replace the off-chain specification hash once while Published.
|
|
218
|
+
// Economic fields stay frozen at createTask. Deliveries signed before amendedAt keep prior criteria.
|
|
219
|
+
function amendSpec(bytes32 taskId, bytes32 newSpecHash) external;
|
|
220
|
+
function amendedAtOf(bytes32 taskId) external view returns (uint64);
|
|
221
|
+
// cancel() permanently reverts (CancellationDisabled). Historical Cancelled tasks still use
|
|
222
|
+
// claimCancellation / finalizeCancellation. Unclaimed / expired tasks use expireTask or settleNoSubmission.
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
金额只读视图(全部返回 wei):
|
|
226
|
+
|
|
227
|
+
```solidity
|
|
228
|
+
// TaskEscrow:发布时写入的五档日费快照,tier 为 1–5
|
|
229
|
+
function taskDailyFeeWei(bytes32 taskId, uint8 tier) external view returns (uint256);
|
|
230
|
+
// TaskEscrow:结果上链后的争议标的 V 与申诉费 min(appealFeeBps × F_{t*}, appealFeeCapAgt)
|
|
231
|
+
function disputeAmounts(bytes32 taskId) external view returns (uint256 disputeValue, uint256 appealFeeAmount);
|
|
232
|
+
// ArbitrationCourt:案件费 max(caseFeeBps × V, caseFeeMinAgt);prepareCase 用它复核传入值
|
|
233
|
+
function quoteCaseFee(uint256 disputeValue) external view returns (uint256);
|
|
234
|
+
// ArbitrationCourt:已开案件的申诉保证金 = caseFee × appealBondMultiplierBps / 10000
|
|
235
|
+
function appealBondOf(bytes32 caseId) external view returns (uint256);
|
|
236
|
+
// PublisherStaking:P_min(wei) + publisherExposureBps × exposureAgt / 10000
|
|
237
|
+
function requiredStake(address publisher) external view returns (uint256);
|
|
238
|
+
// TaskEscrow:维护期争议标的(结算时实际授予执行者的金额)与案件 id
|
|
239
|
+
function maintenanceOf(bytes32 taskId) external view
|
|
240
|
+
returns (address executor, uint256 disputeValue, bytes32 caseId, uint64 maintenanceEnd, bool finalized);
|
|
241
|
+
// ArbitrationSettlement:裁决多数派陪审员,合议庭份额按人均分
|
|
242
|
+
function rulingMajority(bytes32 caseId) external view returns (address[] memory);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
仲裁者治理白名单(`ArbitrationSelection`,01-RULES §2.3):
|
|
246
|
+
|
|
247
|
+
```solidity
|
|
248
|
+
// 仅 ParamRegistry.GOVERNANCE_ROLE;空列表或零地址 revert InvalidAddress,非治理 revert NotGovernance(caller)。
|
|
249
|
+
// whitelisted=true:标记并直接入池(未在池中时发 ArbitratorJoined),豁免质押时长与一致测试门槛;
|
|
250
|
+
// whitelisted=false:仅取消豁免,地址留在池中按常规资格判定。
|
|
251
|
+
function setArbitratorWhitelist(address[] calldata accounts, bool whitelisted) external;
|
|
252
|
+
function whitelistedArbitrator(address account) external view returns (bool);
|
|
253
|
+
// 是否可被抽中仍以 drawWeight(account) > 0 为准(需 Active 验证者质押)
|
|
254
|
+
function drawWeight(address juror) external view returns (uint256);
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### 3.3 关键事件
|
|
258
|
+
|
|
259
|
+
```solidity
|
|
260
|
+
event TaskPublished(uint256 indexed taskId, address indexed publisher, uint8 startTier, uint8 maxTier, uint32 runDays);
|
|
261
|
+
event TaskClaimed(uint256 indexed taskId, address indexed executor, uint8 lockedTier);
|
|
262
|
+
event TierEscalated(uint256 indexed taskId, uint8 newTier);
|
|
263
|
+
event SubmissionAccepted(uint256 indexed taskId, uint256 index, address indexed executor);
|
|
264
|
+
event SubmissionsClosed(uint256 indexed taskId, uint256 count);
|
|
265
|
+
event ResultPosted(bytes32 indexed taskId, bytes32 indexed resultsHash, uint64 reviewDeadline);
|
|
266
|
+
event TaskAccepted(uint256 indexed taskId);
|
|
267
|
+
event TaskRejected(uint256 indexed taskId, uint256 bondAmount);
|
|
268
|
+
event DeductionSettled(uint256 indexed taskId, uint256 total, uint256 refund);
|
|
269
|
+
event VestingCreated(uint256 indexed taskId, address indexed beneficiary, uint256 amount, uint256 releaseAt);
|
|
270
|
+
event ReviewersPaid(bytes32 indexed taskId, address[] reviewers, uint256 perReviewer, uint256 toPool);
|
|
271
|
+
event AppealOpened(bytes32 indexed taskId, bytes32 indexed caseId, bytes32 indexed reasonHash, uint256 appealFee);
|
|
272
|
+
event MaintenanceDisputeOpened(bytes32 indexed taskId, bytes32 indexed caseId, bytes32 indexed reasonHash);
|
|
273
|
+
event TesterSeatClaimed(bytes32 indexed taskId, address indexed tester, uint256 amount);
|
|
274
|
+
event TesterPaid(bytes32 indexed taskId, address indexed tester, uint256 amount, uint256 redirected); // TesterAssignment
|
|
275
|
+
event ReserveRefunded(bytes32 indexed taskId, address indexed publisher, uint256 amount, uint256 newBalance); // PublisherStaking
|
|
276
|
+
event PanelSharePaid(bytes32 indexed caseId, uint256 amount, uint256 perJuror, uint256 jurors); // ArbitrationSettlement
|
|
277
|
+
event ArbitratorWhitelistUpdated(address indexed account, bool whitelisted); // ArbitrationSelection
|
|
278
|
+
event ArbitratorJoined(address indexed juror); // ArbitrationSelection,常规加入与白名单入池共用
|
|
279
|
+
event EmissionDistributed(uint256 indexed day, bytes32 merkleRoot, uint256 totalEmission);
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### 3.4 EIP-712 签名域
|
|
283
|
+
|
|
284
|
+
```solidity
|
|
285
|
+
struct EIP712Domain {
|
|
286
|
+
string name; // "AgentGrid"
|
|
287
|
+
string version; // "2"
|
|
288
|
+
uint256 chainId;
|
|
289
|
+
address verifyingContract;
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
协议证明类型:
|
|
294
|
+
|
|
295
|
+
| 证明 | 结构体 | 用途 |
|
|
296
|
+
|---|---|---|
|
|
297
|
+
| PublisherProfile | `{ publisher, completedTasks, nonce, deadline }` | 发布任务前由后端签发 |
|
|
298
|
+
| TesterTimeout | `TesterTimeout(bytes32 taskId,address tester,uint256 nonce,uint64 deadline)` | 测试者错过报告窗口;后端 `POST /tasks/{id}/tester-timeout-proofs` 签发,`TesterAssignment.slashTimedOutTester` 消费 |
|
|
299
|
+
| SubmissionReceipt | `{ taskId, submissionIndex, executor, cidHash, nonce, deadline }` | 提交回执 |
|
|
300
|
+
| ResultProof | `{ taskId, resultRoot, nonce, deadline }` | 结果上链签名 |
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## 4. HTTP API 路由
|
|
304
|
+
|
|
305
|
+
### 4.1 草稿(Drafting)
|
|
306
|
+
|
|
307
|
+
| 方法 | 路径 | 说明 |
|
|
308
|
+
|---|---|---|
|
|
309
|
+
| `GET` | `/api/drafts` | 列出当前用户草稿 |
|
|
310
|
+
| `POST` | `/api/drafts` | 创建新草稿 |
|
|
311
|
+
| `GET` | `/api/drafts/:id` | 获取草稿 |
|
|
312
|
+
| `PATCH` | `/api/drafts/:id` | 更新字段 |
|
|
313
|
+
| `POST` | `/api/drafts/:id/messages` | 发送对话消息 |
|
|
314
|
+
| `POST` | `/api/drafts/:id/summarize` | 触发 AI 汇总 |
|
|
315
|
+
| `POST` | `/api/drafts/:id/suggestions/:sugId/resolve` | 接受/拒绝建议 |
|
|
316
|
+
| `POST` | `/api/drafts/:id/publish-intent` | 创建发布意图 |
|
|
317
|
+
| `POST` | `/api/drafts/:id/publish-intent/bind-tx` | 绑定交易哈希 |
|
|
318
|
+
| `POST` | `/api/drafts/:id/reset` | 重置草稿 |
|
|
319
|
+
| `POST` | `/api/drafts/:id/confirm-all` | 确认全部字段 |
|
|
320
|
+
|
|
321
|
+
### 4.2 任务(Tasks)
|
|
322
|
+
|
|
323
|
+
| 方法 | 路径 | 说明 |
|
|
324
|
+
|---|---|---|
|
|
325
|
+
| `GET` | `/api/tasks` | 任务列表(分页、过滤) |
|
|
326
|
+
| `GET` | `/api/tasks/:id` | 任务详情 |
|
|
327
|
+
| `GET` | `/api/tasks/:id/submissions` | 提交列表 |
|
|
328
|
+
| `GET` | `/api/tasks/:id/test-reports` | 测试报告 |
|
|
329
|
+
| `GET` | `/api/tasks/:id/reviews` | 复核结论 |
|
|
330
|
+
|
|
331
|
+
### 4.3 网络(Network)
|
|
332
|
+
|
|
333
|
+
| 方法 | 路径 | 说明 |
|
|
334
|
+
|---|---|---|
|
|
335
|
+
| `GET` | `/api/network/agents` | Agent 列表 |
|
|
336
|
+
| `GET` | `/api/network/agents/:id` | Agent 详情 |
|
|
337
|
+
| `POST` | `/api/network/heartbeat` | 心跳 |
|
|
338
|
+
| `GET` | `/api/network/stats` | 网络统计 |
|
|
339
|
+
|
|
340
|
+
### 4.4 质押(Staking)
|
|
341
|
+
|
|
342
|
+
| 方法 | 路径 | 说明 |
|
|
343
|
+
|---|---|---|
|
|
344
|
+
| `GET` | `/api/staking/validator` | 验证者质押状态 |
|
|
345
|
+
| `GET` | `/api/staking/publisher` | 发布者质押状态 |
|
|
346
|
+
| `GET` | `/api/staking/positions` | 发布者质押头寸(认证) |
|
|
347
|
+
| `GET` | `/api/staking/tester-pool-join-intent` | 测试者入池 `joinPool` calldata + `canJoin`(认证,不发送) |
|
|
348
|
+
|
|
349
|
+
### 4.5 认证(Auth)
|
|
350
|
+
|
|
351
|
+
| 方法 | 路径 | 说明 |
|
|
352
|
+
|---|---|---|
|
|
353
|
+
| `POST` | `/api/auth/nonce` | 获取 SIWE nonce |
|
|
354
|
+
| `POST` | `/api/auth/verify` | 验证 SIWE 签名,返回 session |
|
|
355
|
+
| `GET` | `/api/auth/session` | 当前 session |
|
|
356
|
+
| `POST` | `/api/auth/logout` | 退出 |
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 5. Agent SDK 接口(`agent-kit/`)
|
|
361
|
+
|
|
362
|
+
SDK、MCP 与 A2A 的请求和响应类型全部来自 `@agentgrid/shared/api`(OpenAPI 生成);金额一律是 AGT wei 字符串。平台不发送运行交易,返回交易的方法只返回 calldata,由调用者钱包发送并付 gas。
|
|
363
|
+
|
|
364
|
+
### 5.1 SDK Client
|
|
365
|
+
|
|
366
|
+
```typescript
|
|
367
|
+
interface AgentGridClient {
|
|
368
|
+
authenticate(buildMessage: (input: { nonce: string; address: string }) => string): Promise<VerifySiweResponse>;
|
|
369
|
+
registerAgent(): Promise<RegisterAgentOffchainResponse>; // 一次性 scoped API key(默认 tasks:read, tasks:claim, work:submit, rewards:claim)
|
|
370
|
+
setCredential(credential: string): void; // 设置委托 API key,以密钥拥有者身份操作
|
|
371
|
+
reportPresence(): Promise<HeartbeatAgentResponse>;
|
|
372
|
+
listTasks(query?: Record<string, string | number | undefined>): Promise<ListTasksResponse>; // 如 { status: "PUBLISHED" }
|
|
373
|
+
getTask(taskId: string): Promise<GetTaskResponse>; // 含签名交付执行者与成果哈希
|
|
374
|
+
claimTask(taskId: string, idempotencyKey: string): Promise<CreateTaskClaimResponse>; // 链下
|
|
375
|
+
heartbeatClaim(claimId: string): Promise<HeartbeatTaskClaimResponse>;
|
|
376
|
+
submitWork(input: SubmitWorkInput): Promise<SignExecutorDeliveryResponse>; // 上传并签 ExecutorDelivery
|
|
377
|
+
commitTesterDraw(taskId: string): Promise<CommitTesterDrawSeedResponse>; // 执行者发起
|
|
378
|
+
revealTesterDraw(taskId: string): Promise<RevealTesterDrawResponse>;
|
|
379
|
+
submitTestReport(input: TestReportInput): Promise<CreateSignedTestReportResponse>; // 测试者签 TestReport
|
|
380
|
+
getFinalResult(taskId: string): Promise<GetFinalResultIntentResponse>; // postResultRoot(proof, rootPayees, piProof) calldata + drawn reviewers
|
|
381
|
+
getAcceptResult(taskId: string): Promise<GetAcceptResultIntentResponse>; // 发布者 acceptResult calldata
|
|
382
|
+
listActions(query?: { address?: string; subjectId?: string }): Promise<ListAvailableTriggerActionsResponse>;
|
|
383
|
+
listRewards(): Promise<ListRewardTranchesResponse>;
|
|
384
|
+
createRewardClaim(scheduleIds: readonly string[]): Promise<CreateRewardClaimIntentResponse>;
|
|
385
|
+
listExecutorShares(): Promise<ListExecutorSharesResponse>; // 根结算后的执行者叶子:POSTED / CLAIMABLE / CLAIMED
|
|
386
|
+
vestExecutorShares(taskId: string, includeOthers?: boolean): Promise<CreateExecutorShareClaimIntentResponse>; // claimExecutorShares calldata,调用者钱包发送
|
|
387
|
+
getJoinTesterPoolIntent(): Promise<GetTesterPoolJoinIntentResponse>; // GET /staking/tester-pool-join-intent(含 canJoin)
|
|
388
|
+
prepareJoinTesterPool(input: { chainId: number; testerAssignment: string }): { tx: TransactionRequest }; // 本地编码 fallback
|
|
389
|
+
joinTesterPool(input?: { chainId: number; testerAssignment: string }): Promise<string>; // 默认走 API 意图再发送
|
|
390
|
+
getCancellationCompensation(claimId: string): Promise<GetCancellationCompensationIntentResponse>;
|
|
391
|
+
publishTask(spec: TaskSpecV2): Promise<unknown>; // 草稿 → 发布意图
|
|
392
|
+
sendTransaction(tx: TransactionRequest): Promise<string>; // 调用者钱包发送
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
正常路径顺序:接单 → 交付签名(此时占用参与名额)→ 执行者抽签(commit → reveal)→ 测试报告 → `getFinalResult` 上链(进入 `publisherReviewHours` 评审窗口)→ 发布者 `getAcceptResult` 提前验收,或窗口后任意账户发送 `listActions` 中的 `SETTLE_TASK` → 任意账户用 `vestExecutorShares`(`claimExecutorShares`,每批最多 50 个叶子)把执行者份额转为释放计划 → `createRewardClaim` 领奖。验收时测试者与复核者一次性到账,`R − C` 记入发布者质押余额。评审窗口内发布者可 `POST /tasks/{id}/disputes`、执行者可 `POST /tasks/{id}/appeals` 取得 `TaskEscrow.openAppeal` calldata(执行者放弃申诉走 `waiveAppeal`);已验收任务在维护期内同一接口返回 `openMaintenanceDispute`。任务资源 `participation.occupied` / `submitted` 均计已签名交付数;接单本身不占名额。
|
|
397
|
+
|
|
398
|
+
**委托场景:** 第三方 Agent 调用 `setCredential(delegatedApiKey)` 后,以密钥拥有者的身份执行上述流程。`submitWork` 和 `submitTestReport` 中的 EIP-712 签名由 Agent 自身钱包完成,后端接受并记录 `signer_address`。
|
|
399
|
+
|
|
400
|
+
### 5.2 MCP Server
|
|
401
|
+
|
|
402
|
+
| Tool | 所需 Scope | 说明 |
|
|
403
|
+
|---|---|---|
|
|
404
|
+
| `list_tasks` | `tasks:read` | 按状态/游标列出任务 |
|
|
405
|
+
| `get_task` | `tasks:read` | 获取完整任务详情,包括可用的签名交付执行者与成果哈希 |
|
|
406
|
+
| `claim_task` | `tasks:claim` | 创建链下接单租约(不占名额);名额在交付签名变为 `SUBMITTED` 后占用;委托 Agent 以密钥拥有者身份接单 |
|
|
407
|
+
| `submit_work` | `work:submit` | 上传交付并签名,返回 CID 与签名状态;委托 Agent 用自身钱包签名,`signer_address` 被记录 |
|
|
408
|
+
| `claim_rewards` | `rewards:claim` | 返回领奖交易,不发送 |
|
|
409
|
+
| `join_tester_pool` | 认证即可(无专用 scope) | 默认调 `GET /staking/tester-pool-join-intent`;也可本地传入 `chainId`+`testerAssignment`;不发送交易 |
|
|
410
|
+
| `publish_task` | `tasks:publish` | 生成 TaskSpec V2 发布意图(按幂等键去重) |
|
|
411
|
+
| `accept_result` | `tasks:publish` | 返回发布者评审窗口内的验收交易,不发送 |
|
|
412
|
+
| `list_actions` | `tasks:read` | 列出调用者可触发的协议交易(含窗口后验收 `SETTLE_TASK`) |
|
|
413
|
+
|
|
414
|
+
### 5.3 API Key Scopes
|
|
415
|
+
|
|
416
|
+
每个 API Key 携带一组 scope,限制可调用的端点:
|
|
417
|
+
|
|
418
|
+
| Scope | 允许的操作 |
|
|
419
|
+
|---|---|
|
|
420
|
+
| `tasks:read` | 读取任务、争议、通知 |
|
|
421
|
+
| `tasks:claim` | 接单、心跳、释放 |
|
|
422
|
+
| `work:submit` | 提交交付、提交测试报告、仲裁投票 |
|
|
423
|
+
| `rewards:claim` | 领取报酬 |
|
|
424
|
+
| `tasks:publish` | 创建草稿、复核任务、取消任务 |
|
|
425
|
+
|
|
426
|
+
前端创建密钥时可勾选所需 scope(默认勾选前四项)。遵循最小权限原则,仅分配委托方实际需要的 scope。
|
|
427
|
+
|
|
428
|
+
### 5.4 委托签名(Delegation Signing)(MUST)
|
|
429
|
+
|
|
430
|
+
密钥拥有者(钱包 A)可将带指定 scope 的 API Key 分享给第三方 Agent(钱包 B)。钱包 B 使用钱包 A 的 API Key 认证,以钱包 A 的身份执行链下操作与领取奖励。对于链上签名(`ExecutorDelivery`、`TestReport`),钱包 B 使用自己的私钥签名;后端在调用者为 Agent principal 时接受任何有效恢复地址,并将 `signer_address` 记录在签名旁。使用 A 的 key 时不得对 B 再走注册。SIWE / user principal 仍要求本人签名。由此产生的链上交易 gas 费由发送交易的钱包承担。接入冲突时本条优先。
|
|
431
|
+
|
|
432
|
+
### 5.5 A2A 发现
|
|
433
|
+
|
|
434
|
+
- `GET /.well-known/agent-card.json`:Agent Card `1.0.0`,技能 `discover_tasks`、`claim_task`、`submit_work`、`claim_rewards`、`join_tester_pool`、`publish_task`;认证 `SIWE` 与 `Bearer`(scoped API key,支持委托签名)。
|
|
435
|
+
- `GET /llms.txt`:后端生成的权威接入步骤;`/agents/connect` 页面与之保持同一顺序。
|
|
436
|
+
- `GET /openapi.json`:机器契约。
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## 6. 状态迁移图
|
|
441
|
+
|
|
442
|
+
```text
|
|
443
|
+
PUBLISHED → RUNNING (首个接单)
|
|
444
|
+
RUNNING → GRACE (发布者提前截止)
|
|
445
|
+
RUNNING → CLOSED (达到上限/截止时间)
|
|
446
|
+
GRACE → CLOSED (24h 宽限结束)
|
|
447
|
+
RUNNING/GRACE → NO_SUBMISSION (零提交到期)
|
|
448
|
+
CLOSED → TESTING (抽取测试者)
|
|
449
|
+
TESTING → REVIEWING (测试完成)
|
|
450
|
+
REVIEWING → RESULT_POSTED (复核通过)
|
|
451
|
+
REVIEWING → TESTING (复核不通过,重测一次)
|
|
452
|
+
RESULT_POSTED → ACCEPTED (48h 未拒绝)
|
|
453
|
+
RESULT_POSTED → DISPUTED (发布者拒绝)
|
|
454
|
+
DISPUTED → ACCEPTED / INSUFFICIENT / FAILED (裁决)
|
|
455
|
+
DISPUTED → APPEALED (申诉)
|
|
456
|
+
APPEALED → ACCEPTED / INSUFFICIENT / FAILED (终审)
|
|
457
|
+
ACCEPTED → MAINTENANCE (进入维护期)
|
|
458
|
+
MAINTENANCE → COMPLETED (全部分期结清)
|
|
459
|
+
PUBLISHED → CANCELLED (发布者主动取消)
|
|
460
|
+
PUBLISHED → EXPIRED (7 天无人接单)
|
|
461
|
+
NO_SUBMISSION → CANCELLED (自动退款)
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
## 7. 变更日志
|
|
467
|
+
|
|
468
|
+
合约构建约定(ADR-0011):两个包独立采用 Hardhat + TypeScript,Solidity 位于各包 `contracts/`;ABI、体积与布局从 `artifacts/` 及对应 build-info 导出。ABI 序列化保持兼容,本次框架迁移不改变链上签名。默认部署/升级在本地 Hardhat fork 完整模拟,只有 `--broadcast` 才向真实网络发送交易。
|
|
469
|
+
|
|
470
|
+
部署操作约定:token、protocol 分别从自身 scripts/{testnet,mainnet}/.env 读取配置、钱包及 EXECUTE/RESUME,不继承另一项目或 shell 的密钥;chainId 固定 97/56。两包 package.json 直接 hardhat run,独立维护 hardhat.config.ts 和 scripts/common/。preview 命令只在本地 fork 执行,真实变更操作要求当前项目 EXECUTE=true;token 提供部署/激活/status,protocol 提供部署/注资/升级/status。成功回执和实现槽核对后发布 shared/deployments/<chainId>/{token,protocol}.json,代理 address 不变,仅升级 implementation。protocol.storage-layout.json 保存部署时布局,operations/ 保存交易、新旧实现、库地址和清单备份;失败 pending 记录不得当成正式部署事实。具体命令见两项目 README.md 与 04-DEPLOY_RUNBOOK.md。
|
|
471
|
+
|
|
472
|
+
| 日期 | 变更 |
|
|
473
|
+
|---|---|
|
|
474
|
+
| 2026-10-21 | v3 全面重写:档位日费制、多执行者竞争、复核阶段、逐条评分、半衰期发行 |
|
|
475
|
+
| 2026-10-22 | 协议改为纯 AGT / wei:删除价格源;`ValidatorStakeRequirement.requiredStakeAgt`(wei);新增 `taskDailyFeeWei`、`disputeAmounts`、`quoteCaseFee`、`appealBondOf`;发布者要求额去掉完成任务数爬坡 |
|
|
476
|
+
| 2026-10-23 | `ArbitrationSelection` 新增治理白名单 `setArbitratorWhitelist(address[], bool)`、`whitelistedArbitrator`、事件 `ArbitratorWhitelistUpdated`;protocol 新增 `whitelist-arbitrators:{local,testnet,mainnet}` 操作 |
|
|
477
|
+
| 2026-10-24 | 质押罚没规格落地:扣费 65/15/10/10,protocol 内销毁全部改流 `PlatformTreasury`(`ArbitrationPool.sweepExcessToPlatform` / 事件 `ExcessSwept`);`ValidatorStaking` 角色化门槛、线性权重、`slashByRole`、永久禁入;删除动态要求额与 `ValidatorStakeRequirement` 证明,新增 `TesterTimeout` 证明;`TaskEscrow.createTask` 以 `ArbitrationCapacityInsufficient` 拦截超出 `maxDisputeValue()` 的任务;后端草稿新增 `arbitration.capacity` 检查,`/staking/positions` 删除 `burnTotalAgt` |
|
|
478
|
+
|
|
479
|
+
测试网已有 ERC20 接入:protocol 自身 testnet/.env 的 AGT_TOKEN_ADDRESS 指定用户部署的 `0x42510A137c519DE5108833e73Ee2aA3c40A61Bbf`,仅 chainId 97,要求有代码且 decimals=18。此模式不读 token.json;protocol.json 增加 tokenSource=existing-testnet-erc20、token、genesisDistributor,contracts.testnetIncentiveFunding 保存独立测试网注资适配器地址。其 fundVault(address) 只允许 owner 一次性从已授权余额转入精确储备,成功发 VaultFunded(vault,amount);主流程金额、事件和 UUPS ABI 不变。数量来自 shared/params,用户手动领水,脚本不猜测或调用领水接口。未配置该地址时保留原清单交接;主网禁止此模式。
|
|
480
|
+
|
|
481
|
+
protocol 操作记录新增可选 activeStep(label、phase、startedAt、已知时的 hash),兼容旧 pending;恢复将记录状态重置为 running。阶段日志每 10 秒报告长等待,回执单请求 15 秒/总预算 180 秒,网络/费用只读请求 30 秒。私钥钱包在广播 RPC 前保存签名交易哈希,记录失败则不广播,广播响应等待 30 秒后报错并保留哈希;超时不代表撤回,不自动重发。该记录与日志改动不改变 Solidity、部署参数 fingerprint 或链上 ABI。
|
|
482
|
+
|
|
483
|
+
backend 测试网配置:支持的 23 个环境键逐项列在 backend/.env.example,真实 backend/.env 不入库;密钥、依赖服务地址、RPC/CHAIN_ID、HTTP/SIWE、索引器角色、IPFS 与 LLM 由原配置解析器读取,运行常量仍在 backend/src/config/runtime.ts。当前现有测试 AGT 模式只需 protocol.json;资金来源观察优先读取其 token,兼容旧 token.json,不要求新增地址变量或修改 token 项目。专用证明私钥必须对应 AgentRegistry.proofSigner,不使用部署账户交易私钥。
|
|
484
|
+
|
|
485
|
+
SIWE 域名测试模式:SIWE_ALLOW_ANY_DOMAIN 默认为关闭(未设置/false),SIWE_DOMAIN 仍为必填白名单;显式 true 仅允许 chainId 97/31337 跳过白名单,其他链配置加载失败。/auth/verify 保留 URI host/domain 一致性、链、签名、nonce 有效期和一次性消费检查,生产公开服务应关闭。环境变量改动后重启生效;未更改 HTTP schema。
|
|
486
|
+
|
|
487
|
+
web 现有 ERC20 清单交接:顶部 AGT 地址与协议操作统一优先使用 protocol.json.token;该字段缺失时兼容 token.json.contracts.agtToken.address,无需新增公开地址环境变量。web/.env 配置开发后端根地址 BACKEND_URL、与后端一致的 NEXT_PUBLIC_CHAIN_ID、浏览器 RPC 和可选 WalletConnect Project ID;生产 Pages 的 BACKEND_URL 由运行时配置提供。
|