skillpp 0.1.0
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/COMPATIBILITY.md +58 -0
- package/LICENSE +21 -0
- package/README.md +307 -0
- package/README.zh-CN.md +307 -0
- package/SKILL.md +490 -0
- package/adapters/binance-ai.md +22 -0
- package/adapters/claude.md +21 -0
- package/adapters/gemini.md +26 -0
- package/adapters/gpt.md +28 -0
- package/adapters/kimi.md +26 -0
- package/adapters/mimo.md +22 -0
- package/adapters/openclaw.md +29 -0
- package/assets/skillpp-banner.png +0 -0
- package/package.json +59 -0
- package/pipelines.md +310 -0
- package/prompts/newbie-mode.md +48 -0
- package/prompts/router-prompt.md +32 -0
- package/prompts/universal-system-prompt.md +41 -0
- package/registry.md +209 -0
- package/rules.md +323 -0
- package/schemas/audit.schema.json +67 -0
- package/schemas/checkpoint.schema.json +86 -0
- package/schemas/handoff.schema.json +82 -0
- package/schemas/token.schema.json +36 -0
- package/scripts/compatibility-check.mjs +130 -0
- package/scripts/selftest.mjs +384 -0
- package/scripts/skillpp.mjs +448 -0
- package/scripts/validate-skillpp.mjs +140 -0
- package/skillpp.manifest.json +714 -0
- package/skills/audit-plus/SKILL.md +612 -0
- package/skills/binance/binance/CHANGELOG.md +112 -0
- package/skills/binance/binance/LICENSE.md +9 -0
- package/skills/binance/binance/SKILL.md +69 -0
- package/skills/binance/binance/references/algo.md +21 -0
- package/skills/binance/binance/references/alpha.md +9 -0
- package/skills/binance/binance/references/auth.md +32 -0
- package/skills/binance/binance/references/c2c.md +5 -0
- package/skills/binance/binance/references/convert.md +19 -0
- package/skills/binance/binance/references/copy-trading.md +6 -0
- package/skills/binance/binance/references/crypto-loan.md +27 -0
- package/skills/binance/binance/references/derivatives-options-streams.md +25 -0
- package/skills/binance/binance/references/derivatives-options.md +85 -0
- package/skills/binance/binance/references/derivatives-portfolio-margin-pro-streams.md +5 -0
- package/skills/binance/binance/references/derivatives-portfolio-margin-pro.md +34 -0
- package/skills/binance/binance/references/derivatives-portfolio-margin-streams.md +5 -0
- package/skills/binance/binance/references/derivatives-portfolio-margin.md +146 -0
- package/skills/binance/binance/references/dual-investment.md +15 -0
- package/skills/binance/binance/references/fiat.md +9 -0
- package/skills/binance/binance/references/futures-coin-streams.md +29 -0
- package/skills/binance/binance/references/futures-coin.md +109 -0
- package/skills/binance/binance/references/futures-usds-streams.md +35 -0
- package/skills/binance/binance/references/futures-usds.md +144 -0
- package/skills/binance/binance/references/gift-card.md +10 -0
- package/skills/binance/binance/references/margin-trading-streams.md +6 -0
- package/skills/binance/binance/references/margin-trading.md +101 -0
- package/skills/binance/binance/references/mining.md +17 -0
- package/skills/binance/binance/references/pay.md +5 -0
- package/skills/binance/binance/references/rebate.md +5 -0
- package/skills/binance/binance/references/simple-earn.md +56 -0
- package/skills/binance/binance/references/spot-streams.md +25 -0
- package/skills/binance/binance/references/spot.md +114 -0
- package/skills/binance/binance/references/staking.md +59 -0
- package/skills/binance/binance/references/sub-account.md +67 -0
- package/skills/binance/binance/references/vip-loan.md +27 -0
- package/skills/binance/binance/references/wallet.md +75 -0
- package/skills/binance/fiat/CHANGELOG.md +11 -0
- package/skills/binance/fiat/LICENSE.md +9 -0
- package/skills/binance/fiat/SKILL.md +169 -0
- package/skills/binance/fiat/references/authentication.md +126 -0
- package/skills/binance/fiat/references/sapi-endpoints.md +217 -0
- package/skills/binance/onchain-pay/.local.md.example +10 -0
- package/skills/binance/onchain-pay/CHANGELOG.md +20 -0
- package/skills/binance/onchain-pay/LICENSE.md +9 -0
- package/skills/binance/onchain-pay/SKILL.md +466 -0
- package/skills/binance/onchain-pay/references/authentication.md +92 -0
- package/skills/binance/onchain-pay/scripts/sign_and_call.sh +52 -0
- package/skills/binance/p2p/CHANGELOG.md +33 -0
- package/skills/binance/p2p/LICENSE.md +9 -0
- package/skills/binance/p2p/SKILL.md +1082 -0
- package/skills/binance/p2p/references/agent-sapi-api.md +795 -0
- package/skills/binance/p2p/references/authentication.md +100 -0
- package/skills/binance/payment/SKILL.md +824 -0
- package/skills/binance/payment/common.py +560 -0
- package/skills/binance/payment/payment_skill.py +86 -0
- package/skills/binance/payment/receive.py +109 -0
- package/skills/binance/payment/references/setup-guide.md +77 -0
- package/skills/binance/payment/requirements.txt +4 -0
- package/skills/binance/payment/send.py +952 -0
- package/skills/binance/payment/send_extension/__init__.py +43 -0
- package/skills/binance/payment/send_extension/base.py +48 -0
- package/skills/binance/payment/send_extension/c2c.py +193 -0
- package/skills/binance/payment/send_extension/pix.py +316 -0
- package/skills/binance/square-post/README.md +62 -0
- package/skills/binance/square-post/SKILL.md +171 -0
- package/skills/binance/square-post/scripts/lib.mjs +175 -0
- package/skills/binance/square-post/scripts/post-image.mjs +80 -0
- package/skills/binance/square-post/scripts/post-text.mjs +41 -0
- package/skills/binance/square-post/scripts/post-video.mjs +110 -0
- package/skills/binance/square-post/scripts/save-key.mjs +34 -0
- package/skills/binance-web3/binance-agentic-wallet/SKILL.md +150 -0
- package/skills/binance-web3/binance-agentic-wallet/references/authentication.md +136 -0
- package/skills/binance-web3/binance-agentic-wallet/references/limit-order.md +204 -0
- package/skills/binance-web3/binance-agentic-wallet/references/market-order.md +179 -0
- package/skills/binance-web3/binance-agentic-wallet/references/prediction.md +489 -0
- package/skills/binance-web3/binance-agentic-wallet/references/preflight.md +66 -0
- package/skills/binance-web3/binance-agentic-wallet/references/security.md +47 -0
- package/skills/binance-web3/binance-agentic-wallet/references/send.md +53 -0
- package/skills/binance-web3/binance-agentic-wallet/references/wallet-setting.md +86 -0
- package/skills/binance-web3/binance-agentic-wallet/references/wallet-view.md +312 -0
- package/skills/binance-web3/binance-agentic-wallet/references/x402-payment.md +259 -0
- package/skills/binance-web3/binance-tokenized-securities-info/SKILL.md +613 -0
- package/skills/binance-web3/crypto-market-rank/SKILL.md +91 -0
- package/skills/binance-web3/crypto-market-rank/references/cli.md +219 -0
- package/skills/binance-web3/crypto-market-rank/scripts/cli.mjs +149 -0
- package/skills/binance-web3/meme-rush/SKILL.md +72 -0
- package/skills/binance-web3/meme-rush/references/cli.md +158 -0
- package/skills/binance-web3/meme-rush/scripts/cli.mjs +101 -0
- package/skills/binance-web3/query-address-info/SKILL.md +61 -0
- package/skills/binance-web3/query-address-info/references/cli.md +56 -0
- package/skills/binance-web3/query-address-info/scripts/cli.mjs +132 -0
- package/skills/binance-web3/query-token-audit/SKILL.md +162 -0
- package/skills/binance-web3/query-token-info/SKILL.md +83 -0
- package/skills/binance-web3/query-token-info/references/cli.md +135 -0
- package/skills/binance-web3/query-token-info/scripts/cli.mjs +112 -0
- package/skills/binance-web3/trading-signal/SKILL.md +66 -0
- package/skills/binance-web3/trading-signal/references/cli.md +90 -0
- package/skills/binance-web3/trading-signal/scripts/cli.mjs +92 -0
- package/skills/four-meme/four-guard/API-Contract-TaxToken.md +277 -0
- package/skills/four-meme/four-guard/API-CreateToken.02-02-2026.md +285 -0
- package/skills/four-meme/four-guard/API-Documents.03-03-2026.md +789 -0
- package/skills/four-meme/four-guard/AgentIdentifier.abi +585 -0
- package/skills/four-meme/four-guard/README.md +21 -0
- package/skills/four-meme/four-guard/SKILL.md +31 -0
- package/skills/four-meme/four-guard/TaxToken.abi +969 -0
- package/skills/four-meme/four-guard/TokenIdentifierSample.js_ +81 -0
- package/skills/four-meme/four-guard/TokenIdentifierSample.sol +69 -0
- package/skills/four-meme/four-guard/TokenManager.lite.abi +836 -0
- package/skills/four-meme/four-guard/TokenManager2.lite.abi +2325 -0
- package/skills/four-meme/four-guard/TokenManagerHelper3.abi +999 -0
- package/skills/four-meme/four-guard/go.mod +36 -0
- package/skills/four-meme/four-guard/go.sum +127 -0
- package/skills/four-meme/four-guard/main.go +183 -0
- package/skills/four-meme/four-meme-ai/SKILL.md +31 -0
- package/skills/four-meme/four-meme-ai/references/agent-creator-and-wallets.md +87 -0
- package/skills/four-meme/four-meme-ai/references/api-create-token.md +55 -0
- package/skills/four-meme/four-meme-ai/references/contract-addresses.md +47 -0
- package/skills/four-meme/four-meme-ai/references/create-token-scripts.md +131 -0
- package/skills/four-meme/four-meme-ai/references/errors.md +29 -0
- package/skills/four-meme/four-meme-ai/references/event-listening.md +75 -0
- package/skills/four-meme/four-meme-ai/references/execute-trade.md +31 -0
- package/skills/four-meme/four-meme-ai/references/tax-token-query.md +38 -0
- package/skills/four-meme/four-meme-ai/references/token-query-api.md +44 -0
- package/skills/four-meme/four-meme-ai/references/token-tax-info.md +77 -0
- package/skills/four-meme/four-meme-ai/scripts/8004-balance.ts +52 -0
- package/skills/four-meme/four-meme-ai/scripts/8004-register.ts +108 -0
- package/skills/four-meme/four-meme-ai/scripts/create-token-api.ts +321 -0
- package/skills/four-meme/four-meme-ai/scripts/create-token-chain.ts +102 -0
- package/skills/four-meme/four-meme-ai/scripts/create-token-instant.ts +106 -0
- package/skills/four-meme/four-meme-ai/scripts/execute-buy.ts +198 -0
- package/skills/four-meme/four-meme-ai/scripts/execute-sell.ts +150 -0
- package/skills/four-meme/four-meme-ai/scripts/get-public-config.ts +25 -0
- package/skills/four-meme/four-meme-ai/scripts/get-recent-events.ts +76 -0
- package/skills/four-meme/four-meme-ai/scripts/get-tax-token-info.ts +69 -0
- package/skills/four-meme/four-meme-ai/scripts/get-token-info.ts +94 -0
- package/skills/four-meme/four-meme-ai/scripts/quote-buy.ts +85 -0
- package/skills/four-meme/four-meme-ai/scripts/quote-sell.ts +66 -0
- package/skills/four-meme/four-meme-ai/scripts/send-token.ts +98 -0
- package/skills/four-meme/four-meme-ai/scripts/token-get.ts +31 -0
- package/skills/four-meme/four-meme-ai/scripts/token-list.ts +134 -0
- package/skills/four-meme/four-meme-ai/scripts/token-rankings.ts +162 -0
- package/skills/four-meme/four-meme-ai/scripts/verify-events.ts +47 -0
- package/skills/four-meme/four-meme-integration/SKILL.md +374 -0
- package/skills/four-meme/four-meme-integration/references/agent-creator-and-wallets.md +87 -0
- package/skills/four-meme/four-meme-integration/references/api-create-token.md +55 -0
- package/skills/four-meme/four-meme-integration/references/contract-addresses.md +47 -0
- package/skills/four-meme/four-meme-integration/references/create-token-scripts.md +131 -0
- package/skills/four-meme/four-meme-integration/references/errors.md +29 -0
- package/skills/four-meme/four-meme-integration/references/event-listening.md +75 -0
- package/skills/four-meme/four-meme-integration/references/execute-trade.md +31 -0
- package/skills/four-meme/four-meme-integration/references/tax-token-query.md +38 -0
- package/skills/four-meme/four-meme-integration/references/token-query-api.md +44 -0
- package/skills/four-meme/four-meme-integration/references/token-tax-info.md +77 -0
- package/skills/four-meme/four-meme-integration/scripts/8004-balance.ts +52 -0
- package/skills/four-meme/four-meme-integration/scripts/8004-register.ts +108 -0
- package/skills/four-meme/four-meme-integration/scripts/create-token-api.ts +321 -0
- package/skills/four-meme/four-meme-integration/scripts/create-token-chain.ts +102 -0
- package/skills/four-meme/four-meme-integration/scripts/create-token-instant.ts +106 -0
- package/skills/four-meme/four-meme-integration/scripts/execute-buy.ts +198 -0
- package/skills/four-meme/four-meme-integration/scripts/execute-sell.ts +150 -0
- package/skills/four-meme/four-meme-integration/scripts/get-public-config.ts +25 -0
- package/skills/four-meme/four-meme-integration/scripts/get-recent-events.ts +76 -0
- package/skills/four-meme/four-meme-integration/scripts/get-tax-token-info.ts +69 -0
- package/skills/four-meme/four-meme-integration/scripts/get-token-info.ts +94 -0
- package/skills/four-meme/four-meme-integration/scripts/quote-buy.ts +85 -0
- package/skills/four-meme/four-meme-integration/scripts/quote-sell.ts +66 -0
- package/skills/four-meme/four-meme-integration/scripts/send-token.ts +98 -0
- package/skills/four-meme/four-meme-integration/scripts/token-get.ts +31 -0
- package/skills/four-meme/four-meme-integration/scripts/token-list.ts +134 -0
- package/skills/four-meme/four-meme-integration/scripts/token-rankings.ts +162 -0
- package/skills/four-meme/four-meme-integration/scripts/verify-events.ts +47 -0
- package/skills/skillpp/contract-profiler/SKILL.md +118 -0
- package/skills/skillpp/newbie-tutor/SKILL.md +85 -0
- package/skills/skillpp/opportunity-board/SKILL.md +87 -0
- package/skills/skillpp/risk-fusion/SKILL.md +146 -0
- package/skills/skillpp/scam-pattern-lab/SKILL.md +115 -0
- package/skills/skillpp/wallet-doctor/SKILL.md +119 -0
- package/skills/skillpp/watchtower/SKILL.md +72 -0
- package/tests/compatibility/v0.1.0.json +117 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://skillpp.ai/schemas/checkpoint.schema.json",
|
|
4
|
+
"title": "Checkpoint Schema",
|
|
5
|
+
"description": "Defines a mandatory stop point in the pipeline where AI must wait for user confirmation before proceeding. This is the machine-readable enforcement of Skill++'s safety boundaries.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["checkpointId", "trigger", "requiredAction", "blockUntil"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"checkpointId": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Unique identifier for this checkpoint (e.g. AUDIT_RESULT, TRADE_CONFIRM, CREATE_TOKEN)"
|
|
12
|
+
},
|
|
13
|
+
"trigger": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["condition"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"condition": { "type": "string", "description": "When this checkpoint activates" },
|
|
18
|
+
"riskThreshold": { "type": "number", "description": "Minimum risk score that triggers mandatory block" }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"requiredAction": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": ["display", "waitFor"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"display": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": { "type": "string" },
|
|
28
|
+
"description": "Information AI MUST display before proceeding"
|
|
29
|
+
},
|
|
30
|
+
"waitFor": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": { "type": "string" },
|
|
33
|
+
"description": "User responses that satisfy this checkpoint"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"blockUntil": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": ["USER_CONFIRMS", "USER_REJECTS", "USER_EXPLICIT_BYPASS", "TIMEOUT"],
|
|
40
|
+
"description": "What condition releases the checkpoint"
|
|
41
|
+
},
|
|
42
|
+
"onReject": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"action": { "type": "string", "enum": ["ABORT", "RETRY", "FALLBACK"] },
|
|
46
|
+
"fallbackPipeline": { "type": "string" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"canBypass": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"description": "Whether the user can skip this checkpoint. FALSE for write operations.",
|
|
52
|
+
"default": false
|
|
53
|
+
},
|
|
54
|
+
"securityLevel": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["ADVISORY", "WARNING", "BLOCKING"],
|
|
57
|
+
"description": "ADVISORY=inform user but continue; WARNING=strong caution; BLOCKING=hard stop, no bypass"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"examples": [
|
|
61
|
+
{
|
|
62
|
+
"checkpointId": "AUDIT_RESULT",
|
|
63
|
+
"trigger": { "condition": "audit completed with result", "riskThreshold": 4 },
|
|
64
|
+
"requiredAction": {
|
|
65
|
+
"display": ["risk score", "all findings with isHit=true", "disclaimer"],
|
|
66
|
+
"waitFor": ["继续", "放弃", "深入分析"]
|
|
67
|
+
},
|
|
68
|
+
"blockUntil": "USER_CONFIRMS",
|
|
69
|
+
"onReject": { "action": "ABORT" },
|
|
70
|
+
"canBypass": false,
|
|
71
|
+
"securityLevel": "BLOCKING"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"checkpointId": "TRADE_CONFIRM",
|
|
75
|
+
"trigger": { "condition": "before any write/send/swap transaction" },
|
|
76
|
+
"requiredAction": {
|
|
77
|
+
"display": ["token info", "amount", "estimated cost", "audit result"],
|
|
78
|
+
"waitFor": ["确认交易", "CONFIRM", "execute"]
|
|
79
|
+
},
|
|
80
|
+
"blockUntil": "USER_CONFIRMS",
|
|
81
|
+
"onReject": { "action": "ABORT" },
|
|
82
|
+
"canBypass": false,
|
|
83
|
+
"securityLevel": "BLOCKING"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://skillpp.ai/schemas/handoff.schema.json",
|
|
4
|
+
"title": "Skill Handoff Schema",
|
|
5
|
+
"description": "Standardized data interchange between skills in the Skill++ pipeline.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["_meta", "input"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"_meta": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["pipeline", "step", "timestamp", "source"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"pipeline": { "type": "string", "description": "Pipeline ID (e.g. P_TOKEN_ANALYSIS)" },
|
|
14
|
+
"step": { "type": "integer", "description": "Current step number in the pipeline" },
|
|
15
|
+
"timestamp": { "type": "integer", "description": "Unix timestamp of handoff creation" },
|
|
16
|
+
"source": { "type": "string", "description": "Skill name that produced this data" },
|
|
17
|
+
"chain": { "type": "string", "description": "Chain name (BSC/Ethereum/Base/Solana)" },
|
|
18
|
+
"chainId": { "type": "string", "description": "Chain ID (56/1/8453/CT_501)" },
|
|
19
|
+
"confidence": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["HIGH", "MEDIUM", "LOW", "UNKNOWN"],
|
|
22
|
+
"description": "Confidence level of the data"
|
|
23
|
+
},
|
|
24
|
+
"needsVerification": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": { "type": "string" },
|
|
27
|
+
"description": "Fields that should be cross-verified by another skill"
|
|
28
|
+
},
|
|
29
|
+
"verifiedBy": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": { "type": "string" },
|
|
32
|
+
"description": "Skills that have verified this data"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"input": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["raw", "type"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"raw": { "type": "string", "description": "Original user input" },
|
|
41
|
+
"type": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["explorer_url", "address", "token_symbol", "source_code", "intent"],
|
|
44
|
+
"description": "Classification of user input"
|
|
45
|
+
},
|
|
46
|
+
"chainId": { "type": "string" },
|
|
47
|
+
"contractAddress": { "type": "string" },
|
|
48
|
+
"walletAddress": { "type": "string" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"token": { "$ref": "token.schema.json" },
|
|
52
|
+
"audit": { "$ref": "audit.schema.json" },
|
|
53
|
+
"market": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"smartMoneySignals": { "type": "array" },
|
|
57
|
+
"rankings": { "type": "array" },
|
|
58
|
+
"socialTopics": { "type": "array" }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"wallet": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"address": { "type": "string" },
|
|
65
|
+
"positions": { "type": "array" },
|
|
66
|
+
"healthScore": { "type": "number" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"nextActions": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"required": ["action", "pipeline"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"action": { "type": "string", "description": "Recommended next action" },
|
|
76
|
+
"pipeline": { "type": "string", "description": "Pipeline ID to execute" },
|
|
77
|
+
"reason": { "type": "string" }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://skillpp.ai/schemas/token.schema.json",
|
|
4
|
+
"title": "Token Info Schema",
|
|
5
|
+
"description": "Standardized token information produced by query-token-info and consumed by downstream skills.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["contractAddress", "chainId"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": { "type": "string" },
|
|
10
|
+
"symbol": { "type": "string" },
|
|
11
|
+
"contractAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
|
|
12
|
+
"chainId": { "type": "string", "enum": ["1", "56", "8453", "CT_501"] },
|
|
13
|
+
"chain": { "type": "string", "enum": ["Ethereum", "BSC", "Base", "Solana"] },
|
|
14
|
+
"decimals": { "type": "integer" },
|
|
15
|
+
"totalSupply": { "type": "string" },
|
|
16
|
+
"icon": { "type": "string", "description": "Token logo URL" },
|
|
17
|
+
"website": { "type": "string" },
|
|
18
|
+
"twitter": { "type": "string" },
|
|
19
|
+
"telegram": { "type": "string" },
|
|
20
|
+
"creator": { "type": "string" },
|
|
21
|
+
"creationTx": { "type": "string" },
|
|
22
|
+
"price": { "type": "string", "description": "Current price in USD" },
|
|
23
|
+
"priceChange24h": { "type": "string" },
|
|
24
|
+
"volume24h": { "type": "string" },
|
|
25
|
+
"marketCap": { "type": "string" },
|
|
26
|
+
"liquidity": { "type": "string" },
|
|
27
|
+
"holders": { "type": "string" },
|
|
28
|
+
"isVerified": { "type": "boolean" },
|
|
29
|
+
"sourceAvailable": { "type": "boolean", "description": "Whether verified source code is available" },
|
|
30
|
+
"contractType": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["ERC20", "ERC721", "ERC1155", "PROXY", "MULTISIG", "VAULT", "STAKING", "DEX_PAIR", "UNKNOWN"],
|
|
33
|
+
"description": "Contract type classification"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Skill++ compatibility contract checker.
|
|
3
|
+
// Usage: node scripts/compatibility-check.mjs [baseline-json]
|
|
4
|
+
|
|
5
|
+
import { existsSync, readFileSync } from 'fs';
|
|
6
|
+
import { join, resolve, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { spawnSync } from 'child_process';
|
|
9
|
+
|
|
10
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const ROOT = resolve(__dirname, '..');
|
|
12
|
+
const baselineRel = process.argv[2] || 'tests/compatibility/v0.1.0.json';
|
|
13
|
+
const baselinePath = join(ROOT, baselineRel);
|
|
14
|
+
|
|
15
|
+
let passed = 0;
|
|
16
|
+
let failed = 0;
|
|
17
|
+
|
|
18
|
+
function readJson(relPath) {
|
|
19
|
+
return JSON.parse(readFileSync(join(ROOT, relPath), 'utf-8'));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function ok(message) {
|
|
23
|
+
passed++;
|
|
24
|
+
console.log(` PASS ${message}`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function fail(message) {
|
|
28
|
+
failed++;
|
|
29
|
+
console.error(` FAIL ${message}`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function assert(message, condition) {
|
|
33
|
+
if (condition) ok(message);
|
|
34
|
+
else fail(message);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function major(version) {
|
|
38
|
+
return Number(String(version || '').split('.')[0]);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function includesInOrder(actual, required) {
|
|
42
|
+
let cursor = 0;
|
|
43
|
+
for (const item of actual) {
|
|
44
|
+
if (item === required[cursor]) cursor++;
|
|
45
|
+
if (cursor === required.length) return true;
|
|
46
|
+
}
|
|
47
|
+
return required.length === 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function runNodeScript(args) {
|
|
51
|
+
return spawnSync(process.execPath, args, {
|
|
52
|
+
cwd: ROOT,
|
|
53
|
+
encoding: 'utf-8',
|
|
54
|
+
timeout: 10000,
|
|
55
|
+
windowsHide: true,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
console.log('Skill++ Compatibility Check\n');
|
|
60
|
+
|
|
61
|
+
if (!existsSync(baselinePath)) {
|
|
62
|
+
console.error(`Baseline not found: ${baselineRel}`);
|
|
63
|
+
process.exit(2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const baseline = JSON.parse(readFileSync(baselinePath, 'utf-8'));
|
|
67
|
+
const pkg = readJson('package.json');
|
|
68
|
+
const manifest = readJson('skillpp.manifest.json');
|
|
69
|
+
|
|
70
|
+
console.log('1. Package contract');
|
|
71
|
+
assert('package major matches baseline', major(pkg.version) === baseline.major);
|
|
72
|
+
assert('package name is stable', pkg.name === baseline.package.name);
|
|
73
|
+
assert('CLI bin name is stable', Boolean(pkg.bin?.[baseline.package.bin]));
|
|
74
|
+
assert('CLI bin path is stable', pkg.bin?.[baseline.package.bin] === baseline.package.binPath);
|
|
75
|
+
for (const required of baseline.package.requiredFiles) {
|
|
76
|
+
assert(`package files include ${required}`, pkg.files?.includes(required));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
console.log('\n2. Manifest contract');
|
|
80
|
+
assert('manifest protocol is stable', manifest.protocol === baseline.manifest.protocol);
|
|
81
|
+
assert('manifest major matches baseline', major(manifest.version) === baseline.major);
|
|
82
|
+
for (const schemaFile of baseline.manifest.requiredSchemaFiles) {
|
|
83
|
+
assert(`schema exists: ${schemaFile}`, existsSync(join(ROOT, 'schemas', schemaFile)));
|
|
84
|
+
}
|
|
85
|
+
for (const required of baseline.manifest.requiredSkills) {
|
|
86
|
+
const current = manifest.skills.find(skill => skill.name === required.name);
|
|
87
|
+
assert(`skill exists: ${required.name}`, Boolean(current));
|
|
88
|
+
if (!current) continue;
|
|
89
|
+
assert(`${required.name} group is stable`, current.group === required.group);
|
|
90
|
+
assert(`${required.name} readOnly boundary is stable`, current.readOnly === required.readOnly);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
console.log('\n3. Pipeline contract');
|
|
94
|
+
for (const required of baseline.manifest.pipelines) {
|
|
95
|
+
const current = manifest.pipelines.find(pipeline => pipeline.id === required.id);
|
|
96
|
+
assert(`pipeline exists: ${required.id}`, Boolean(current));
|
|
97
|
+
if (!current) continue;
|
|
98
|
+
assert(`${required.id} keeps required skill order`, includesInOrder(current.skills, required.requiredSkillsInOrder));
|
|
99
|
+
for (const checkpoint of required.requiredCheckpoints) {
|
|
100
|
+
assert(`${required.id} keeps checkpoint ${checkpoint}`, current.checkpoints?.includes(checkpoint));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
console.log('\n4. Checkpoint contract');
|
|
105
|
+
for (const required of baseline.manifest.checkpoints) {
|
|
106
|
+
const current = manifest.checkpoints?.find(checkpoint => checkpoint.id === required.id);
|
|
107
|
+
assert(`checkpoint exists: ${required.id}`, Boolean(current));
|
|
108
|
+
if (!current) continue;
|
|
109
|
+
assert(`${required.id} security level is stable`, current.securityLevel === required.securityLevel);
|
|
110
|
+
assert(`${required.id} bypass policy is stable`, current.canBypass === required.canBypass);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
console.log('\n5. CLI contract');
|
|
114
|
+
const help = runNodeScript(['scripts/skillpp.mjs', '--help']);
|
|
115
|
+
assert('help exits successfully', help.status === 0);
|
|
116
|
+
for (const command of baseline.cli.commands) {
|
|
117
|
+
assert(`help lists ${command}`, help.stdout.includes(command));
|
|
118
|
+
}
|
|
119
|
+
for (const route of baseline.cli.routes) {
|
|
120
|
+
const out = runNodeScript(['scripts/skillpp.mjs', route.command, route.input, '--dry-run']);
|
|
121
|
+
assert(`${route.command} route exits successfully`, out.status === 0);
|
|
122
|
+
assert(`${route.command} routes to ${route.pipeline}`, out.stdout.includes(route.pipeline));
|
|
123
|
+
}
|
|
124
|
+
const blocking = runNodeScript(['scripts/skillpp.mjs', 'trade', baseline.cli.routes.find(route => route.command === 'trade').input]);
|
|
125
|
+
assert('blocking checkpoint exits with baseline code', blocking.status === baseline.cli.checkpointExitCode);
|
|
126
|
+
assert('blocking checkpoint emits STOP_AND_WAIT', blocking.stdout.includes('STOP_AND_WAIT'));
|
|
127
|
+
|
|
128
|
+
console.log('\nResult');
|
|
129
|
+
console.log(`Passed: ${passed}, Failed: ${failed}`);
|
|
130
|
+
process.exit(failed > 0 ? 1 : 0);
|