@yagni-app/code-staging 0.1.0-staging.1020.1 → 0.1.0-staging.1022.1

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
@@ -88,14 +88,16 @@ yagni -p "explain the deploy pipeline; ask_yagni if unsure" # one-shot / print
88
88
  yagni logout # revoke the token and clear it locally
89
89
  ```
90
90
 
91
- The agent runs on model tiers routed by YAGNI: `advanced`, `standard`, and
92
- `efficient` (cheapest) are the three selectable via `--model`; `peak`, the
93
- strongest tier, is reserved for the `/go` pipeline's own judgment steps and is
94
- not one of the three.
95
- Interactive sessions default to `balanced`, which drives on `advanced`; pass
96
- `--model standard` or `--model efficient` to switch a run. The `/go` pipeline
97
- routes its own steps automatically judgment steps (plan, review) on `peak`,
98
- execution steps (map, implement, fix) on `standard`.
91
+ The agent runs on five opaque model tiers routed by YAGNI: `balanced` (the
92
+ interactive default), `peak` (the strongest, for hard judgment), `advanced`,
93
+ `standard` (for execution) and `efficient` (cheapest). `balanced` is a strategy
94
+ rather than a single rung: the session drives on the `advanced` tier and
95
+ escalates a bounded number of hard judgment calls per session to `peak`, so the
96
+ strongest model is consulted where being wrong is expensive instead of being
97
+ paid for on every turn. Pass `--model peak`, `--model standard`, or `--model
98
+ efficient` to pin a run to one tier. The `/go` pipeline routes its own steps
99
+ automatically: judgment steps (plan, review) on `peak`, execution steps (map,
100
+ implement, fix) on `standard`.
99
101
 
100
102
  `login` opens a device-code flow: it prints a short code and a URL. Open the URL
101
103
  in a browser where you are signed in to YAGNI, enter the code, and approve. The
@@ -114,6 +116,22 @@ flags like `--model` and `--print/-p` work.
114
116
  agent calls **`ask_yagni`** and gets a cited answer from the YAGNI app instead
115
117
  of guessing.
116
118
 
119
+ ### Works with your existing repo setup
120
+
121
+ - A repo that already carries Claude Code assets keeps working with nothing to
122
+ edit: `.claude/skills` and `.claude/commands/*.md` load automatically (each
123
+ command becomes a `/name` slash command). Project-local assets load only
124
+ after a one-time per-folder trust prompt; set `YAGNI_DISABLE_CLAUDE_COMPAT=1`
125
+ to turn the bridge off.
126
+ - `AGENTS.md` and `CLAUDE.md` context files load from the working directory and
127
+ its ancestors, unmodified.
128
+ - MCP servers registered in your YAGNI workspace are available in-session: run
129
+ `/mcp` to list them. Calls are proxied through the YAGNI backend with your
130
+ own identity, so server credentials never reach the laptop and every call is
131
+ audited; mutating tools go through the same permission gate as file edits.
132
+ There is no local MCP config file: servers and credentials are managed in the
133
+ web app (Connections).
134
+
117
135
  ## Environments (profiles)
118
136
 
119
137
  YAGNI Code keeps a **sticky active environment**. Each environment ("profile") binds a
@@ -147,11 +165,37 @@ yagni use prod # switch back (sticky); prod is the def
147
165
  | `YAGNI_DISABLE_BRANDING` | unset | `1` skips the YAGNI Code system-prompt rewrite entirely, so the engine's assembled prompt passes through byte-exact (no identity swap, no company-brief injection). |
148
166
  | `YAGNI_DISABLE_UPDATE_CHECK` | unset | `1` silences the new-version notice and the background update check. |
149
167
  | `YAGNI_DISABLE_CLAUDE_COMPAT` | unset | `1` turns off the zero-config `.claude` assets bridge (skills and commands). |
168
+ | `YAGNI_DISABLE_CRASH_REPORTS` | unset | `1` disables crash reporting (see "What leaves your machine"). |
150
169
 
151
170
  Credentials live in `~/.yagni-code/profiles/<name>.json` (mode `0600`); the active
152
171
  environment is recorded in `~/.yagni-code/config.json`. A pre-profiles
153
172
  `~/.yagni-code/credentials.json` is migrated automatically on first run.
154
173
 
174
+ Device tokens are revocable from both ends: `yagni logout` revokes the current
175
+ one, and a workspace admin can list every connected device and revoke any token
176
+ from the web app (Settings, YAGNI Code, Connected devices). Tokens are stored
177
+ hashed on the server and a revoked token stops validating immediately.
178
+
179
+ ### What leaves your machine
180
+
181
+ Everything the agent needs (model calls, grounding lookups, MCP calls, usage
182
+ metering) goes to your YAGNI backend over the authenticated session. No
183
+ third-party analytics or telemetry SDK runs on your laptop, and the underlying
184
+ engine's own telemetry and version pings are disabled at launch. Two outbound
185
+ flows exist beyond your YAGNI backend and your own repo tooling, disclosed
186
+ precisely:
187
+
188
+ - **Update check.** In the background after launch, the CLI asks the npm
189
+ registry (or your configured private registry mirror) whether a newer
190
+ version of this package exists, so the next launch can show a one-line
191
+ nudge. Package metadata only; no code or workspace data. Disable with
192
+ `YAGNI_DISABLE_UPDATE_CHECK=1`.
193
+ - **Crash reports.** When the client itself crashes, a sanitized crash report
194
+ (error class, scrubbed message and stack trace; secrets and env values
195
+ redacted, paths reduced) is sent to your YAGNI backend, not to any
196
+ third-party crash service, so we can fix the crash before you have to report
197
+ it. Disable with `YAGNI_DISABLE_CRASH_REPORTS=1`.
198
+
155
199
  ## Troubleshooting
156
200
 
157
201
  - **`Not logged in to environment "<name>" … Run \`yagni login\` first.`** — no
package/dist/login.d.ts CHANGED
@@ -9,6 +9,13 @@ export interface LoginDeps {
9
9
  baseUrl?: string;
10
10
  /** Which profile to store the minted token in. Defaults to the active one. */
11
11
  profileName?: string;
12
+ /**
13
+ * Client identifier sent with the token poll so the backend can attribute
14
+ * the minted credential to the app that requested it. Defaults to "cli";
15
+ * the desktop shell (which reuses this flow) passes "desktop". The server
16
+ * treats unknown values as absent, so this can never break a login.
17
+ */
18
+ client?: string;
12
19
  fetchImpl?: typeof fetch;
13
20
  now?: () => number;
14
21
  sleep?: (ms: number) => Promise<void>;
package/dist/login.js CHANGED
@@ -100,7 +100,9 @@ export async function login(deps = {}) {
100
100
  res = await fetchImpl(`${baseUrl}/api/yagni-code/auth/token`, {
101
101
  method: "POST",
102
102
  headers: { "content-type": "application/json" },
103
- body: JSON.stringify({ device_code: start.device_code }),
103
+ // `client` attributes the minted token to the requesting app; servers
104
+ // that predate the field simply ignore it.
105
+ body: JSON.stringify({ device_code: start.device_code, client: deps.client ?? "cli" }),
104
106
  signal: AbortSignal.timeout(POLL_REQUEST_TIMEOUT_MS),
105
107
  });
106
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "0.1.0-staging.1020.1",
3
+ "version": "0.1.0-staging.1022.1",
4
4
  "description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
@@ -38,5 +38,5 @@
38
38
  "@earendil-works/pi-tui": "0.83.0",
39
39
  "typebox": "^1.1.38"
40
40
  },
41
- "yagniSourceSha": "db184c4a3d15bc4b5e140a5337f34be7dadbb943"
41
+ "yagniSourceSha": "7f34f64551f21aea107ba21cfe2f846bf84447d1"
42
42
  }