incremnt 0.7.2 → 0.8.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
@@ -33,6 +33,46 @@ incremnt exercises history --name "Bench Press"
33
33
  incremnt browse
34
34
  ```
35
35
 
36
+ ### Headless agents
37
+
38
+ Agent tokens are named bearer tokens for cron jobs, MCP servers, and other non-browser clients. They default to read-only access and expire after 90 days.
39
+
40
+ Create and use a read-only token:
41
+
42
+ ```bash
43
+ incremnt login
44
+ incremnt agents create --name "morning report"
45
+ export INCREMNT_AGENT_TOKEN=incr_agent_...
46
+ export INCREMNT_BASE_URL=https://incremnt-sync.onrender.com
47
+ incremnt sessions list --limit 5
48
+ ```
49
+
50
+ Create a write-capable token only for workflows that need existing write commands such as Ask/proposals or observation lifecycle actions:
51
+
52
+ ```bash
53
+ incremnt agents create --name "coach writer" --access write --expires-days 30
54
+ ```
55
+
56
+ Persist an agent token into the normal CLI session file:
57
+
58
+ ```bash
59
+ incremnt agents create --name "local mcp" --store
60
+ incremnt login --agent-token incr_agent_...
61
+ ```
62
+
63
+ Manage tokens from a human session:
64
+
65
+ ```bash
66
+ incremnt agents list
67
+ incremnt agents revoke --id agt_...
68
+ ```
69
+
70
+ Token safety:
71
+ - Agent token plaintext is shown once on create.
72
+ - Store secrets in your shell, process manager, or MCP host secret mechanism, not in source control.
73
+ - `INCREMNT_AGENT_TOKEN` takes precedence over the stored session and is never persisted by `status` or read commands.
74
+ - Agent tokens cannot create, list, or revoke other agent tokens.
75
+
36
76
  ### Local snapshot
37
77
 
38
78
  If you prefer to work offline, import a snapshot into the local session:
@@ -82,6 +122,11 @@ incremnt login --session-file ~/Downloads/session.json
82
122
  | `mcp install` | Register `incremnt-mcp` with Claude Desktop, Claude Code, and Codex CLI |
83
123
  | `login` | Authenticate with the hosted sync service (opens browser) |
84
124
  | `login --no-browser` | Headless login flow for SSH/Termius/remote shells |
125
+ | `login --agent-token <token>` | Store direct agent-token auth for CLI/MCP |
126
+ | `agents create --name <name>` | Create a read-only named agent token |
127
+ | `agents create --name <name> --access <read\|write>` | Create a named agent token with explicit access |
128
+ | `agents list` | List agent token metadata and token hints |
129
+ | `agents revoke --id <id>` | Revoke an agent token |
85
130
  | `logout` | Clear stored session |
86
131
  | `status` | Show current mode, auth state, and config paths |
87
132
  | `contract` | Machine-readable command surface for scripts |
@@ -98,6 +143,7 @@ incremnt login --session-file ~/Downloads/session.json
98
143
  | `--snapshot <file>` | Bootstrap login from a local snapshot |
99
144
  | `--session-file <file>` | Import an existing session file |
100
145
  | `--token <token>` / `--email <email>` | Non-interactive bootstrap login options |
146
+ | `--agent-token <token>` | Store direct agent-token auth with `login` |
101
147
 
102
148
  ### Browse mode key bindings
103
149
 
@@ -139,7 +185,17 @@ To register manually instead, add to your Claude Code project config (`.mcp.json
139
185
  }
140
186
  ```
141
187
 
142
- The MCP server uses the same auth session as the CLI run `incremnt login` first.
188
+ The MCP server uses the same auth resolver as the CLI. It prefers `INCREMNT_AGENT_TOKEN`, then the stored session from `incremnt login` or `incremnt login --agent-token`.
189
+
190
+ For a headless MCP host:
191
+
192
+ ```bash
193
+ export INCREMNT_BASE_URL=https://incremnt-sync.onrender.com
194
+ export INCREMNT_AGENT_TOKEN=incr_agent_...
195
+ incremnt-mcp
196
+ ```
197
+
198
+ Read-only agent tokens can call read tools. Write tools return structured JSON with `code: "INSUFFICIENT_SCOPE"` unless the active token has write access. Missing, expired, or incompatible auth also returns structured JSON errors so agents can reauth or downgrade cleanly.
143
199
 
144
200
  ### MCP tool surface
145
201
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incremnt",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "Command-line tool for querying your incremnt strength training data",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,6 +25,7 @@
25
25
  "evals:promptfoo": "promptfoo eval -c promptfooconfig.yaml",
26
26
  "evals:promptfoo:production-replay": "SUMMARY_EVAL_CASE_SET=production-replay promptfoo eval -c promptfooconfig.yaml",
27
27
  "evals:promptfoo:live": "PROMPTFOO_LIVE=1 SUMMARY_EVALS_LIVE=1 promptfoo eval -c promptfooconfig.yaml",
28
+ "evals:ask-replay": "node ./scripts/run-ask-replay.js",
28
29
  "evals:workout-bakeoff": "node ./scripts/run-workout-prompt-bakeoff.js",
29
30
  "evals:coach-bakeoff": "node ./scripts/run-production-coach-bakeoff.js",
30
31
  "evals:coach-replay": "node ./scripts/run-production-coach-replay.js",