@yagni-app/code-staging 0.2.1-staging.1041.1 → 0.2.1-staging.1043.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/cli.d.ts +10 -15
- package/dist/cli.js +33 -10
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.js +1 -1
- package/dist/extension/branding.js +1 -1
- package/dist/extension/chipEditor.d.ts +1 -1
- package/dist/extension/chipEditor.js +1 -1
- package/dist/extension/rerouteNotice.d.ts +1 -1
- package/dist/extension/rerouteNotice.js +1 -1
- package/package.json +5 -5
package/dist/cli.d.ts
CHANGED
|
@@ -14,25 +14,20 @@
|
|
|
14
14
|
*/
|
|
15
15
|
/**
|
|
16
16
|
* Seed `editorPaddingX` into the per-profile pi `settings.json` so the prompt
|
|
17
|
-
* input
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* input aligns with the chat/output area (`outputPad`) and the status bar.
|
|
18
|
+
* Fills the key in only when absent — an explicit user choice (including 0)
|
|
19
|
+
* is never overwritten. Best-effort: a missing/corrupt settings file or a
|
|
20
20
|
* write failure must never block the launch.
|
|
21
21
|
*/
|
|
22
|
+
export declare function seedEditorPadding(piAgentDir: string): void;
|
|
22
23
|
/**
|
|
23
|
-
* Seed `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* is never overwritten;
|
|
29
|
-
* - backs off on a missing-dir, corrupt, non-object, or symlinked settings
|
|
30
|
-
* file rather than risk clobbering anything;
|
|
31
|
-
* - writes ATOMICALLY (temp file + rename) and preserves the existing file's
|
|
32
|
-
* permissions, so a crash mid-write can never truncate the user's settings.
|
|
33
|
-
* Any failure is swallowed: seeding must never block or break a launch.
|
|
24
|
+
* Seed `collapseChangelog` into the per-profile pi `settings.json` so the
|
|
25
|
+
* "What's New" section on startup renders as a one-liner instead of a full
|
|
26
|
+
* markdown dump. Fills the key in only when absent — an explicit user choice
|
|
27
|
+
* (including false) is never overwritten. Best-effort: a missing/corrupt
|
|
28
|
+
* settings file or a write failure must never block the launch.
|
|
34
29
|
*/
|
|
35
|
-
export declare function
|
|
30
|
+
export declare function seedCollapseChangelog(piAgentDir: string): void;
|
|
36
31
|
export declare const HELP_TEXT: string;
|
|
37
32
|
/** Parse `use <name> [--base-url <url>]` argv into its parts. */
|
|
38
33
|
export declare function parseUseArgs(args: string[]): {
|
package/dist/cli.js
CHANGED
|
@@ -53,19 +53,19 @@ async function confirmOnTty(question) {
|
|
|
53
53
|
* write failure must never block the launch.
|
|
54
54
|
*/
|
|
55
55
|
/**
|
|
56
|
-
* Seed
|
|
57
|
-
*
|
|
56
|
+
* Seed a key into the per-profile pi `settings.json`. Shared guard rails for
|
|
57
|
+
* all settings seeds:
|
|
58
58
|
*
|
|
59
59
|
* This writes to a user-owned file, so it is deliberately conservative:
|
|
60
|
-
* - fills the key in ONLY when absent — an explicit user choice (including 0
|
|
61
|
-
* is never overwritten;
|
|
60
|
+
* - fills the key in ONLY when absent — an explicit user choice (including 0
|
|
61
|
+
* or false) is never overwritten;
|
|
62
62
|
* - backs off on a missing-dir, corrupt, non-object, or symlinked settings
|
|
63
63
|
* file rather than risk clobbering anything;
|
|
64
64
|
* - writes ATOMICALLY (temp file + rename) and preserves the existing file's
|
|
65
65
|
* permissions, so a crash mid-write can never truncate the user's settings.
|
|
66
66
|
* Any failure is swallowed: seeding must never block or break a launch.
|
|
67
67
|
*/
|
|
68
|
-
|
|
68
|
+
function seedSetting(piAgentDir, key, value) {
|
|
69
69
|
try {
|
|
70
70
|
const settingsPath = join(piAgentDir, "settings.json");
|
|
71
71
|
let settings = {};
|
|
@@ -88,9 +88,9 @@ export function seedEditorPadding(piAgentDir) {
|
|
|
88
88
|
settings = parsed;
|
|
89
89
|
existingMode = lstatSync(settingsPath).mode & 0o777;
|
|
90
90
|
}
|
|
91
|
-
if (settings
|
|
91
|
+
if (settings[key] !== undefined)
|
|
92
92
|
return; // user already chose
|
|
93
|
-
settings
|
|
93
|
+
settings[key] = value;
|
|
94
94
|
// Atomic write: serialize to a temp file in the same directory, then
|
|
95
95
|
// rename over the target. A crash leaves either the old file or the temp
|
|
96
96
|
// file, never a half-written settings.json.
|
|
@@ -111,6 +111,26 @@ export function seedEditorPadding(piAgentDir) {
|
|
|
111
111
|
// never block launch on a settings-seed failure
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Seed `editorPaddingX` into the per-profile pi `settings.json` so the prompt
|
|
116
|
+
* input aligns with the chat/output area (`outputPad`) and the status bar.
|
|
117
|
+
* Fills the key in only when absent — an explicit user choice (including 0)
|
|
118
|
+
* is never overwritten. Best-effort: a missing/corrupt settings file or a
|
|
119
|
+
* write failure must never block the launch.
|
|
120
|
+
*/
|
|
121
|
+
export function seedEditorPadding(piAgentDir) {
|
|
122
|
+
seedSetting(piAgentDir, "editorPaddingX", PAD_X);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Seed `collapseChangelog` into the per-profile pi `settings.json` so the
|
|
126
|
+
* "What's New" section on startup renders as a one-liner instead of a full
|
|
127
|
+
* markdown dump. Fills the key in only when absent — an explicit user choice
|
|
128
|
+
* (including false) is never overwritten. Best-effort: a missing/corrupt
|
|
129
|
+
* settings file or a write failure must never block the launch.
|
|
130
|
+
*/
|
|
131
|
+
export function seedCollapseChangelog(piAgentDir) {
|
|
132
|
+
seedSetting(piAgentDir, "collapseChangelog", true);
|
|
133
|
+
}
|
|
114
134
|
async function runDefault(passthroughArgs) {
|
|
115
135
|
// Cache-backed update nudge (never a network wait), then a background cache
|
|
116
136
|
// refresh that completes while the session runs. Both fail soft.
|
|
@@ -141,10 +161,13 @@ async function runDefault(passthroughArgs) {
|
|
|
141
161
|
const piAgentDir = agentDir(profile.name);
|
|
142
162
|
mkdirSync(piAgentDir, { recursive: true, mode: 0o700 });
|
|
143
163
|
// Seed the editor's horizontal padding so the prompt input aligns with the
|
|
144
|
-
// chat/output area and the status bar
|
|
145
|
-
//
|
|
146
|
-
//
|
|
164
|
+
// chat/output area and the status bar, and collapse the changelog so the
|
|
165
|
+
// "What's New" section on startup renders as a one-liner instead of a full
|
|
166
|
+
// markdown dump. Only fills in when the user has not set either themselves —
|
|
167
|
+
// an explicit choice is never clobbered. Best-effort: a corrupt or
|
|
168
|
+
// unreadable settings.json must never block the launch.
|
|
147
169
|
seedEditorPadding(piAgentDir);
|
|
170
|
+
seedCollapseChangelog(piAgentDir);
|
|
148
171
|
// Generate the shadow pi package so the terminal title/process name read
|
|
149
172
|
// "YAGNI Code" instead of "pi"/"π". Best-effort: if it can't be built we
|
|
150
173
|
// still launch (un-rebranded but hermetic), never blocking the agent.
|
package/dist/doctor.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export interface DoctorDeps {
|
|
|
94
94
|
export declare function ghOnPathDefault(env?: NodeJS.ProcessEnv): boolean;
|
|
95
95
|
/**
|
|
96
96
|
* Locate the bash pi will actually use on Windows. The order and locations
|
|
97
|
-
* MIRROR pi 0.
|
|
97
|
+
* MIRROR pi 0.84.1's own shell resolution (dist/utils/shell.js) exactly:
|
|
98
98
|
* `%ProgramFiles%\Git\bin\bash.exe`, then `%ProgramFiles(x86)%\Git\bin\bash.exe`,
|
|
99
99
|
* then `bash.exe` on PATH (`where bash.exe`). Deliberately NOTHING wider — a
|
|
100
100
|
* per-user Git install in `%LOCALAPPDATA%` that is not on PATH is invisible
|
package/dist/doctor.js
CHANGED
|
@@ -316,7 +316,7 @@ export function ghOnPathDefault(env = process.env) {
|
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
318
318
|
* Locate the bash pi will actually use on Windows. The order and locations
|
|
319
|
-
* MIRROR pi 0.
|
|
319
|
+
* MIRROR pi 0.84.1's own shell resolution (dist/utils/shell.js) exactly:
|
|
320
320
|
* `%ProgramFiles%\Git\bin\bash.exe`, then `%ProgramFiles(x86)%\Git\bin\bash.exe`,
|
|
321
321
|
* then `bash.exe` on PATH (`where bash.exe`). Deliberately NOTHING wider — a
|
|
322
322
|
* per-user Git install in `%LOCALAPPDATA%` that is not on PATH is invisible
|
|
@@ -54,7 +54,7 @@ export const DRIVER_DELEGATION_PARAGRAPH = "Delegation: fan codebase mapping, wi
|
|
|
54
54
|
* module stays a pure string, with no env dependency of its own.
|
|
55
55
|
*/
|
|
56
56
|
export const YAGNI_IDENTITY_DRIVER = `${YAGNI_IDENTITY}\n\n${DRIVER_DELEGATION_PARAGRAPH}`;
|
|
57
|
-
// pi 0.
|
|
57
|
+
// pi 0.84.1's exact identity sentence (dist/core/system-prompt.js). Exported as
|
|
58
58
|
// the identity anchor the CLI's pi-contract tripwire test reads back from pi's
|
|
59
59
|
// built system prompt, so a pi bump that reworded the opener (silently defeating
|
|
60
60
|
// our rebrand) fails CI loudly. Export-only: no behavior change here.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* literal text is the source of truth, so undo/cursor/history and the
|
|
18
18
|
* chip→model mapping all share one string and can't desync.
|
|
19
19
|
*
|
|
20
|
-
* Validated against pi 0.
|
|
20
|
+
* Validated against pi 0.84.1 (spike, 5/5): the subclass owns `onPasteImage`
|
|
21
21
|
* because `setCustomEditorComponent` only fills it when unset, and jiti aliases
|
|
22
22
|
* the extension's pi imports to the same module instance pi uses.
|
|
23
23
|
*/
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* literal text is the source of truth, so undo/cursor/history and the
|
|
18
18
|
* chip→model mapping all share one string and can't desync.
|
|
19
19
|
*
|
|
20
|
-
* Validated against pi 0.
|
|
20
|
+
* Validated against pi 0.84.1 (spike, 5/5): the subclass owns `onPasteImage`
|
|
21
21
|
* because `setCustomEditorComponent` only fills it when unset, and jiti aliases
|
|
22
22
|
* the extension's pi imports to the same module instance pi uses.
|
|
23
23
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The backend sets `x-yagni-model-reroute: <requested>-><effective>:vision` on
|
|
5
5
|
* every response it silently upgrades for image content (yagniCodeV1.ts). pi's
|
|
6
6
|
* `after_provider_response` event is the only client-side seam that sees raw
|
|
7
|
-
* response headers (verified against pi 0.
|
|
7
|
+
* response headers (verified against pi 0.84.1's AfterProviderResponseEvent:
|
|
8
8
|
* `{ type: "after_provider_response", status: number, headers: Record<string,
|
|
9
9
|
* string> }` in dist/core/extensions/types.d.ts). Its docs (extensions.md,
|
|
10
10
|
* "after_provider_response") describe `event.headers` as "normalized response
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The backend sets `x-yagni-model-reroute: <requested>-><effective>:vision` on
|
|
5
5
|
* every response it silently upgrades for image content (yagniCodeV1.ts). pi's
|
|
6
6
|
* `after_provider_response` event is the only client-side seam that sees raw
|
|
7
|
-
* response headers (verified against pi 0.
|
|
7
|
+
* response headers (verified against pi 0.84.1's AfterProviderResponseEvent:
|
|
8
8
|
* `{ type: "after_provider_response", status: number, headers: Record<string,
|
|
9
9
|
* string> }` in dist/core/extensions/types.d.ts). Its docs (extensions.md,
|
|
10
10
|
* "after_provider_response") describe `event.headers` as "normalized response
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagni-app/code-staging",
|
|
3
|
-
"version": "0.2.1-staging.
|
|
3
|
+
"version": "0.2.1-staging.1043.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)",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"main": "./dist/cli.js",
|
|
35
35
|
"types": "./dist/cli.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
38
|
-
"@earendil-works/pi-tui": "0.
|
|
39
|
-
"typebox": "^1.
|
|
37
|
+
"@earendil-works/pi-coding-agent": "0.84.1",
|
|
38
|
+
"@earendil-works/pi-tui": "0.84.1",
|
|
39
|
+
"typebox": "^1.3.11"
|
|
40
40
|
},
|
|
41
|
-
"yagniSourceSha": "
|
|
41
|
+
"yagniSourceSha": "2a370c71157559a3fc64d9c3ca2fd2677f26ef4e"
|
|
42
42
|
}
|