pandora-cli-skills 1.1.66 → 1.1.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -138
- package/README_FOR_SHARING.md +76 -440
- package/SKILL.md +91 -678
- package/cli/lib/agent_contract_registry.cjs +1068 -107
- package/cli/lib/autopilot_state_store.cjs +7 -0
- package/cli/lib/capabilities_command_service.cjs +468 -0
- package/cli/lib/claim_command_service.cjs +128 -0
- package/cli/lib/command_executor_service.cjs +162 -22
- package/cli/lib/command_router.cjs +6 -0
- package/cli/lib/lp_command_service.cjs +104 -0
- package/cli/lib/mcp_http_gateway_service.cjs +553 -0
- package/cli/lib/mcp_protocol_service.cjs +144 -0
- package/cli/lib/mcp_server_service.cjs +29 -88
- package/cli/lib/mcp_tool_registry.cjs +522 -8
- package/cli/lib/mirror_close_service.cjs +140 -2
- package/cli/lib/mirror_command_service.cjs +3 -3
- package/cli/lib/mirror_daemon_service.cjs +13 -10
- package/cli/lib/mirror_handlers/close.cjs +4 -0
- package/cli/lib/mirror_handlers/deploy.cjs +2 -2
- package/cli/lib/mirror_handlers/sync.cjs +122 -8
- package/cli/lib/mirror_service.cjs +227 -179
- package/cli/lib/operation_event_bus.cjs +315 -0
- package/cli/lib/operation_service.cjs +565 -0
- package/cli/lib/operation_state_store.cjs +895 -0
- package/cli/lib/operation_webhook_service.cjs +202 -0
- package/cli/lib/operations_command_service.cjs +131 -0
- package/cli/lib/parsers/autopilot_flags.cjs +16 -2
- package/cli/lib/parsers/core_command_flags.cjs +16 -7
- package/cli/lib/parsers/mirror_deploy_flags.cjs +3 -2
- package/cli/lib/parsers/mirror_go_flags.cjs +3 -2
- package/cli/lib/parsers/operations_flags.cjs +106 -0
- package/cli/lib/parsers/sports_flags.cjs +16 -4
- package/cli/lib/resolve_command_service.cjs +83 -0
- package/cli/lib/schema_command_service.cjs +665 -36
- package/cli/lib/shared/mcp_path_guard.cjs +39 -5
- package/cli/lib/shared/operation_bridge.cjs +280 -0
- package/cli/lib/shared/operation_hash.cjs +107 -0
- package/cli/lib/shared/operation_states.cjs +179 -0
- package/cli/lib/shared/poll_categories.cjs +109 -0
- package/cli/lib/sports_command_service.cjs +4 -0
- package/cli/lib/sports_creation_service.cjs +97 -2
- package/cli/lib/sports_sync_service.cjs +25 -4
- package/cli/pandora.cjs +334 -8
- package/docs/skills/agent-interfaces.md +170 -0
- package/docs/skills/capabilities.md +97 -0
- package/docs/skills/command-reference.md +249 -0
- package/docs/skills/legacy-launchers.md +68 -0
- package/docs/skills/mirror-operations.md +141 -0
- package/package.json +2 -1
- package/scripts/create_market_launcher.ts +13 -1
- package/scripts/create_polymarket_clone_and_bet.ts +13 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pandora CLI & Skills
|
|
2
2
|
|
|
3
|
-
Production CLI for Pandora prediction markets with mirror
|
|
3
|
+
Production CLI for Pandora prediction markets with mirror tooling, sports consensus, on-chain trading, analytics, and agent-native interfaces.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -9,162 +9,74 @@ npm i -g pandora-cli-skills
|
|
|
9
9
|
pandora --help
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Or
|
|
12
|
+
Or without installing:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
npx pandora-cli-skills@latest --help
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Node.js `>=18` required.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
- MCP
|
|
20
|
+
## Documentation map
|
|
21
|
+
- [`SKILL.md`](./SKILL.md)
|
|
22
|
+
- root overview and routing index
|
|
23
|
+
- [`docs/skills/capabilities.md`](./docs/skills/capabilities.md)
|
|
24
|
+
- capability map, canonical paths, and PollCategory mapping
|
|
25
|
+
- [`docs/skills/command-reference.md`](./docs/skills/command-reference.md)
|
|
26
|
+
- human-oriented command and flag reference; use capabilities/schema for machine authority
|
|
27
|
+
- [`docs/skills/mirror-operations.md`](./docs/skills/mirror-operations.md)
|
|
28
|
+
- mirror deploy/go safety, timing, validation, sync, and closeout guidance
|
|
29
|
+
- [`docs/skills/agent-interfaces.md`](./docs/skills/agent-interfaces.md)
|
|
30
|
+
- schema, MCP, JSON envelopes, recovery hints, fork runtime, and error codes
|
|
31
|
+
- [`docs/skills/legacy-launchers.md`](./docs/skills/legacy-launchers.md)
|
|
32
|
+
- `launch` / `clone-bet` legacy script wrappers
|
|
31
33
|
|
|
32
34
|
## Quickstart
|
|
33
35
|
|
|
34
36
|
```bash
|
|
35
|
-
#
|
|
37
|
+
# compact capability digest for agents
|
|
38
|
+
pandora --output json capabilities
|
|
39
|
+
|
|
40
|
+
# schema for typed consumers
|
|
36
41
|
pandora --output json schema
|
|
37
42
|
|
|
38
43
|
# MCP server mode
|
|
39
44
|
pandora mcp
|
|
40
45
|
|
|
41
|
-
#
|
|
42
|
-
pandora --output json
|
|
46
|
+
# read-only discovery
|
|
47
|
+
pandora --output json scan --limit 10
|
|
43
48
|
|
|
44
|
-
#
|
|
49
|
+
# buy-side dry-run
|
|
45
50
|
pandora --output json trade --dry-run \
|
|
46
|
-
--market-address 0x... --side yes --amount-usdc 10
|
|
47
|
-
--fork --fork-rpc-url http://127.0.0.1:8545
|
|
51
|
+
--market-address 0x... --side yes --amount-usdc 10
|
|
48
52
|
|
|
49
|
-
#
|
|
53
|
+
# sell-side dry-run
|
|
50
54
|
pandora --output json sell --dry-run \
|
|
51
|
-
--market-address 0x... --side no --shares 25
|
|
52
|
-
--fork --fork-rpc-url http://127.0.0.1:8545
|
|
53
|
-
|
|
54
|
-
# NDJSON stream
|
|
55
|
-
pandora stream prices --indexer-url https://pandoraindexer.up.railway.app/ --interval-ms 1000
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Sports Quickstart
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
# list upcoming soccer events
|
|
62
|
-
pandora --output json sports events list --competition <id-or-slug> --limit 5
|
|
63
|
-
|
|
64
|
-
# compute trimmed-median consensus for one event
|
|
65
|
-
pandora --output json sports consensus --event-id <event-id> --trim-percent 20
|
|
66
|
-
|
|
67
|
-
# build conservative create + resolve plans
|
|
68
|
-
pandora --output json sports create plan --event-id <event-id> --selection home
|
|
69
|
-
pandora --output json sports resolve plan --event-id <event-id> --poll-address <0x...>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Lifecycle Quickstart
|
|
55
|
+
--market-address 0x... --side no --shares 25
|
|
73
56
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
pandora --output json lifecycle start --config ./configs/lifecycle.json
|
|
77
|
-
pandora --output json lifecycle status --id <lifecycle-id>
|
|
78
|
-
pandora --output json lifecycle resolve --id <lifecycle-id> --confirm
|
|
57
|
+
# inspect persisted mutable-operation records
|
|
58
|
+
pandora --output json operations list --status planned,queued,running --limit 20
|
|
79
59
|
```
|
|
80
60
|
|
|
81
|
-
##
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- `
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
`pandora stream prices|events` outputs NDJSON only (one JSON object per line), for example:
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{"type":"stream.tick","channel":"prices","seq":1,"ts":"2026-03-01T12:00:00.000Z","source":{"transport":"polling"},"data":{"id":"market-1","yesPct":58.12}}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Command Surface
|
|
111
|
-
|
|
112
|
-
- `pandora markets list|get`
|
|
113
|
-
- `pandora scan`
|
|
114
|
-
- `scan` is the canonical enriched discovery workflow.
|
|
115
|
-
- `markets scan` remains a backward-compatible alias.
|
|
116
|
-
- `pandora sports books list`
|
|
117
|
-
- `pandora sports events list|live`
|
|
118
|
-
- `pandora sports odds snapshot|bulk`
|
|
119
|
-
- `pandora sports consensus`
|
|
120
|
-
- `pandora sports create plan|run`
|
|
121
|
-
- `pandora sports sync once|run|start|stop|status`
|
|
122
|
-
- `pandora sports resolve plan`
|
|
123
|
-
- `pandora lifecycle start|status|resolve`
|
|
124
|
-
- `pandora quote`
|
|
125
|
-
- `pandora trade`
|
|
126
|
-
- `pandora sell`
|
|
127
|
-
- `pandora claim --market-address <address>|--all --dry-run|--execute`
|
|
128
|
-
- `pandora history`
|
|
129
|
-
- `pandora export`
|
|
130
|
-
- `pandora arb scan --output ndjson|json`
|
|
131
|
-
- `pandora arbitrage`
|
|
132
|
-
- `arb scan` is the canonical arbitrage workflow.
|
|
133
|
-
- `arbitrage` remains a bounded one-shot compatibility wrapper.
|
|
134
|
-
- `pandora odds record|history`
|
|
135
|
-
- `pandora autopilot run|once`
|
|
136
|
-
- `pandora mirror browse|plan|deploy|verify|lp-explain|hedge-calc|simulate|go|sync|status|close`
|
|
137
|
-
- `mirror browse` supports `--polymarket-tag-id|--polymarket-tag-ids` (aliases `--sport-tag-id|--sport-tag-ids`) for sports-tagged Gamma event discovery.
|
|
138
|
-
- `pandora polymarket check|approve|preflight|trade`
|
|
139
|
-
- `pandora resolve`
|
|
140
|
-
- `pandora lp add|remove|positions`
|
|
141
|
-
- `pandora risk show|panic`
|
|
142
|
-
- `pandora stream prices|events`
|
|
143
|
-
- `pandora schema`
|
|
144
|
-
- `pandora mcp`
|
|
145
|
-
|
|
146
|
-
## Quant ABM Baseline (Module Contract)
|
|
147
|
-
|
|
148
|
-
- Deterministic ABM engine: `cli/lib/quant/abm_market.cjs`.
|
|
149
|
-
- Simulate-agents handler module: `cli/lib/simulate_handlers/agents.cjs`.
|
|
150
|
-
- Supported handler flags:
|
|
151
|
-
- `--n-informed` or `--n_informed`
|
|
152
|
-
- `--n-noise` or `--n_noise`
|
|
153
|
-
- `--n-mm` or `--n_mm`
|
|
154
|
-
- `--n-steps` or `--n_steps`
|
|
155
|
-
- `--seed`
|
|
156
|
-
- ABM payload fields include:
|
|
157
|
-
- `convergenceError`
|
|
158
|
-
- `spreadTrajectory[]`
|
|
159
|
-
- `volume` (`total`, `averagePerStep`, `byAgentType`)
|
|
160
|
-
- `pnlByAgentType`
|
|
161
|
-
- `runtimeBounds` (`complexity`, `estimatedAgentDecisions`, `estimatedWorkUnits`)
|
|
162
|
-
- Runtime bound metadata is documented as `O(n_steps * (n_informed + n_noise))`.
|
|
163
|
-
- Unit coverage for this baseline is in `tests/unit/abm_market.test.cjs`.
|
|
164
|
-
|
|
165
|
-
## Docs
|
|
166
|
-
|
|
167
|
-
- Full command contract and workflows: [`SKILL.md`](./SKILL.md)
|
|
168
|
-
- Operator + package documentation: [`README_FOR_SHARING.md`](./README_FOR_SHARING.md)
|
|
169
|
-
|
|
170
|
-
Node.js `>=18` required.
|
|
61
|
+
## Mirror safety summary
|
|
62
|
+
- `mirror plan|deploy|go` use a sports-aware suggested `targetTimestamp`; they do not assume a generic `+1h` buffer.
|
|
63
|
+
- Use `--target-timestamp <unix|iso>` only when you intentionally need to override the suggested close time.
|
|
64
|
+
- Fresh `mirror deploy` / `mirror go` runs require at least two independent public resolution URLs from different hosts in `--sources`.
|
|
65
|
+
- Polymarket, Gamma, and CLOB URLs are discovery inputs only and are not valid `--sources`.
|
|
66
|
+
- Validation is exact-payload: validate the final `question`, `rules`, `sources`, and `targetTimestamp` before execute mode.
|
|
67
|
+
- CLI mirror execute reruns use `--validation-ticket`; MCP execute/live reruns use `agentPreflight`.
|
|
68
|
+
|
|
69
|
+
## PollCategory mapping
|
|
70
|
+
- `Politics=0`
|
|
71
|
+
- `Sports=1`
|
|
72
|
+
- `Finance=2`
|
|
73
|
+
- `Crypto=3`
|
|
74
|
+
- `Culture=4`
|
|
75
|
+
- `Technology=5`
|
|
76
|
+
- `Science=6`
|
|
77
|
+
- `Entertainment=7`
|
|
78
|
+
- `Health=8`
|
|
79
|
+
- `Environment=9`
|
|
80
|
+
- `Other=10`
|
|
81
|
+
|
|
82
|
+
For sports mirror deploy/go flows, use `--category Sports` or `--category 1`.
|