@agentrific/server 0.1.0 → 0.1.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @agentrific/server
2
+
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 72e68ad: Upgrade the embedded Pi SDK to 1.0.0 so Agentrific automatically recognizes existing credentials saved by both Pi v0 and v1, including the newer OpenAI ChatGPT login. Add real SDK integration tests for startup credential discovery, legacy credentials and transcripts, sessions, streaming, tools, model selection, attachments and delivery, with an isolated compatibility check for future Pi releases.
8
+
9
+ ## 0.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - f730c2e: Publish the compiled server CLI to npm with automated versioning and release notes.
package/README.md CHANGED
@@ -1,8 +1,22 @@
1
- # @agentrific/server
1
+ # Agentrific Server
2
2
 
3
- Agentrific is a self-hosted control plane for long-running coding agents. This package provides its server and the `agentrific` command-line tool for macOS and Linux.
3
+ Run coding agents on your computer or server, and control them from the Agentrific iOS and Android apps. Start work, follow progress, send instructions and review results from your phone while the agents run on your own machine.
4
4
 
5
- Install Node.js 22.19 or newer, Git, and [Pi](https://pi.dev/). Connect your model accounts through Pi using the same OS account that will run the server.
5
+ This package installs the Agentrific server and the `agentrific` command-line tool for macOS and Linux. The mobile apps connect to your server; your repositories, model accounts and agent processes stay on that machine. A paired device can disconnect and reconnect without ending a running agent session.
6
+
7
+ With Agentrific you can:
8
+
9
+ - Manage tasks and agent sessions across your Git repositories.
10
+ - Run coding tasks in separate Git worktrees.
11
+ - Follow live progress and send follow-up instructions from your phone.
12
+ - Attach images and files to give agents context.
13
+ - Pair multiple devices with the same server and revoke access when needed.
14
+
15
+ Learn more at [agentrific.com](https://agentrific.com).
16
+
17
+ ## Install and start
18
+
19
+ You'll need Node.js 22.19 or newer, Git, and [Pi](https://pi.dev/) on the machine that will run your agents. Install Pi and connect your model accounts using the same OS account that will run the server. See the [model setup guide](https://agentrific.com/docs/pi-model-setup).
6
20
 
7
21
  ```sh
8
22
  npm install -g @agentrific/server
@@ -10,8 +24,26 @@ agentrific init
10
24
  agentrific start
11
25
  ```
12
26
 
13
- Run `agentrific --help` for commands. The server defaults to port 4318 and stores its configuration and state in `~/.agentrific`. Its initial projects folder is `~/projects`.
27
+ The server defaults to port 4318 and stores its configuration and state in `~/.agentrific`. Its initial projects folder is `~/projects`; you can choose a different folder in the app's server settings.
28
+
29
+ ## Connect your phone
30
+
31
+ Open the Agentrific app on iOS or Android. In the server terminal, choose Tailscale Serve, Cloudflare Tunnel, or an existing HTTPS endpoint, then press **p** to display a pairing QR code. Scan it in the app and enter the separately printed six-digit PIN.
32
+
33
+ Once paired, select a project, create a task and start an agent. The server runs the work and streams progress back to your device. Use HTTPS for remote connections; your phone must be able to reach the configured server address.
34
+
35
+ See the [server setup and pairing guide](https://agentrific.com/docs/secure-server-setup) for connection options and configuration.
36
+
37
+ ## Useful commands
38
+
39
+ ```sh
40
+ agentrific --help # Show commands and options
41
+ agentrific status # Show server status
42
+ agentrific pair # Print a fresh pairing QR code and PIN
43
+ agentrific devices # List paired devices
44
+ agentrific update --check # Check for a newer server release
45
+ ```
14
46
 
15
- Use HTTPS through Tailscale Serve, Cloudflare Tunnel, or an existing HTTPS endpoint when connecting remotely. In the server terminal, choose a connection and press **p** to display a pairing QR code. Pair your Agentrific client with the QR code and the separately printed six-digit PIN.
47
+ ## Access and permissions
16
48
 
17
49
  Devices must pair before accessing server commands and events. Coding agents execute with the server user's permissions, so run the server under an account with access only to the repositories and credentials you intend to use.
package/cli.js CHANGED
@@ -30,8 +30,20 @@ var init_package = __esm({
30
30
  "package.json"() {
31
31
  package_default = {
32
32
  name: "@agentrific/server",
33
- version: "0.1.0",
33
+ version: "0.1.2",
34
34
  description: "Self-hosted control plane for long-running coding agents",
35
+ keywords: [
36
+ "agentrific",
37
+ "ai",
38
+ "android",
39
+ "cli",
40
+ "coding-agents",
41
+ "ios",
42
+ "pi",
43
+ "remote-control",
44
+ "self-hosted"
45
+ ],
46
+ homepage: "https://agentrific.com",
35
47
  repository: {
36
48
  type: "git",
37
49
  url: "git+https://github.com/devular/agentrific.git",
@@ -51,7 +63,7 @@ var init_package = __esm({
51
63
  cli: "AGENTRIFIC_DATA_DIR=./data tsx src/cli.ts"
52
64
  },
53
65
  dependencies: {
54
- "@earendil-works/pi-coding-agent": "^0.87.1",
66
+ "@earendil-works/pi-coding-agent": "1.0.0",
55
67
  "@fastify/cors": "^11.3.0",
56
68
  "@fastify/multipart": "^10.1.2",
57
69
  "@inquirer/select": "^5.2.5",
@@ -2328,10 +2340,10 @@ ${logs}` : ""}`);
2328
2340
  // src/delivery-writer.ts
2329
2341
  import { createAgentSession, SessionManager } from "@earendil-works/pi-coding-agent";
2330
2342
  import { z as z11 } from "zod";
2331
- function deliveryWriter(models2) {
2343
+ function deliveryWriter(models2, createSession = createAgentSession) {
2332
2344
  return async (run, input, diff, signal) => {
2333
2345
  signal?.throwIfAborted();
2334
- const { session } = await createAgentSession({
2346
+ const { session } = await createSession({
2335
2347
  cwd: run.workspacePath,
2336
2348
  model: await models2.resolve(run.model ?? await models2.defaultReference()),
2337
2349
  modelRuntime: models2.runtime,
@@ -2535,11 +2547,11 @@ function toolOutput(value) {
2535
2547
  const text = parsed.success ? parsed.data.content?.filter((part) => part.type === "text").map((part) => part.text || "").join("\n") || "Completed without text output." : boundedJson(value, 4e3);
2536
2548
  return text.length > 4e3 ? `${text.slice(0, 4e3)}\u2026 [truncated]` : text;
2537
2549
  }
2538
- function createPiFactory(files, models2, delivery2) {
2550
+ function createPiFactory(files, models2, delivery2, createSession = createAgentSession2) {
2539
2551
  return {
2540
2552
  async open(sessionId, cwd, sessionDirectory, selected = legacyModel, run) {
2541
2553
  const model = await models2.resolve(selected);
2542
- const { session } = await createAgentSession2({
2554
+ const { session } = await createSession({
2543
2555
  cwd,
2544
2556
  model,
2545
2557
  modelRuntime: models2.runtime,