@yagni-app/code-staging 0.1.0-staging.1021.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/dist/login.d.ts +7 -0
- package/dist/login.js +3 -1
- package/package.json +2 -2
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
|
-
|
|
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.
|
|
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": "
|
|
41
|
+
"yagniSourceSha": "7f34f64551f21aea107ba21cfe2f846bf84447d1"
|
|
42
42
|
}
|