@oneie/cli 5.8.0 → 5.9.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.
Files changed (270) hide show
  1. package/README.md +114 -6
  2. package/dist/package.json +37 -11
  3. package/dist/src/age-1k8hs4ec.js +1 -0
  4. package/dist/src/client-n6fpnd9f.js +1 -0
  5. package/dist/src/evm-tx-cqhm9rtt.js +1 -0
  6. package/dist/src/hl-run-0pv1e0p2.js +1 -0
  7. package/dist/src/index-f5vhzspa.js +12 -0
  8. package/dist/src/index-h3nrt8bx.js +4 -0
  9. package/dist/src/index-st6k9vhc.js +2062 -0
  10. package/dist/src/index.js +1122 -134
  11. package/dist/src/message-key-yczrxszr.js +1 -0
  12. package/dist/src/message-lock-thr851d5.js +5 -0
  13. package/dist/src/sweep-order-jrq2hkye.js +1 -0
  14. package/dist/src/sweep-runner-jftw9em7.js +1 -0
  15. package/package.json +37 -11
  16. package/dist/src/agent.d.ts +0 -75
  17. package/dist/src/agent.js +0 -1334
  18. package/dist/src/agentverse.d.ts +0 -26
  19. package/dist/src/agentverse.js +0 -171
  20. package/dist/src/args.d.ts +0 -9
  21. package/dist/src/args.js +0 -61
  22. package/dist/src/auth.d.ts +0 -6
  23. package/dist/src/auth.js +0 -121
  24. package/dist/src/balances.d.ts +0 -89
  25. package/dist/src/balances.js +0 -202
  26. package/dist/src/banner.d.ts +0 -1
  27. package/dist/src/banner.js +0 -17
  28. package/dist/src/broadcast.d.ts +0 -8
  29. package/dist/src/broadcast.js +0 -175
  30. package/dist/src/catalog.d.ts +0 -12
  31. package/dist/src/catalog.js +0 -76
  32. package/dist/src/ceiling.d.ts +0 -36
  33. package/dist/src/ceiling.js +0 -189
  34. package/dist/src/chat.d.ts +0 -2
  35. package/dist/src/chat.js +0 -92
  36. package/dist/src/check.d.ts +0 -11
  37. package/dist/src/check.js +0 -53
  38. package/dist/src/client.d.ts +0 -5
  39. package/dist/src/client.js +0 -157
  40. package/dist/src/compiler.d.ts +0 -36
  41. package/dist/src/compiler.js +0 -366
  42. package/dist/src/config.d.ts +0 -24
  43. package/dist/src/config.js +0 -70
  44. package/dist/src/connect.d.ts +0 -2
  45. package/dist/src/connect.js +0 -64
  46. package/dist/src/coordinate.d.ts +0 -3
  47. package/dist/src/coordinate.js +0 -58
  48. package/dist/src/create.d.ts +0 -2
  49. package/dist/src/create.js +0 -113
  50. package/dist/src/credits.d.ts +0 -29
  51. package/dist/src/credits.js +0 -88
  52. package/dist/src/deploy.d.ts +0 -2
  53. package/dist/src/deploy.js +0 -19
  54. package/dist/src/dev.d.ts +0 -2
  55. package/dist/src/dev.js +0 -75
  56. package/dist/src/device-flow.d.ts +0 -57
  57. package/dist/src/device-flow.js +0 -173
  58. package/dist/src/doctor.d.ts +0 -26
  59. package/dist/src/doctor.js +0 -146
  60. package/dist/src/draw.d.ts +0 -18
  61. package/dist/src/draw.js +0 -156
  62. package/dist/src/endpoint.d.ts +0 -2
  63. package/dist/src/endpoint.js +0 -250
  64. package/dist/src/env.d.ts +0 -3
  65. package/dist/src/env.js +0 -37
  66. package/dist/src/eval.d.ts +0 -2
  67. package/dist/src/eval.js +0 -43
  68. package/dist/src/fn.d.ts +0 -2
  69. package/dist/src/fn.js +0 -70
  70. package/dist/src/group.d.ts +0 -2
  71. package/dist/src/group.js +0 -117
  72. package/dist/src/hl-run.d.ts +0 -119
  73. package/dist/src/hl-run.js +0 -480
  74. package/dist/src/hl.d.ts +0 -17
  75. package/dist/src/hl.js +0 -148
  76. package/dist/src/index.d.ts +0 -2
  77. package/dist/src/init.d.ts +0 -76
  78. package/dist/src/init.js +0 -278
  79. package/dist/src/join.d.ts +0 -11
  80. package/dist/src/join.js +0 -297
  81. package/dist/src/key-publish.d.ts +0 -40
  82. package/dist/src/key-publish.js +0 -232
  83. package/dist/src/key-seal.d.ts +0 -21
  84. package/dist/src/key-seal.js +0 -142
  85. package/dist/src/key-sweep.d.ts +0 -93
  86. package/dist/src/key-sweep.js +0 -270
  87. package/dist/src/key.d.ts +0 -26
  88. package/dist/src/key.js +0 -338
  89. package/dist/src/lib/age-plugin.d.ts +0 -51
  90. package/dist/src/lib/age-plugin.js +0 -130
  91. package/dist/src/lib/agent-env.d.ts +0 -12
  92. package/dist/src/lib/agent-env.js +0 -48
  93. package/dist/src/lib/api-path.d.ts +0 -2
  94. package/dist/src/lib/api-path.js +0 -40
  95. package/dist/src/lib/asker.d.ts +0 -34
  96. package/dist/src/lib/asker.js +0 -126
  97. package/dist/src/lib/check-words.d.ts +0 -57
  98. package/dist/src/lib/check-words.js +0 -144
  99. package/dist/src/lib/client.d.ts +0 -20
  100. package/dist/src/lib/client.js +0 -71
  101. package/dist/src/lib/env-sealed.d.ts +0 -53
  102. package/dist/src/lib/env-sealed.js +0 -184
  103. package/dist/src/lib/flow-tag.d.ts +0 -86
  104. package/dist/src/lib/flow-tag.js +0 -230
  105. package/dist/src/lib/hl-core/actions.d.ts +0 -99
  106. package/dist/src/lib/hl-core/actions.js +0 -69
  107. package/dist/src/lib/hl-core/eip712.d.ts +0 -33
  108. package/dist/src/lib/hl-core/eip712.js +0 -107
  109. package/dist/src/lib/hl-core/errors.d.ts +0 -10
  110. package/dist/src/lib/hl-core/errors.js +0 -15
  111. package/dist/src/lib/hl-core/exchange.d.ts +0 -24
  112. package/dist/src/lib/hl-core/exchange.js +0 -47
  113. package/dist/src/lib/hl-core/index.d.ts +0 -13
  114. package/dist/src/lib/hl-core/index.js +0 -14
  115. package/dist/src/lib/hl-core/meta.d.ts +0 -57
  116. package/dist/src/lib/hl-core/meta.js +0 -110
  117. package/dist/src/lib/hl-core/msgpack.d.ts +0 -18
  118. package/dist/src/lib/hl-core/msgpack.js +0 -136
  119. package/dist/src/lib/hl-core/net.d.ts +0 -2
  120. package/dist/src/lib/hl-core/net.js +0 -7
  121. package/dist/src/lib/hl-core/signing.d.ts +0 -103
  122. package/dist/src/lib/hl-core/signing.js +0 -295
  123. package/dist/src/lib/hl-core/wire.d.ts +0 -34
  124. package/dist/src/lib/hl-core/wire.js +0 -81
  125. package/dist/src/lib/invoked-as.d.ts +0 -2
  126. package/dist/src/lib/invoked-as.js +0 -24
  127. package/dist/src/lib/journey-words.d.ts +0 -84
  128. package/dist/src/lib/journey-words.js +0 -363
  129. package/dist/src/lib/journey.d.ts +0 -150
  130. package/dist/src/lib/journey.js +0 -264
  131. package/dist/src/lib/key-receipt.d.ts +0 -48
  132. package/dist/src/lib/key-receipt.js +0 -116
  133. package/dist/src/lib/key-source.d.ts +0 -9
  134. package/dist/src/lib/key-source.js +0 -33
  135. package/dist/src/lib/keyfile.d.ts +0 -136
  136. package/dist/src/lib/keyfile.js +0 -397
  137. package/dist/src/lib/launch-claude.d.ts +0 -5
  138. package/dist/src/lib/launch-claude.js +0 -45
  139. package/dist/src/lib/lock-lookup.d.ts +0 -40
  140. package/dist/src/lib/lock-lookup.js +0 -92
  141. package/dist/src/lib/message-seal.d.ts +0 -63
  142. package/dist/src/lib/message-seal.js +0 -150
  143. package/dist/src/lib/net-choice.d.ts +0 -28
  144. package/dist/src/lib/net-choice.js +0 -72
  145. package/dist/src/lib/network.d.ts +0 -22
  146. package/dist/src/lib/network.js +0 -50
  147. package/dist/src/lib/next-words.d.ts +0 -105
  148. package/dist/src/lib/next-words.js +0 -298
  149. package/dist/src/lib/paths.d.ts +0 -41
  150. package/dist/src/lib/paths.js +0 -91
  151. package/dist/src/lib/plan-draw.d.ts +0 -56
  152. package/dist/src/lib/plan-draw.js +0 -219
  153. package/dist/src/lib/plan-live.d.ts +0 -20
  154. package/dist/src/lib/plan-live.js +0 -192
  155. package/dist/src/lib/qr.d.ts +0 -21
  156. package/dist/src/lib/qr.js +0 -402
  157. package/dist/src/lib/roster.d.ts +0 -20
  158. package/dist/src/lib/roster.js +0 -79
  159. package/dist/src/lib/sale-card.d.ts +0 -117
  160. package/dist/src/lib/sale-card.js +0 -261
  161. package/dist/src/lib/shop-init.d.ts +0 -62
  162. package/dist/src/lib/shop-init.js +0 -63
  163. package/dist/src/lib/sui-grpc-send.d.ts +0 -90
  164. package/dist/src/lib/sui-grpc-send.js +0 -128
  165. package/dist/src/lib/swap-core.d.ts +0 -163
  166. package/dist/src/lib/swap-core.js +0 -405
  167. package/dist/src/lib/tasks-digest.d.ts +0 -66
  168. package/dist/src/lib/tasks-digest.js +0 -200
  169. package/dist/src/lib/tasks-graph.d.ts +0 -79
  170. package/dist/src/lib/tasks-graph.js +0 -463
  171. package/dist/src/lib/tasks-lens.d.ts +0 -31
  172. package/dist/src/lib/tasks-lens.js +0 -47
  173. package/dist/src/lib/tasks-next.d.ts +0 -25
  174. package/dist/src/lib/tasks-next.js +0 -103
  175. package/dist/src/lib/tasks-prove.d.ts +0 -15
  176. package/dist/src/lib/tasks-prove.js +0 -68
  177. package/dist/src/lib/tasks-route.d.ts +0 -29
  178. package/dist/src/lib/tasks-route.js +0 -151
  179. package/dist/src/lib/tasks-score.d.ts +0 -36
  180. package/dist/src/lib/tasks-score.js +0 -152
  181. package/dist/src/lib/tasks-workspace.d.ts +0 -18
  182. package/dist/src/lib/tasks-workspace.js +0 -73
  183. package/dist/src/lib/timed-fetch.d.ts +0 -33
  184. package/dist/src/lib/timed-fetch.js +0 -59
  185. package/dist/src/lib/vault-read.d.ts +0 -24
  186. package/dist/src/lib/vault-read.js +0 -77
  187. package/dist/src/lib/vaultfile.d.ts +0 -103
  188. package/dist/src/lib/vaultfile.js +0 -249
  189. package/dist/src/lib/wallet-money.d.ts +0 -222
  190. package/dist/src/lib/wallet-money.js +0 -578
  191. package/dist/src/lib/wallet-request.d.ts +0 -50
  192. package/dist/src/lib/wallet-request.js +0 -86
  193. package/dist/src/links.d.ts +0 -5
  194. package/dist/src/links.js +0 -45
  195. package/dist/src/media.d.ts +0 -29
  196. package/dist/src/media.js +0 -487
  197. package/dist/src/message-receipt.d.ts +0 -25
  198. package/dist/src/message-receipt.js +0 -71
  199. package/dist/src/message.d.ts +0 -13
  200. package/dist/src/message.js +0 -92
  201. package/dist/src/move.d.ts +0 -36
  202. package/dist/src/move.js +0 -152
  203. package/dist/src/network-cmd.d.ts +0 -17
  204. package/dist/src/network-cmd.js +0 -74
  205. package/dist/src/next.d.ts +0 -12
  206. package/dist/src/next.js +0 -67
  207. package/dist/src/onboard.d.ts +0 -16
  208. package/dist/src/onboard.js +0 -149
  209. package/dist/src/plugin.d.ts +0 -2
  210. package/dist/src/plugin.js +0 -193
  211. package/dist/src/push.d.ts +0 -2
  212. package/dist/src/push.js +0 -115
  213. package/dist/src/render.d.ts +0 -21
  214. package/dist/src/render.js +0 -32
  215. package/dist/src/secrets-device.d.ts +0 -32
  216. package/dist/src/secrets-device.js +0 -127
  217. package/dist/src/secrets-give.d.ts +0 -125
  218. package/dist/src/secrets-give.js +0 -236
  219. package/dist/src/secrets-list.d.ts +0 -27
  220. package/dist/src/secrets-list.js +0 -84
  221. package/dist/src/secrets-run.d.ts +0 -31
  222. package/dist/src/secrets-run.js +0 -182
  223. package/dist/src/secrets.d.ts +0 -33
  224. package/dist/src/secrets.js +0 -200
  225. package/dist/src/setup.d.ts +0 -6
  226. package/dist/src/setup.js +0 -127
  227. package/dist/src/ship.d.ts +0 -2
  228. package/dist/src/ship.js +0 -18
  229. package/dist/src/shop-buy.d.ts +0 -16
  230. package/dist/src/shop-buy.js +0 -101
  231. package/dist/src/shop.d.ts +0 -10
  232. package/dist/src/shop.js +0 -112
  233. package/dist/src/skill-parser.d.ts +0 -14
  234. package/dist/src/skill-parser.js +0 -113
  235. package/dist/src/skill.d.ts +0 -2
  236. package/dist/src/skill.js +0 -493
  237. package/dist/src/slug.d.ts +0 -2
  238. package/dist/src/slug.js +0 -6
  239. package/dist/src/social.d.ts +0 -2
  240. package/dist/src/social.js +0 -106
  241. package/dist/src/staff.d.ts +0 -2
  242. package/dist/src/staff.js +0 -104
  243. package/dist/src/start.d.ts +0 -27
  244. package/dist/src/start.js +0 -225
  245. package/dist/src/status.d.ts +0 -2
  246. package/dist/src/status.js +0 -52
  247. package/dist/src/substrate.d.ts +0 -2
  248. package/dist/src/substrate.js +0 -258
  249. package/dist/src/swap.d.ts +0 -93
  250. package/dist/src/swap.js +0 -622
  251. package/dist/src/tasks.d.ts +0 -2
  252. package/dist/src/tasks.js +0 -743
  253. package/dist/src/templates.d.ts +0 -1
  254. package/dist/src/templates.js +0 -213
  255. package/dist/src/thread.d.ts +0 -2
  256. package/dist/src/thread.js +0 -52
  257. package/dist/src/trade.d.ts +0 -2
  258. package/dist/src/trade.js +0 -91
  259. package/dist/src/trail.d.ts +0 -2
  260. package/dist/src/trail.js +0 -41
  261. package/dist/src/validate.d.ts +0 -13
  262. package/dist/src/validate.js +0 -35
  263. package/dist/src/wallet-money.d.ts +0 -158
  264. package/dist/src/wallet-money.js +0 -664
  265. package/dist/src/wallet.d.ts +0 -169
  266. package/dist/src/wallet.js +0 -973
  267. package/dist/src/workflow.d.ts +0 -2
  268. package/dist/src/workflow.js +0 -169
  269. package/dist/src/write.d.ts +0 -43
  270. package/dist/src/write.js +0 -180
@@ -1 +0,0 @@
1
- export declare const TEMPLATES: Record<string, string>;
@@ -1,213 +0,0 @@
1
- export const TEMPLATES = {
2
- core: `---
3
- agentmd: "0.1"
4
- name: template
5
- kind: agent
6
- title: Template Agent
7
- model: anthropic/claude-haiku-4-5
8
- summary: A helpful agent.
9
- description: Use when you need to accomplish tasks.
10
- sensitivity: public
11
- lifecycle: active
12
- ---
13
-
14
- You are a helpful assistant. Complete tasks clearly and concisely.
15
- `,
16
- commerce: `---
17
- agentmd: "0.1"
18
- name: template
19
- kind: agent
20
- title: Template Commerce Agent
21
- model: anthropic/claude-haiku-4-5
22
- summary: An agent that provides paid services.
23
- description: Use when you need paid skill execution with x402 payments.
24
- sensitivity: public
25
- lifecycle: active
26
- skills: []
27
- wallet: ""
28
- accepts:
29
- - scheme: exact
30
- network: "eip155:8453"
31
- asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
32
- max: "0.05"
33
- ---
34
-
35
- You provide services at a fee. Verify payment before executing paid skills.
36
- `,
37
- asi: `---
38
- agentmd: "0.1"
39
- name: template
40
- kind: agent
41
- title: Template ASI Agent
42
- model: anthropic/claude-opus-4-7
43
- summary: An autonomous agent registered on Fetch.ai Almanac.
44
- description: Use for long-running autonomous tasks and multi-agent coordination.
45
- sensitivity: restricted
46
- lifecycle: active
47
- mailbox: true
48
- agentverse: https://agentverse.ai
49
- intervals:
50
- - period: 300
51
- task: Check for new signals and coordinate with peer agents.
52
- skills: []
53
- ---
54
-
55
- You are an autonomous agent. Coordinate with peers, monitor signals, and act on intervals.
56
- `,
57
- 'travel-planner': `---
58
- agentmd: "0.1"
59
- name: template
60
- kind: agent
61
- title: Travel Planner
62
- model: anthropic/claude-sonnet-4-5
63
- summary: Creates detailed travel itineraries with real logistics and budgets.
64
- description: Use when you need personalised travel planning — itinerary, budget, packing.
65
- sensitivity: public
66
- lifecycle: active
67
- tools:
68
- - emit_card
69
- - emit_chips
70
- skills:
71
- - name: plan
72
- description: Research and create a day-by-day travel itinerary
73
- price: 0.10
74
- tags: [travel, planning, itinerary]
75
- - name: budget
76
- description: Estimate trip costs including flights, hotels, meals, activities
77
- price: 0.05
78
- tags: [travel, budget, finance]
79
- ---
80
-
81
- You are a personal travel planner. You turn destinations and dates into detailed, actionable itineraries — real places, real logistics, real costs.
82
-
83
- Ask first: where, when, how long, who's going, budget range. Then deliver a day-by-day plan with morning/afternoon/evening blocks, transport options, and booking notes.
84
- `,
85
- 'marketing-strategist': `---
86
- agentmd: "0.1"
87
- name: template
88
- kind: agent
89
- title: Marketing Strategist
90
- model: anthropic/claude-sonnet-4-5
91
- summary: Audits channels, plans campaigns, writes copy, and reads metrics.
92
- description: Use when you need strategic marketing thinking plus concrete deliverables.
93
- sensitivity: public
94
- lifecycle: active
95
- tools:
96
- - emit_card
97
- - emit_chips
98
- skills:
99
- - name: audit
100
- description: Audit existing marketing channels and surface quick wins
101
- price: 0.08
102
- tags: [marketing, audit, analysis]
103
- - name: campaign
104
- description: Plan a campaign from brief to launch checklist
105
- price: 0.12
106
- tags: [marketing, campaign, strategy]
107
- - name: copy
108
- description: Write headlines, CTAs, email subjects, ad copy variants
109
- price: 0.06
110
- tags: [marketing, copy, writing]
111
- ---
112
-
113
- You are a senior marketing strategist. You think in funnels and ICPs, then translate that into concrete copy and launch plans any team can execute.
114
-
115
- Start by understanding the product, the customer, and the current state of marketing. Then: audit → recommend → plan → execute.
116
- `,
117
- 'support-tier1': `---
118
- agentmd: "0.1"
119
- name: template
120
- kind: agent
121
- title: Support — Tier 1
122
- model: anthropic/claude-sonnet-4-5
123
- summary: Resolves common support issues fast; escalates edge cases with full context.
124
- description: Use as a first-line support agent for how-to, account, and billing questions.
125
- sensitivity: public
126
- lifecycle: active
127
- tools:
128
- - emit_card
129
- - emit_chips
130
- skills:
131
- - name: triage
132
- description: Classify the issue and route to the right resolution path
133
- price: 0.02
134
- tags: [support, triage, routing]
135
- - name: resolve
136
- description: Walk the user through a step-by-step fix
137
- price: 0.03
138
- tags: [support, resolution, troubleshooting]
139
- - name: escalate
140
- description: Prepare a structured escalation summary for Tier 2
141
- price: 0.02
142
- tags: [support, escalation, handoff]
143
- ---
144
-
145
- You are a Tier 1 support agent. Your job is to resolve common issues fast, escalate edge cases with full context, and leave every user feeling heard.
146
-
147
- 1. Acknowledge — one sentence that shows you understand the problem. 2. Triage — classify: account / billing / bug / how-to / feature request. 3. Resolve — walk through it step by step. 4. Escalate — prepare a clean handoff summary.
148
- `,
149
- 'sales-discovery': `---
150
- agentmd: "0.1"
151
- name: template
152
- kind: agent
153
- title: Sales Discovery
154
- model: anthropic/claude-sonnet-4-5
155
- summary: Qualifies leads, preps discovery calls, handles objections, and structures proposals.
156
- description: Use to accelerate the discovery-to-proposal stage of your sales process.
157
- sensitivity: restricted
158
- lifecycle: active
159
- tools:
160
- - emit_card
161
- - emit_chips
162
- skills:
163
- - name: qualify
164
- description: Run a BANT qualification check on an inbound lead
165
- price: 0.04
166
- tags: [sales, qualification, lead]
167
- - name: discovery
168
- description: Deep-dive discovery call questions for a specific ICP
169
- price: 0.06
170
- tags: [sales, discovery, questions]
171
- - name: proposal
172
- description: Outline a custom proposal structure for a qualified account
173
- price: 0.08
174
- tags: [sales, proposal, closing]
175
- ---
176
-
177
- You are a sales discovery specialist. You help sales reps qualify faster, ask sharper questions, and turn stalled conversations into momentum.
178
-
179
- Start with the lead context: industry, size, role, how they came in. Then run the right playbook: qualify → discover → handle objections → propose.
180
- `,
181
- 'code-reviewer': `---
182
- agentmd: "0.1"
183
- name: template
184
- kind: agent
185
- title: Code Reviewer
186
- model: anthropic/claude-sonnet-4-5
187
- summary: Gives concrete, severity-labelled code review findings with actionable fixes.
188
- description: Use for code review, security audits, performance checks, and refactor suggestions.
189
- sensitivity: restricted
190
- lifecycle: active
191
- tools:
192
- - emit_card
193
- - emit_chips
194
- skills:
195
- - name: review
196
- description: Full code review with severity-labelled findings
197
- price: 0.08
198
- tags: [engineering, review, quality]
199
- - name: security
200
- description: Security-focused audit for OWASP Top 10 and common patterns
201
- price: 0.10
202
- tags: [engineering, security, audit]
203
- - name: refactor
204
- description: Propose a concrete refactor with before/after diffs
205
- price: 0.08
206
- tags: [engineering, refactor, design]
207
- ---
208
-
209
- You are a senior code reviewer. You give concrete, actionable feedback that improves code quality without creating review theatre.
210
-
211
- Label every finding: BLOCKER / MAJOR / MINOR / NIT. Always include the specific line reference and a concrete fix — not vague advice.
212
- `,
213
- };
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function threadCmd(): Command;
@@ -1,52 +0,0 @@
1
- import { Command } from 'commander';
2
- import { authHeaders, jsonMode, out, resolveBase } from './lib/client.js';
3
- import { askPath } from './lib/api-path.js';
4
- // Room text is written by other people (and strangers, through the sealed-note door): strip
5
- // C0/C1 controls and ESC before it reaches a terminal, so a message cannot rewrite the screen.
6
- // Newline and tab survive in message bodies; every other field is one line.
7
- const clean = (v, multiline = false) => String(v ?? '').replace(multiline ? /[\u0000-\u0008\u000b-\u001f\u007f-\u009f]/g : /[\u0000-\u001f\u007f-\u009f]/g, '');
8
- export function threadCmd() {
9
- const cmd = new Command('thread').description('Read a thread (a room, an inbox conversation) a page at a time — members of its group only');
10
- cmd
11
- .command('read <threadId>')
12
- .description('Read one page of a thread, newest messages last (thread:read). Says when the page is short')
13
- .option('--limit <n>', 'Messages per page (default 50, max 200)')
14
- .option('--before <cursor>', 'Older page: the nextCursor of the previous read')
15
- .option('--after <cursor>', 'Only what arrived after this cursor')
16
- .option('--api <url>', 'API base URL')
17
- .option('--json', 'One JSON line')
18
- .action(async (threadId, opts, sub) => {
19
- const base = resolveBase(opts, 'https://api.one.ie');
20
- const data = { threadId };
21
- if (opts.limit)
22
- data.limit = Number(opts.limit);
23
- if (opts.before)
24
- data.before = opts.before;
25
- if (opts.after)
26
- data.after = opts.after;
27
- const res = await fetch(askPath(base, 'thread:read'), { method: 'POST', headers: authHeaders(), body: JSON.stringify({ data }) });
28
- const body = (await res.json().catch(() => null));
29
- const ans = body && 'outcome' in body
30
- ? (body.result ?? { ok: false, error: body.reason ?? body.outcome ?? 'no_answer' })
31
- : (body ?? { ok: false, error: `http_${res.status}` });
32
- if (!res.ok && ans.ok !== false)
33
- ans.ok = false;
34
- if (jsonMode(sub) || ans.ok === false) {
35
- out(sub, ans);
36
- return;
37
- }
38
- const msgs = ans.messages ?? [];
39
- const head = `${clean(ans.thread?.name ?? ans.thread?.id ?? threadId)} · ${clean(ans.thread?.slug)} · ${msgs.length} message${msgs.length === 1 ? '' : 's'}`;
40
- process.stdout.write(head + '\n');
41
- if (ans.older && ans.nextCursor)
42
- process.stdout.write(` … earlier messages exist — one thread read ${threadId} --before ${clean(ans.nextCursor)}\n`);
43
- for (const m of msgs) {
44
- const who = clean(m.sender ?? m.role);
45
- const when = Number.isFinite(m.at) ? new Date(m.at > 1e12 ? m.at : m.at * 1000).toISOString() : '?';
46
- process.stdout.write(`[${when}] ${who}: ${clean(m.text, true)}\n`);
47
- }
48
- if (ans.newer && ans.newerCursor)
49
- process.stdout.write(` … more arrived — one thread read ${threadId} --after ${clean(ans.newerCursor)}\n`);
50
- });
51
- return cmd;
52
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function tradeCommands(program: Command): void;
package/dist/src/trade.js DELETED
@@ -1,91 +0,0 @@
1
- import { askPath } from './lib/api-path.js';
2
- import { authHeaders } from './lib/client.js';
3
- const DEFAULT_API = process.env.ONEIE_BASE_URL ?? process.env.ONE_API_URL ?? 'https://api.one.ie';
4
- function base(opts) {
5
- return (opts.api ?? DEFAULT_API).replace(/\/$/, '');
6
- }
7
- async function ask(b, receiver, data) {
8
- const res = await fetch(askPath(b, receiver), {
9
- method: 'POST',
10
- headers: authHeaders(),
11
- body: JSON.stringify({ data }),
12
- });
13
- if (!res.ok) {
14
- process.stderr.write(`${receiver} → ${res.status}\n`);
15
- process.exit(1);
16
- }
17
- return res.json();
18
- }
19
- export function tradeCommands(program) {
20
- program
21
- .command('market')
22
- .description('Discover agents and skills on the market')
23
- .option('--query <text>', 'Search for agents or skills by keyword')
24
- .option('--api <url>', 'API base URL', DEFAULT_API)
25
- .option('--json', 'Output raw JSON')
26
- .action(async (opts) => {
27
- const b = base(opts);
28
- const data = opts.query
29
- ? await ask(b, 'actors:find', { search: opts.query, type: 'agent' })
30
- : await ask(b, 'market:list', {});
31
- process.stdout.write(JSON.stringify(data, null, 2) + '\n');
32
- });
33
- program
34
- .command('hire <skillId>')
35
- .description('Hire an agent for a skill (use --dry-run to simulate)')
36
- .option('--dry-run', 'Simulate — no settlement, no cost')
37
- .option('--api <url>', 'API base URL', DEFAULT_API)
38
- .option('--provider <uid>', 'Preferred provider UID')
39
- .option('--budget <n>', 'Credit budget', '0')
40
- .action(async (skillId, opts) => {
41
- const payload = { skillId };
42
- if (opts.provider)
43
- payload.provider = opts.provider;
44
- if (opts.budget)
45
- payload.budget = Number(opts.budget);
46
- if (opts.dryRun)
47
- payload.simulate = true;
48
- const data = await ask(base(opts), 'market:hire', payload);
49
- if (opts.dryRun)
50
- process.stdout.write('[dry-run] market:hire simulated — nothing settled\n');
51
- process.stdout.write(JSON.stringify(data, null, 2) + '\n');
52
- });
53
- program
54
- .command('bounty <skillId>')
55
- .description('Post a bounty for a skill (use --dry-run to simulate)')
56
- .option('--dry-run', 'Simulate — no settlement, no cost')
57
- .option('--api <url>', 'API base URL', DEFAULT_API)
58
- .option('--price <n>', 'Bounty price in credits', '0')
59
- .action(async (skillId, opts) => {
60
- const payload = { skillId, price: Number(opts.price) };
61
- if (opts.dryRun)
62
- payload.simulate = true;
63
- const data = await ask(base(opts), 'market:bounty', payload);
64
- if (opts.dryRun)
65
- process.stdout.write('[dry-run] market:bounty simulated — nothing settled\n');
66
- process.stdout.write(JSON.stringify(data, null, 2) + '\n');
67
- });
68
- program
69
- .command('earn')
70
- .description('What this workspace has earned — card money waiting, crypto owed, credit balance')
71
- .option('--api <url>', 'API base URL', DEFAULT_API)
72
- .option('--json', 'Output raw JSON')
73
- .action(async (opts) => {
74
- // pay:weight PAYS for a task (needs to/task/amount); it was never a summary.
75
- // These two are what an agent key can read, and they answer for its own workspace.
76
- const [store, credits] = await Promise.all([
77
- ask(base(opts), 'storefront:balance', {}),
78
- ask(base(opts), 'credits:balance', {}),
79
- ]);
80
- process.stdout.write(JSON.stringify({ storefront: store, credits }, null, 2) + '\n');
81
- });
82
- program
83
- .command('usage')
84
- .description('Show credit usage dashboard')
85
- .option('--api <url>', 'API base URL', DEFAULT_API)
86
- .option('--json', 'Output raw JSON')
87
- .action(async (opts) => {
88
- const data = await ask(base(opts), 'dashboard:usage', {});
89
- process.stdout.write(JSON.stringify(data, null, 2) + '\n');
90
- });
91
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function trailCmd(): Command;
package/dist/src/trail.js DELETED
@@ -1,41 +0,0 @@
1
- import { Command } from 'commander';
2
- import { authHeaders, jsonMode, resolveBase } from './lib/client.js';
3
- const DEFAULT_API = resolveBase({}, 'https://one.ie');
4
- export function trailCmd() {
5
- const cmd = new Command('trail')
6
- .description('read trail confidence for a tag combination — ranked next tasks from KV')
7
- .argument('<tags>', 'comma-separated tags, e.g. fn:engineering,builds,deploy')
8
- .option('--workspace <ws>', 'workspace slug', 'global')
9
- .option('--limit <n>', 'max results', '10')
10
- .option('--api <url>', 'api base url', DEFAULT_API)
11
- .action(async (tags, opts) => {
12
- const base = resolveBase(opts, 'https://one.ie');
13
- const sorted = tags.split(',').map((t) => t.trim()).filter(Boolean).sort().join(',');
14
- const params = new URLSearchParams({ tags: sorted, workspace: opts.workspace, limit: opts.limit });
15
- const res = await fetch(`${base}/api/export/trail?${params}`, {
16
- headers: authHeaders(),
17
- });
18
- if (!res.ok) {
19
- const body = await res.text().catch(() => '');
20
- process.stderr.write(`trail: ${res.status}\n${body}\n`);
21
- process.exit(1);
22
- }
23
- const data = (await res.json());
24
- if (jsonMode(cmd)) {
25
- process.stdout.write(JSON.stringify(data, null, 2) + '\n');
26
- return;
27
- }
28
- process.stdout.write(`fingerprint: ${data.fingerprint}\n`);
29
- process.stdout.write(`confidence: ${(data.confidence * 100).toFixed(1)}%\n\n`);
30
- if (!data.tasks.length) {
31
- process.stdout.write('no trail data for these tags — run some /do cycles with matching tags\n');
32
- return;
33
- }
34
- for (const t of data.tasks) {
35
- const pct = (t.confidence * 100).toFixed(0).padStart(3);
36
- const score = t.score.toFixed(2).padStart(6);
37
- process.stdout.write(` ${pct}% score=${score} ${t.slug}\n`);
38
- }
39
- });
40
- return cmd;
41
- }
@@ -1,13 +0,0 @@
1
- export interface ClientShape {
2
- slug?: string;
3
- name?: string;
4
- markup_pct?: number | null;
5
- monthly_cap?: number | null;
6
- credits?: number | null;
7
- }
8
- export declare function validateClient(c: ClientShape): string[];
9
- export declare function frontmatter(md: string): Record<string, string>;
10
- export declare function validateAgent(md: string): {
11
- name: string;
12
- errors: string[];
13
- };
@@ -1,35 +0,0 @@
1
- export function validateClient(c) {
2
- const errs = [];
3
- if (!c.slug)
4
- errs.push('client: slug required');
5
- if (!c.name)
6
- errs.push('client: name required');
7
- if (c.markup_pct != null && (c.markup_pct < 0 || c.markup_pct > 100))
8
- errs.push('client: markup_pct must be 0–100');
9
- if (c.monthly_cap != null && c.monthly_cap < 0)
10
- errs.push('client: monthly_cap must be ≥ 0');
11
- if (c.credits != null && c.credits < 0)
12
- errs.push('client: credits must be ≥ 0');
13
- return errs;
14
- }
15
- export function frontmatter(md) {
16
- const m = md.match(/^---\n([\s\S]*?)\n---/);
17
- if (!m)
18
- return {};
19
- const out = {};
20
- for (const line of m[1].split('\n')) {
21
- const kv = line.match(/^([A-Za-z_][\w-]*)\s*:\s*(.*)$/);
22
- if (kv)
23
- out[kv[1]] = kv[2].trim();
24
- }
25
- return out;
26
- }
27
- export function validateAgent(md) {
28
- const fm = frontmatter(md);
29
- const errors = [];
30
- if (!fm.name)
31
- errors.push('agent: frontmatter `name` required');
32
- if (!fm.description)
33
- errors.push('agent: frontmatter `description` required');
34
- return { name: fm.name ?? '', errors };
35
- }
@@ -1,158 +0,0 @@
1
- /**
2
- * wallet-money.ts — the loaded wallet's money, one command away:
3
- *
4
- * one wallet balances [--net mainnet|testnet] every chain, wallet:get first, chains for the rest
5
- * one wallet receive --chain base one address, one QR, never ambiguous
6
- * one wallet send 1 USDC@base 0x… DRY: exactly what would be signed, fees, the chain
7
- * one wallet send 0.0004 ETH@ethereum 0x… --live --dir ~/.one/tony
8
- * one wallet request 25 USD a wallet:invoice payment link
9
- * one wallet request 5 USDC --wait a link the owner opens and signs with Touch ID
10
- *
11
- * THE SERVER SIGNS NOTHING (R19). A --live send opens the sealed vault in --dir on THIS
12
- * machine (Touch ID or a typed passphrase), signs here, broadcasts to a public node, and
13
- * drops the key. Before the key opens: the gate (an agent shell signs only with its OWN
14
- * vault and --yes), and the client check (R16) — the transaction is rebuilt from the
15
- * person's own words and compared, never trusted from an echo.
16
- *
17
- * `balances` is the dev session's command (src/balances.ts, kept byte-identical so the two
18
- * merge cleanly); `upgradeBalances` adds --net and the wallet:get fan-out to it in place.
19
- */
20
- import { Command } from 'commander';
21
- import { type Fetch } from './balances.js';
22
- import { type SuiSendReq, type SuiSendDone } from './lib/sui-grpc-send.js';
23
- import { type Addresses, type Net, type Obj, type SendPlan, type SendAsset, type SendChain } from './lib/wallet-money.js';
24
- type Ask = (receiver: string, data: Obj) => Promise<Obj>;
25
- type VaultKey = {
26
- chain: string;
27
- address: string;
28
- privateKeyHex: string;
29
- };
30
- export interface MoneyIO {
31
- /** One receiver call for this command's --api/--key; throws on a refusal. */
32
- ask: (opts: {
33
- api: string;
34
- key?: string;
35
- }, receiver: string, data: Obj) => Promise<Obj>;
36
- workspace: (explicit: string | undefined) => string;
37
- /** Who this command's key acts as, and where it came from (`machine` = the global login, null when it is the same key). */
38
- identity?: (opts: {
39
- api: string;
40
- key?: string;
41
- }, which: 'resolved' | 'machine') => Promise<{
42
- actor?: string;
43
- from: string;
44
- local: boolean;
45
- } | null>;
46
- unlock: (dir: string) => Promise<{
47
- keys: VaultKey[];
48
- } | {
49
- error: string;
50
- }>;
51
- /** The pre-signed relay (`send <to> --payment-tx`) — the form `wallet send` had before. */
52
- relay: (c: Command, to: string, opts: Obj) => Promise<void>;
53
- defaultApi: string;
54
- fetch?: Fetch;
55
- sleep?: (ms: number) => Promise<void>;
56
- }
57
- /** fetch with a deadline: a node that hangs is a failed read, not a hung CLI. */
58
- export declare const deadlineFetch: (ms?: number) => Fetch;
59
- /** A word safe to paste into a shell: plain words as they are, anything else single-quoted. */
60
- export declare const shq: (w: string) => string;
61
- export interface GateArgs {
62
- env: NodeJS.ProcessEnv;
63
- yes: boolean;
64
- interactive: boolean;
65
- dir: string;
66
- plan: SendPlan;
67
- /** `--to-address`: the person's own copy of a resolved recipient. */
68
- toAddress?: string;
69
- /** `--workspace`: where the caller's wallet row lives (an agent's: its owner's workspace). */
70
- workspace?: string;
71
- }
72
- export interface GateDeps {
73
- ask: Ask;
74
- /** The vault's Sui address from its public authPub — no unlock, no Touch ID. */
75
- vaultSuiAddress: (dir: string) => string | null;
76
- confirm: (prompt: string) => Promise<boolean>;
77
- }
78
- /**
79
- * Before any key opens. `--yes` skips the prompt ONLY for a vault proven to be an agent's
80
- * own (agentOwnVault) — never on an env marker alone, which a shell can simply not set, and
81
- * never for a person's vault: the Keychain read behind "Touch ID" is `security -w`, which
82
- * the OS may answer silently. A person's vault is opened only after a y/N typed at a terminal,
83
- * every time. A shell an agent drives never opens anything but its own vault. A recipient
84
- * found by name must be pinned with --to-address whenever nobody reads it at a prompt.
85
- */
86
- export declare function liveGate(a: GateArgs, d: GateDeps): Promise<{
87
- ok: true;
88
- } | {
89
- ok: false;
90
- error: string;
91
- message: string;
92
- }>;
93
- export interface EvmSigner {
94
- signEip1559: (tx: NonNullable<SendPlan['tx']>, key: Uint8Array) => string;
95
- evmAddressFromKey: (key: Uint8Array) => string;
96
- evmTxHash: (raw: string) => string;
97
- hexToBytes: (h: string) => Uint8Array;
98
- }
99
- export type { SuiSendReq, SuiSendDone };
100
- export interface LiveDeps {
101
- fetch: Fetch;
102
- unlock: () => Promise<{
103
- keys: VaultKey[];
104
- } | {
105
- error: string;
106
- }>;
107
- loadEvm?: () => Promise<EvmSigner>;
108
- /** A string is a digest alone (the older shape); SuiSendDone carries the gas and the time to finality too. */
109
- suiSend?: (r: SuiSendReq) => Promise<SuiSendDone | string>;
110
- sleep?: (ms: number) => Promise<void>;
111
- /** Receipt polls after an EVM broadcast (each `sleep(5000)` apart). */
112
- polls?: number;
113
- }
114
- export declare const suiSendDefault: (r: SuiSendReq) => Promise<SuiSendDone>;
115
- /**
116
- * Sign and broadcast ONE plan. The client check runs first, against the person's own
117
- * words; then the vault opens; then its key must derive `from`. One broadcast, never
118
- * re-sent: on a failure after signing the locally computed hash is returned so the
119
- * person can look before trying again.
120
- */
121
- export declare function executeSend(plan: SendPlan, own: {
122
- amount: string;
123
- asset: SendAsset;
124
- chain: SendChain;
125
- to: string;
126
- net: Net;
127
- suiRpc?: string;
128
- split?: number;
129
- }, d: LiveDeps): Promise<Obj>;
130
- export type Who = {
131
- actor?: string;
132
- from: string;
133
- local: boolean;
134
- };
135
- export declare const actingLine: (w: Who | null | undefined) => string | undefined;
136
- /**
137
- * `no_from_address` from a folder-local key that is NOT the global login is the folder changing the
138
- * answer: name both, and the way out. Any other refusal keeps its own words.
139
- */
140
- export declare function noFromCause(io: MoneyIO, o: {
141
- api: string;
142
- key?: string;
143
- }, me: Who | null | undefined, family: string, workspace: string): Promise<string | undefined>;
144
- /**
145
- * Give the dev session's `balances` (src/balances.ts) the network word and the server
146
- * fan-out. Its explicit-address form on mainnet is left to its own reader, unchanged.
147
- */
148
- export declare function upgradeBalances(balances: Command, io: MoneyIO): void;
149
- export declare function receiveCmd(io: MoneyIO): Command;
150
- /** Every wallet this machine holds a sealed key or a public sidecar for, by its PUBLIC addresses only. */
151
- export declare function localWallets(root?: string): Array<{
152
- label: string;
153
- addresses: Addresses;
154
- }>;
155
- export declare function requestCmd(io: MoneyIO): Command;
156
- export declare function sendCmd(io: MoneyIO): Command;
157
- /** The vault's Sui address from its PUBLIC authPub — read without opening it. */
158
- export declare function vaultSuiAddressOf(dir: string): string | null;