@glyphteck/veyl 0.1.2 → 0.3.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/README.md +71 -64
- package/dist/cli.js +3606 -885
- package/dist/index.js +3468 -690
- package/docs/agents.md +235 -0
- package/docs/api.md +647 -0
- package/docs/cli.md +169 -0
- package/docs/mcp.md +54 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,106 +1,113 @@
|
|
|
1
1
|
# Veyl Headless
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@glyphteck/veyl` is the Bun client for using Veyl from a terminal, script, automation, bot, agent, or MCP client.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Headless is a normal Veyl client, not a privileged backend. Account keys, vault secrets, wallet entropy, chat seeds, Spark wallet boot, message encryption, and payment signing run locally. The backend only creates public account records, verifies machine-key login challenges, issues Firebase custom tokens, and stores encrypted vault data it cannot decrypt.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Machine-created accounts are marked as `bot` on their public profile. Passkey-created CLI accounts are real human accounts and are not marked as bots.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Install
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
bunx @glyphteck/veyl help
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
For scripts:
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
```bash
|
|
18
|
+
bun add @glyphteck/veyl
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
```bash
|
|
24
|
+
veyl create @runner
|
|
25
|
+
veyl vault create
|
|
26
|
+
veyl balance
|
|
27
|
+
veyl listen --agent
|
|
28
|
+
```
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
Passkey account from the terminal:
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
```bash
|
|
33
|
+
veyl create --passkey @runner
|
|
34
|
+
veyl vault create
|
|
35
|
+
veyl listen --agent
|
|
36
|
+
```
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
## JavaScript
|
|
29
39
|
|
|
30
40
|
```js
|
|
31
41
|
import { open } from '@glyphteck/veyl';
|
|
32
42
|
|
|
33
|
-
const veyl = await open();
|
|
43
|
+
const veyl = await open({ profile: 'runner', network: 'REGTEST' });
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
const vault = await veyl.vault.create();
|
|
45
|
+
await veyl.account.login();
|
|
37
46
|
await veyl.vault.unlock();
|
|
38
47
|
await veyl.chat.send('@alice', 'hello');
|
|
39
|
-
const messages = await veyl.chat.read('@alice');
|
|
40
|
-
|
|
41
|
-
await veyl.money.send('@alice', 1000);
|
|
42
48
|
await veyl.money.request('@alice', 1000);
|
|
43
|
-
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Agent Loop
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import { open } from '@glyphteck/veyl';
|
|
55
|
+
|
|
56
|
+
const veyl = await open({ profile: 'runner', network: 'REGTEST' });
|
|
57
|
+
|
|
58
|
+
await veyl.account.login();
|
|
59
|
+
await veyl.vault.unlock();
|
|
44
60
|
|
|
45
|
-
|
|
61
|
+
await veyl.listen({
|
|
62
|
+
agent: true,
|
|
63
|
+
onEvent: async (event) => {
|
|
64
|
+
if (event.type !== 'message' || event.message.type !== 'txt') return;
|
|
65
|
+
await veyl.chat.reply(event, `received: ${event.message.text}`);
|
|
66
|
+
},
|
|
67
|
+
});
|
|
46
68
|
```
|
|
47
69
|
|
|
48
|
-
|
|
70
|
+
## Common CLI Commands
|
|
49
71
|
|
|
50
72
|
```bash
|
|
73
|
+
veyl create @runner
|
|
51
74
|
veyl create --passkey @runner
|
|
52
|
-
veyl
|
|
53
|
-
veyl request @alice 1000
|
|
54
|
-
veyl balance
|
|
55
|
-
veyl read @alice
|
|
56
|
-
veyl say @alice "hello"
|
|
57
|
-
veyl listen
|
|
58
|
-
|
|
59
|
-
veyl account create @runner
|
|
60
|
-
veyl account create --passkey @runner
|
|
61
|
-
veyl account login @runner
|
|
62
|
-
veyl account login --passkey @runner
|
|
75
|
+
veyl login [@runner]
|
|
63
76
|
veyl vault create
|
|
64
77
|
veyl vault unlock
|
|
65
|
-
veyl
|
|
66
|
-
veyl
|
|
67
|
-
veyl
|
|
68
|
-
veyl
|
|
69
|
-
veyl
|
|
70
|
-
veyl
|
|
78
|
+
veyl balance
|
|
79
|
+
veyl receive
|
|
80
|
+
veyl claim
|
|
81
|
+
veyl say @alice "hello"
|
|
82
|
+
veyl reply @alice <message-id> "got it"
|
|
83
|
+
veyl react @alice <message-id> +1
|
|
84
|
+
veyl send @alice 1000
|
|
85
|
+
veyl request @alice 1000
|
|
86
|
+
veyl pay <request-id>
|
|
71
87
|
veyl transactions
|
|
88
|
+
veyl listen --agent
|
|
72
89
|
veyl mcp serve
|
|
73
90
|
```
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
`veyl listen` keeps one auth and vault session alive in the current process, then emits newline-delimited JSON events for new messages and wallet transfers. It is the terminal event-stream path for agents that do not want to speak MCP.
|
|
92
|
+
## Docs
|
|
78
93
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
bun dev headless regtest create --passkey @runner
|
|
85
|
-
```
|
|
94
|
+
- Agent quick reference: [docs/agents.md](docs/agents.md)
|
|
95
|
+
- JavaScript API: [docs/api.md](docs/api.md)
|
|
96
|
+
- CLI: [docs/cli.md](docs/cli.md)
|
|
97
|
+
- MCP: [docs/mcp.md](docs/mcp.md)
|
|
86
98
|
|
|
87
99
|
## Local Secrets
|
|
88
100
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Glyphteck-owned Google Secret Manager bot seeds are not used by this public path.
|
|
101
|
+
Profiles live under `~/.veyl` by default, or `VEYL_HOME` if set. Use `--no-save-secret`, `--no-save-credential`, `saveSecret: false`, or `saveCredential: false` if you want to store vault or machine credentials yourself.
|
|
92
102
|
|
|
93
|
-
##
|
|
103
|
+
## Environment
|
|
94
104
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- `POST /headless/account/credential/add/finish`
|
|
103
|
-
|
|
104
|
-
Vault secrets, wallet entropy, chat seeds, Spark wallet boot, and message/payment signing all run locally in this package through shared Veyl primitives.
|
|
105
|
+
```bash
|
|
106
|
+
VEYL_HOME=/secure/veyl-home
|
|
107
|
+
VEYL_PROFILE=runner
|
|
108
|
+
VEYL_NETWORK=REGTEST
|
|
109
|
+
VEYL_VAULT_SECRET=...
|
|
110
|
+
VEYL_WEB_URL=https://veyl.glyphteck.com
|
|
111
|
+
```
|
|
105
112
|
|
|
106
|
-
|
|
113
|
+
`VEYL_WEB_URL` is used for passkey flows and must be `https://...` or `localhost`.
|