oneie 4.0.2 → 4.2.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 +78 -1
- package/dist/package.json +4 -4
- package/dist/src/agent.d.ts +73 -0
- package/dist/src/agent.js +486 -53
- package/dist/src/auth.js +3 -4
- package/dist/src/broadcast.d.ts +2 -0
- package/dist/src/broadcast.js +24 -0
- package/dist/src/compiler.js +27 -3
- package/dist/src/doctor.js +61 -6
- package/dist/src/eval.js +1 -0
- package/dist/src/fn.js +5 -8
- package/dist/src/index.js +8 -1
- package/dist/src/init.js +33 -3
- package/dist/src/lib/agent-env.js +7 -0
- package/dist/src/lib/client.js +16 -7
- package/dist/src/lib/keyfile.d.ts +130 -0
- package/dist/src/lib/keyfile.js +381 -0
- package/dist/src/lib/paths.d.ts +33 -0
- package/dist/src/lib/paths.js +77 -0
- package/dist/src/lib/tasks-digest.d.ts +66 -0
- package/dist/src/lib/tasks-digest.js +200 -0
- package/dist/src/lib/tasks-graph.d.ts +78 -0
- package/dist/src/lib/tasks-graph.js +425 -0
- package/dist/src/lib/vaultfile.d.ts +73 -0
- package/dist/src/lib/vaultfile.js +184 -0
- package/dist/src/media.d.ts +2 -0
- package/dist/src/media.js +256 -0
- package/dist/src/plugin.js +10 -1
- package/dist/src/skill.js +128 -12
- package/dist/src/tasks.d.ts +2 -0
- package/dist/src/tasks.js +424 -0
- package/dist/src/templates.js +8 -0
- package/dist/src/wallet.d.ts +9 -0
- package/dist/src/wallet.js +259 -1
- package/dist/src/workflow.d.ts +2 -0
- package/dist/src/workflow.js +144 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -27,6 +27,9 @@ one client add <slug> # provision a managed client (workspace + credits
|
|
|
27
27
|
one push [clients/<slug>] # compile ai/ + data/ → agents, skills, context, lifecycles, types, workflows
|
|
28
28
|
one status # P&L — funded · burned · margin · balance
|
|
29
29
|
one deploy # wrangler deploy the node's site/
|
|
30
|
+
one whoami # who am I, which workspace — proves the key is live
|
|
31
|
+
one doctor # config / key / reachability check — exit 0/1 for CI
|
|
32
|
+
one ship "<message>" # git add + commit + push in one step
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
`one push` understands TOML array-of-tables (`[[stages]]`, `[[fields]]`), compiles
|
|
@@ -52,17 +55,44 @@ one mark | warn | fade | follow | select # the verbs
|
|
|
52
55
|
one agent new <name> --profile core|commerce|asi
|
|
53
56
|
one agent validate | lint | compile --target mcp|a2a|web|skillmd
|
|
54
57
|
one agent publish # sync to your ONE workspace
|
|
58
|
+
one agent eval # run frontmatter evals (also: one skill eval)
|
|
55
59
|
one skill new | import <ref> | publish
|
|
56
60
|
one init --name N --email E # zero-to-live: register + workspace + agent + skills
|
|
61
|
+
one dev # boot the local CF stack: build → D1 migrate → wrangler dev
|
|
62
|
+
one connect telegram --token T # connect a channel by pasting its credential
|
|
63
|
+
one trail <tag,tag> # ranked next-best tasks for a tag combination
|
|
57
64
|
```
|
|
58
65
|
|
|
66
|
+
## Tasks — see, sequence, act
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
one tasks brief --workspace one --tree # one screen: counts, ready, blocked-by, stale DONE, next five moves
|
|
70
|
+
one tasks board --workspace one --tree --all # every row; --kind work|approval|all (default work)
|
|
71
|
+
one tasks plan <goal-tid|tag> --tree # waves + critical path in hops; cycles, outside waits, ownerless
|
|
72
|
+
one tasks plan <goal> --emit dispatch --out w.json # hand-off: tid/assignee/model/effort/touches/accept per wave
|
|
73
|
+
one tasks sequence <tid> <tid> <tid> --apply # chain in order (one tasks:bulk call); preview without --apply
|
|
74
|
+
one tasks depend <tid> <blockedBy> # one edge; undepend removes it
|
|
75
|
+
one tasks set --where-tag t --set-status done # filter-driven edit; preview unless --apply
|
|
76
|
+
one tasks bulk --file plan.json # creates/edits from a file, chunked at 25
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Rows tagged `approval` are parked workflow runs: excluded by default, counted, and never closed by
|
|
80
|
+
status (`set --apply` refuses them unless `--kind all`). Every read states `total`, `truncated` and
|
|
81
|
+
`asOf`; a partial read says it is partial.
|
|
82
|
+
|
|
59
83
|
## Auth
|
|
60
84
|
|
|
61
85
|
```bash
|
|
62
|
-
one login
|
|
86
|
+
one login # browser device flow (RFC 8628) → human-class key
|
|
87
|
+
one login --key <key> # or paste a key directly
|
|
88
|
+
# either way: stored at ~/.config/oneie/key (0600)
|
|
63
89
|
# or set ONEIE_API_KEY in the environment
|
|
64
90
|
```
|
|
65
91
|
|
|
92
|
+
`one login` with no `--key` prints a short code, opens `https://one.ie/device`, and waits while you sign in and Approve. The key it stores is **human-class** — bound to your own slug, revocable at Profile › API keys.
|
|
93
|
+
|
|
94
|
+
**When the class matters:** keys minted by `one init`/`onboard`/`setup` are *agent-class* and are categorically blocked from the human-management receivers (`manage_actors`, `manage_lifecycle`, `manage_members`, …) — the error is `forbidden` with `callerRole: "agent"`. If you hit that wall, `one login` is the fix. Full model: `text/api-keys-docs.md § Two key classes`.
|
|
95
|
+
|
|
66
96
|
Workspace operations use a Bearer token `<slug>:<key>`. Override the API base per command with `--api` (default `https://api.one.ie`, the gateway).
|
|
67
97
|
|
|
68
98
|
## Wallets
|
|
@@ -72,13 +102,60 @@ Every actor — human or agent — gets real, self-custodied multi-chain wallets
|
|
|
72
102
|
```bash
|
|
73
103
|
one wallet create --workspace <slug> --kind agent # provision a wallet row (idempotent)
|
|
74
104
|
one wallet get --workspace <slug> # credits, ceiling, live balances, delegated wallets
|
|
105
|
+
one wallet register --from keys.json --workspace <slug> # register the PUBLIC receiving addresses — first write wins, permanent
|
|
75
106
|
one wallet transactions --workspace <slug> --limit 50 # unified feed across every settlement rail
|
|
76
107
|
one wallet faucet <address> --chain sui # fund from testnet — sui/sol auto-fund, others return a manual URL
|
|
77
108
|
one wallet send <to> --chain SUI --amount 5 --payment-tx <hash> --workspace <slug>
|
|
78
109
|
```
|
|
79
110
|
|
|
111
|
+
`register` reads a `wallet keygen` output but transmits only its four address fields — the map it sends is built key-by-key from a fixed chain whitelist, so a `mnemonic` or `privateKey` in that file has no route onto the wire. The write is first-write-wins per chain and cannot be corrected afterwards (`address_conflict`), so it prints the addresses and asks for confirmation; `--yes` skips the prompt for scripted provisioning (needed when the JSON arrives on stdin, which leaves no terminal to answer with).
|
|
112
|
+
|
|
80
113
|
`send` never signs — sign and broadcast the transfer yourself first (`agent-wallet-client.ts` for an agent, `/w` for a human), then pass the resulting transaction hash. The private key never crosses this command. `faucet` talks to `pay.one.ie` directly (its own protocol, not the `/ask` gateway) and needs no credential — funding any address is public by design, funding ≠ ownership.
|
|
81
114
|
|
|
115
|
+
## Operate the business
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
one trade market | hire | bounty | earn | usage # marketplace: browse, hire peer agents, post bounties, check metering
|
|
119
|
+
one workflow list --slug S # list workflows for a workspace
|
|
120
|
+
one workflow pull <id> --slug S [--out D] # round-trip a workflow's step graph to a local file
|
|
121
|
+
one workflow push <id> <file> --slug S [--commit] # apply a diff — simulates first, --commit persists
|
|
122
|
+
one workflow run <id> --slug S # start a run
|
|
123
|
+
one plugin list | add <name> | buy <name> | grant <name> --to <slug> # browse, install, buy, or resell a plugin
|
|
124
|
+
one staff invite [email] | add-agent <name> # invite a human or create an agent staff member
|
|
125
|
+
one links create <actorId> --to <path> # mint a personalised, actor-bound tracked link
|
|
126
|
+
one broadcast list | send <id> # blasts to a workspace audience
|
|
127
|
+
one segment list | preview <id> # audience segments — live count + sample
|
|
128
|
+
one newsletter pull <id> | push <id> <file> # round-trip newsletter content as a local file
|
|
129
|
+
one social list --group G | create --group G ... # draft/publish/list social posts
|
|
130
|
+
one fn run <name> '{json}' | list # call an allowlisted analytics/routing RPC
|
|
131
|
+
one coordinate recall [about] | reputation [uid] # cross-session memory and reputation
|
|
132
|
+
one group bulk-create --csv # idempotent batch client provisioning
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Media — the library an agent can reach
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
one media list [--workspace S] [--kind image|video] [--prefix media|chat|ads|products|pages|brand|courses]
|
|
139
|
+
one media list --all # follow nextCursor to the end (ceiling 20 pages)
|
|
140
|
+
one media upload <path> [--workspace S] [--filename N] # a local file, sized against the 5 MiB cap before it is sent
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Two verbs, because only two earn a wrapper over `one ask`. `list` renders
|
|
144
|
+
`media:list`'s honest fields — `--limit` is R2 objects **scanned** per page, not
|
|
145
|
+
rows returned, and a `total` printed beside a truncation notice is a floor, so
|
|
146
|
+
the renderer says "at least N" rather than reading as complete. `upload` exists
|
|
147
|
+
because you cannot put a local file in a JSON body by hand; it reads, sizes and
|
|
148
|
+
encodes it, and the printed `key` names the workspace prefix the bytes actually
|
|
149
|
+
reached — `media:upload` refuses a workspace you may not write instead of
|
|
150
|
+
silently downgrading to your own.
|
|
151
|
+
|
|
152
|
+
Generation is deliberately **not** a subcommand — it is a prompt string in a
|
|
153
|
+
JSON body, so the raw door is no worse than a wrapper:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
one ask media:generate --data '{"prompt":"a red bicycle"}'
|
|
157
|
+
```
|
|
158
|
+
|
|
82
159
|
## Chat — fan in · fan out
|
|
83
160
|
|
|
84
161
|
Send to a space, broadcast to all, or stream incoming messages:
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oneie",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "ONE agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"build": "tsc && cp package.json dist/ && chmod +x dist/src/index.js",
|
|
16
16
|
"dev": "tsx src/index.ts",
|
|
17
17
|
"typecheck": "tsc --noEmit",
|
|
18
|
-
"test": "vitest run",
|
|
18
|
+
"test": "bash ../../.claude/scripts/gate-run.sh test-cli -- vitest run",
|
|
19
19
|
"prepublishOnly": "bun run build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"commander": "^12.0.0",
|
|
23
|
-
"@oneie/sdk": "^0.
|
|
23
|
+
"@oneie/sdk": "^0.16.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@oneie/evals": "
|
|
26
|
+
"@oneie/evals": "^0.1.1",
|
|
27
27
|
"@types/node": "^25.6.0",
|
|
28
28
|
"tsx": "^4.0.0",
|
|
29
29
|
"typescript": "^5.4.0",
|
package/dist/src/agent.d.ts
CHANGED
|
@@ -1,2 +1,75 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
export declare function agentCmd(): Command;
|
|
3
|
+
/**
|
|
4
|
+
* Structural validation — mirrors the rules enforced by the web's Zod schema
|
|
5
|
+
* (web/src/lib/agent-schema.ts) without pulling Zod or js-yaml into the CLI
|
|
6
|
+
* dependency graph. Catches the contract violations partners hit most often:
|
|
7
|
+
* missing frontmatter, name shape, journey/section anchor mismatches, chip
|
|
8
|
+
* id collisions, kebab-case ids. Anything outside these rules falls through
|
|
9
|
+
* to the live server-side validation when the agent is published.
|
|
10
|
+
*/
|
|
11
|
+
/** Required: a reader REFUSES or silently SUBSTITUTES identity without it.
|
|
12
|
+
* name → publish refuses (world-receivers.ts:1407). kind → one-agents.mjs:191
|
|
13
|
+
* skips the file. (The non-empty body is checked separately.) */
|
|
14
|
+
export declare const AGENT_REQUIRED: readonly ["name", "kind"];
|
|
15
|
+
/** Recommended: every reader falls back without it, but the fallback is a
|
|
16
|
+
* different agent on the page (title → dir, description → 'Generic helpful
|
|
17
|
+
* assistant', tier/domain → inferred from the id). Warned when absent. */
|
|
18
|
+
export declare const AGENT_RECOMMENDED: readonly ["title", "tier", "domain", "subscribes"];
|
|
19
|
+
/** The closed enums the web schema owns (agent-schema.ts) — role-types.ts INFERS
|
|
20
|
+
* a value from the id when the declared one is off-enum, so an off-enum value
|
|
21
|
+
* is a silent re-placement on the org chart, not a load failure. */
|
|
22
|
+
export declare const AGENT_ENUMS: Record<string, readonly string[]>;
|
|
23
|
+
/** Keys the channels parser (channels/src/lib/agent-md.ts) can only read as a
|
|
24
|
+
* BLOCK list. An inline `[a, b]` is stored as the string "[a, b]", so
|
|
25
|
+
* `Array.isArray` fails in resolvePersona and the field is dropped at runtime. */
|
|
26
|
+
export declare const AGENT_BLOCK_LIST_KEYS: readonly ["tools", "subscribes", "emits", "skills", "tags"];
|
|
27
|
+
/** Every top-level key at least one reader consumes — the union of AgentMeta
|
|
28
|
+
* (agent-md.ts:435), agentFrontmatterSchema (agent-schema.ts:229), Persona
|
|
29
|
+
* (channels/src/context.ts:590), compile.ts:319, one-agents.mjs:130,
|
|
30
|
+
* role-types.ts and the publish path. A key outside this set is read by
|
|
31
|
+
* nothing; the validator names it rather than refusing it. `direction` is NOT here on
|
|
32
|
+
* purpose: C20 deleted it from 118 corpus files (0 readers; 93/95 `bidirectional`
|
|
33
|
+
* merely restated subscribes+emits, the rest contradicted them) — keeping it out
|
|
34
|
+
* is what makes `--strict` refuse a resurrection. */
|
|
35
|
+
export declare const AGENT_KNOWN_KEYS: ReadonlySet<string>;
|
|
36
|
+
export interface ValidateResult {
|
|
37
|
+
/** Fail the verdict — a required field is absent or the file is not an agent. */
|
|
38
|
+
errors: string[];
|
|
39
|
+
/** Measured hazards that do not fail by default; `--strict` promotes them. */
|
|
40
|
+
warnings: string[];
|
|
41
|
+
/** Top-level keys no reader consumes, by name. */
|
|
42
|
+
unknownKeys: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface ValidateOpts {
|
|
45
|
+
/** Warnings become errors. */
|
|
46
|
+
strict?: boolean;
|
|
47
|
+
/** `publish` keeps the door's pre-spec gate: frontmatter + name + anchors. */
|
|
48
|
+
door?: 'validate' | 'publish';
|
|
49
|
+
}
|
|
50
|
+
export declare function validate(path: string, opts?: ValidateOpts): ValidateResult;
|
|
51
|
+
/**
|
|
52
|
+
* Targets the CLI can actually emit. `a2a` and `erc8004` were advertised in
|
|
53
|
+
* --target help and in the docs but had no branch — they fell through to
|
|
54
|
+
* `return content`, echoing the raw agent.md back as if it had compiled. They
|
|
55
|
+
* now FAIL LOUDLY: there is no a2a/erc8004 compiler anywhere in @oneie/sdk to
|
|
56
|
+
* delegate to, and inventing one here would be worse than an honest error.
|
|
57
|
+
*/
|
|
58
|
+
export declare const CLI_TARGETS: readonly ["mcp", "uagents", "skillmd", "web"];
|
|
59
|
+
export interface AgentverseReadiness {
|
|
60
|
+
ready: boolean;
|
|
61
|
+
/** Required and absent. Refuses the upload. */
|
|
62
|
+
missing: string[];
|
|
63
|
+
/** Optional and absent — named so an operator can choose, never a refusal. */
|
|
64
|
+
recommended: string[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Is this agent.md ready to be a HOSTED Agentverse agent?
|
|
68
|
+
*
|
|
69
|
+
* `seed` is the only REQUIRED field, and it is required for one reason: it is the
|
|
70
|
+
* deterministic identity. Without it every deploy of the same file is a different
|
|
71
|
+
* agent as far as the network is concerned — a fresh address, so every peer that
|
|
72
|
+
* learned the old one is now talking to nobody.
|
|
73
|
+
*/
|
|
74
|
+
export declare function agentverseReadiness(agentMd: string): AgentverseReadiness;
|
|
75
|
+
export declare function compileTarget(content: string, target: string, skills?: Record<string, string>): string;
|