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 +57 -1
- package/package.json +2 -1
- package/src/ask-answer-verifier.js +857 -0
- package/src/ask-coach.js +2634 -0
- package/src/ask-replay.js +358 -0
- package/src/auth.js +169 -15
- package/src/contract.js +160 -3
- package/src/format.js +24 -1
- package/src/lib.js +205 -17
- package/src/mcp.js +88 -24
- package/src/openrouter.js +242 -19
- package/src/plan-changeset.js +132 -0
- package/src/program-draft.js +230 -0
- package/src/prompt-changelog.js +90 -0
- package/src/promptfoo-evals.js +10 -4
- package/src/promptfoo-langfuse-scores.js +55 -0
- package/src/queries.js +992 -987
- package/src/remote.js +465 -12
- package/src/score-context.js +14 -7
- package/src/score-prelude.js +113 -0
- package/src/service-url.js +9 -0
- package/src/summary-evals.js +677 -42
- package/src/sync-service.js +1259 -352
- package/src/transport.js +119 -3
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
|
|
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.
|
|
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",
|