@maiaos/agent 0.1.0-canary.2 → 0.1.0-canary.3

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
@@ -1,115 +1,54 @@
1
- # `@maiaos/agent`
1
+ # @maiaos/agent
2
2
 
3
- [![npm canary](https://img.shields.io/npm/v/@maiaos/agent/canary?label=npm%20canary)](https://www.npmjs.com/package/@maiaos/agent)
4
-
5
- Maia's own AI coding agent, `maia agent`, and the managed Pi worker that Maia
6
- Node runs, both built on the official
3
+ Maia's own AI coding agent, `maia agent`, and the managed worker that Maia Node
4
+ runs, both built on the official
7
5
  [`@earendil-works/pi-coding-agent`](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)
8
6
  SDK.
9
7
 
10
- `maia agent` is Pi rebranded for Maia, not a different agent interface: Pi
11
- supplies the agent loop, models, providers, compaction, steering, TUI, sessions
12
- and extensions. Maia adds Maia-owned paths and credentials, digest-pinned
13
- project resources, a few reviewed built-ins, and the boundary to Maia Node. Use
14
- it as an interactive coding agent, or embed the package when you build on the
15
- same harness. It never invokes an installed `pi` executable or reads `~/.pi`.
8
+ > **Pre-release.** npm carries only `nightly` and `canary` builds, which are
9
+ > not release-qualified. No stable release exists
10
+ > ([D-132](https://github.com/vllnt/maia/blob/main/docs/decisions.md#d-132)).
11
+
12
+ ## Requirements
13
+
14
+ Node.js 24.22.1.
16
15
 
17
16
  ## Install
18
17
 
19
- `maia agent` ships with the [`maia` CLI](../../apps/cli/README.md). The library
20
- is published for installation testing:
18
+ `maia agent` ships with the `maia` CLI:
21
19
 
22
20
  ```sh
23
- pnpm add @maiaos/agent@canary
21
+ pnpm add -g @maiaos/cli@nightly
24
22
  ```
25
23
 
26
- Canary builds are not release-qualified and can lag the source; npm's
27
- automatic `latest` tag also points at a canary build.
24
+ To embed the library in your own process, use
25
+ `pnpm add @maiaos/agent@nightly`.
28
26
 
29
- ## Example
27
+ ## Usage
30
28
 
31
29
  ```sh
32
- maia agent # interactive session; type /login to sign in
30
+ maia agent # interactive; type /login to sign in
33
31
  maia agent --print --no-session -- "Explain this repository"
34
32
  maia agent --json-events --no-session -- "Review the current diff"
35
- maia agent -e <path-to-extension.ts> # load one extension explicitly
36
- maia agent extension digest <extension-path> # digest to pin in .maia/maia.json
37
33
  ```
38
34
 
39
- ## Key concepts
40
-
41
- - **Pi extensions, unchanged.** Extensions use the upstream Pi API to register
42
- tools, slash commands, CLI flags, shortcuts, renderers, providers and
43
- lifecycle hooks. There is no Maia-specific plugin API.
44
- - **Resources.** The agent loads project extensions only when they are listed
45
- and digest-pinned in `.maia/maia.json`, then reviewed Maia built-ins. `-ne`
46
- (`--no-extensions`) keeps Pi's meaning: skip discovered extensions, while an
47
- explicit `-e` path still loads. Skills and `AGENTS.md` stay available.
48
- - **Built-ins.** A destructive-command guard, bounds on Pi's `find` and
49
- `grep`, task and goal state keyed by the durable Maia Session, and
50
- Session-owned background processes stopped at shutdown. Pi's `find` and
51
- `grep` stay inactive. The standalone `maia agent` adds `/goal` and `/tasks`,
52
- a bounded goal and open-task section in the system prompt, and a name for an
53
- unnamed session taken from its first request.
54
- - **Credentials.** Provider credentials live in Maia's `auth.json` under
55
- `MAIA_HOME` (default `~/.maia`), one per provider; `maia login <provider>`
56
- uses Pi's own sign-in. `MAIA_AGENT_HOME` moves only the agent directory.
57
- - **Offline by default.** Every entry sets `PI_OFFLINE=1` and
58
- `PI_SKIP_VERSION_CHECK=1`, which stop Pi's update, telemetry and tool
59
- download traffic but not the model provider you select. Embed the package in
60
- a process dedicated to the agent.
61
- - **Managed worker.** The `maia-agent-worker` binary speaks a versioned,
62
- bounded NDJSON protocol to Maia Node. It keeps Pi state in memory, receives
63
- durable history from the Node, and holds a leased provider credential only in
64
- memory.
65
-
66
- Project extension code runs with the agent process's operating-system
67
- permissions; review it before pinning its digest. Extensions cannot bypass the
68
- Node's authorization, confirmation, compare-and-set, idempotency or receipts.
69
-
70
- ## Status
71
-
72
- `maia agent` and its built-ins are implemented source candidates. Running Maia
73
- Agent as a general Node worker for swarms (bound Agent definitions with granted
74
- tools) is planned; bound activation is denied today. `maia session attach`
75
- (S12b) renders Codex Sessions; Pi Sessions join with S12c. Replacing
76
- a full daily Pi harness is tracked as
77
- [R11](../../docs/maia-agent/pi-harness-migration.md).
78
-
79
- ## How it fits in Maia
35
+ Pi supplies the agent loop, models, providers, TUI, sessions and extensions.
36
+ Maia adds Maia-owned paths and credentials, digest-pinned project extensions
37
+ and Skills, a few reviewed built-ins, and the boundary to Maia Node. It never
38
+ runs an installed `pi` executable or reads `~/.pi`.
80
39
 
81
- The CLI runs `maia agent` locally without a Node. Maia Node launches
82
- `maia-agent-worker` out of process for managed Pi Sessions and stays the
83
- authority for Sessions, credential leases and receipts. Swarm scheduling,
84
- account pools and recursive orchestration belong to Maia Node and Skills, not
85
- to this package. See the [Agent architecture](../../docs/maia-agent/architecture.md).
40
+ Every entry sets `PI_OFFLINE=1` and `PI_SKIP_VERSION_CHECK=1`. Project
41
+ extension code runs with your operating-system permissions, so review it
42
+ before you pin its digest.
86
43
 
87
- ## Provenance
88
-
89
- The destructive-command guard, the `find` and `grep` bounds, `/goal`, `/tasks`,
90
- the goal and task prompt sections, session naming and the tool-metadata
91
- contract test are reviewed ports from `vllnt/pi-config` at commit `b90808fb`
92
- ([D-069](../../docs/decisions.md#d-069)); each file names its source in a
93
- header comment, and the [port record](../../docs/maia-agent/pi-harness-port.md)
94
- lists every source extension and where it belongs in Maia. The task, goal and
95
- process tools are reduced Maia implementations informed by the reviewed
96
- `pi-tasks`, `pi-goal` and `pi-daemon` contracts.
97
-
98
- ## Development
99
-
100
- ```sh
101
- pnpm --filter @maiaos/agent build
102
- pnpm --filter @maiaos/agent lint
103
- pnpm --filter @maiaos/agent typecheck
104
- pnpm --filter @maiaos/agent test
105
- ```
106
-
107
- ## Documentation
44
+ ## Status
108
45
 
109
- - [Maia Agent architecture](../../docs/maia-agent/architecture.md)
110
- - [Pi harness migration (R11)](../../docs/maia-agent/pi-harness-migration.md)
111
- - [Providers and login](../../docs/providers/architecture.md)
46
+ **Source candidate.** `maia agent` and its built-ins work from source. Running
47
+ Maia Agent as a general Node worker for swarms is planned.
112
48
 
113
- ## License
49
+ ## Links
114
50
 
115
- No license has been published yet. All rights reserved.
51
+ - [Agent architecture](https://github.com/vllnt/maia/blob/main/docs/maia-agent/architecture.md)
52
+ - [CLI reference](https://github.com/vllnt/maia/blob/main/docs/reference/cli.md)
53
+ - [Security policy](https://github.com/vllnt/maia/blob/main/SECURITY.md)
54
+ - [Repository](https://github.com/vllnt/maia)