oneie 4.0.3 → 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 CHANGED
@@ -63,6 +63,23 @@ one connect telegram --token T # connect a channel by pasting its credential
63
63
  one trail <tag,tag> # ranked next-best tasks for a tag combination
64
64
  ```
65
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
+
66
83
  ## Auth
67
84
 
68
85
  ```bash
@@ -85,11 +102,14 @@ Every actor — human or agent — gets real, self-custodied multi-chain wallets
85
102
  ```bash
86
103
  one wallet create --workspace <slug> --kind agent # provision a wallet row (idempotent)
87
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
88
106
  one wallet transactions --workspace <slug> --limit 50 # unified feed across every settlement rail
89
107
  one wallet faucet <address> --chain sui # fund from testnet — sui/sol auto-fund, others return a manual URL
90
108
  one wallet send <to> --chain SUI --amount 5 --payment-tx <hash> --workspace <slug>
91
109
  ```
92
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
+
93
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.
94
114
 
95
115
  ## Operate the business
@@ -112,6 +132,30 @@ one coordinate recall [about] | reputation [uid] # cross-session memory an
112
132
  one group bulk-create --csv # idempotent batch client provisioning
113
133
  ```
114
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
+
115
159
  ## Chat — fan in · fan out
116
160
 
117
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",
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.14.9"
23
+ "@oneie/sdk": "^0.16.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@oneie/evals": "workspace:*",
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",
@@ -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;