@skrr-ai/cli 0.1.81 → 0.1.82
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/dist/base-command.d.ts +16 -0
- package/dist/base-command.js +124 -9
- package/dist/commands/followups/checkin.js +1 -1
- package/dist/commands/login.js +10 -0
- package/dist/commands/logout.js +4 -0
- package/dist/commands/store/installs.js +6 -1
- package/dist/lib/auth-storage.d.ts +5 -0
- package/dist/lib/auth-storage.js +8 -0
- package/dist/lib/config.d.ts +8 -0
- package/dist/lib/credential-resolver.js +7 -1
- package/dist/lib/daemonBroker.d.ts +35 -0
- package/dist/lib/daemonBroker.js +187 -11
- package/dist/lib/daemonBrokerRefusal.d.ts +14 -0
- package/dist/lib/daemonBrokerRefusal.js +18 -1
- package/dist/lib/harness-context.d.ts +8 -0
- package/dist/lib/harness-context.js +55 -0
- package/dist/lib/login.js +4 -1
- package/dist/lib/refresh.js +4 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.d.ts +25 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.js +35 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.d.ts +25 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.js +33 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +3856 -3801
- package/oclif.manifest.json +15792 -15792
- package/package.json +2 -2
|
@@ -148,7 +148,40 @@ export const SENSITIVE_ENV_PREFIX_EXCEPTIONS = new Set([
|
|
|
148
148
|
// engine) must keep it to detect they already run as the workload uid. Not
|
|
149
149
|
// a secret — it authorizes nothing without the matching real uid.
|
|
150
150
|
'SKRR_WORKLOAD_UID',
|
|
151
|
+
// OSK-13254 — "this process descends from a skrrd agent/tool spawn". It only
|
|
152
|
+
// ever REMOVES authority (a `skrr` that sees it borrows from the daemon and
|
|
153
|
+
// never reads or writes a stored CLI session), so it must survive every later
|
|
154
|
+
// re-sanitization: a Bash tool that runs `skrr code`, whose engine runs `skrr`,
|
|
155
|
+
// is still the agent's process. See `DAEMON_CHILD_ENV` below.
|
|
156
|
+
'SKRR_DAEMON_CHILD',
|
|
151
157
|
]);
|
|
158
|
+
/**
|
|
159
|
+
* OSK-13254 — the marker the daemon stamps on every agent- or tool-driven child
|
|
160
|
+
* (`daemon/src/env-sanitize.ts`, `daemon/src/terminal/agent-terminal-env.ts`).
|
|
161
|
+
*
|
|
162
|
+
* A `skrr` that sees it is a borrower: it redeems short-lived tokens from the
|
|
163
|
+
* daemon's loopback broker, never adopts a CLI refresh session of its own, and
|
|
164
|
+
* never reads the person's stored one (`cli/src/lib/harness-context.ts`). A
|
|
165
|
+
* person's own terminal — including the web terminal, which is a human surface
|
|
166
|
+
* (`humanTerminalEnv`) — does not carry it.
|
|
167
|
+
*
|
|
168
|
+
* The marker can only take authority away, so a process that forges it hurts
|
|
169
|
+
* nobody but itself. On a laptop it is POLICY, not a boundary: a same-uid child
|
|
170
|
+
* that deletes it can do whatever the person's own shell can. Where a uid
|
|
171
|
+
* boundary exists (Dedicated Runtime, identity-split Hosted Machines), the
|
|
172
|
+
* guest descriptor already offers only the access-token mode, so a durable CLI
|
|
173
|
+
* family cannot be minted there whatever the environment says.
|
|
174
|
+
*/
|
|
175
|
+
export const DAEMON_CHILD_ENV = 'SKRR_DAEMON_CHILD';
|
|
176
|
+
/**
|
|
177
|
+
* True when `env` carries the daemon-child marker with ANY non-empty value.
|
|
178
|
+
* Deliberately no "0 means off": the marker only narrows authority, so the
|
|
179
|
+
* one value that could switch it off is the one a request-carried environment
|
|
180
|
+
* would forge.
|
|
181
|
+
*/
|
|
182
|
+
export function isDaemonChildEnv(env) {
|
|
183
|
+
return Boolean(env[DAEMON_CHILD_ENV]?.trim());
|
|
184
|
+
}
|
|
152
185
|
/**
|
|
153
186
|
* Build a sanitized snapshot of the parent's own env for a spawned
|
|
154
187
|
* child, stripping credentials and library-injection vectors while
|