@fbincon/claude-code-statusline 3.9.1 → 3.9.2
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 +78 -78
- package/candidate.json +274 -230
- package/node_modules/@fbincon/statusline-cli/dist/src/diagnostics/service.js +17 -7
- package/node_modules/@fbincon/statusline-cli/dist/src/diagnostics/service.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/management/service.js +7 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/management/service.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/automatic-state.d.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/automatic-state.js +3 -2
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/automatic-state.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/command.js +14 -5
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/command.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/service.d.ts +3 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/service.js +56 -22
- package/node_modules/@fbincon/statusline-cli/dist/src/sources/service.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.d.ts +3 -3
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js +4 -2
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js.map +1 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/.claude-plugin/plugin.json +1 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/register.ts +76 -68
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/backend.ts +3 -3
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/keys.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/settings.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/alignment-manager.ts +2 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/draft.ts +45 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/forms.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/group-manager.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/profile-manager.ts +14 -5
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/quick-setup.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/source-manager.ts +15 -4
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/source-validation.ts +2 -2
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-contracts.ts +6 -3
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/generated-locales.ts +66 -6
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/resource-manifest.json +18 -18
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/.claude-plugin/plugin.json +1 -1
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/resource-manifest.json +3 -3
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.d.ts +9 -3
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js +2 -1
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/alignment-manager.js +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/alignment-manager.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js +3 -3
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.d.ts +16 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js +56 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/group-manager.js +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/group-manager.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/profile-manager.js +32 -3
- package/node_modules/@fbincon/statusline-core/dist/src/editor/profile-manager.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/quick-setup.js +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/quick-setup.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/source-manager.d.ts +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/source-manager.js +24 -4
- package/node_modules/@fbincon/statusline-core/dist/src/editor/source-manager.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/editor/source-validation.js +2 -2
- package/node_modules/@fbincon/statusline-core/dist/src/editor/source-validation.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/extensions/model.d.ts +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/extensions/model.js +15 -1
- package/node_modules/@fbincon/statusline-core/dist/src/extensions/model.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.d.ts +60 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js +66 -6
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-HK.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-HK.js +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-HK.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-TW.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-TW.js +3 -1
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-TW.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/management/compatibility.js +2 -1
- package/node_modules/@fbincon/statusline-core/dist/src/management/compatibility.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/release.d.ts +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/release.js +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/indicators.js +5 -4
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/indicators.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.d.ts +4 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js +6 -2
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js +1 -1
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js.map +1 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/en.json +11 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ja.json +11 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ko.json +11 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-CN.json +11 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-HK.json +11 -1
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-TW.json +11 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/darwin-process.d.ts +8 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/darwin-process.js +33 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/darwin-process.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/npm.js +47 -16
- package/node_modules/@fbincon/statusline-platform/dist/src/npm.js.map +1 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/package-copy.js +10 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/package-copy.js.map +1 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/performance.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/performance.js +17 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/performance.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.js +7 -3
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.js.map +1 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/source-process.js +6 -12
- package/node_modules/@fbincon/statusline-platform/dist/src/source-process.js.map +1 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.d.ts +1 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js +2 -5
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js.map +1 -1
- package/node_modules/@fbincon/statusline-platform/dist/src/windows-command.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/windows-command.js +7 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/windows-command.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/windows-source-exec.d.ts +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/windows-source-exec.js +65 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/windows-source-exec.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/shortcuts.js +4 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing/shortcuts.js.map +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/session.d.ts +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js +33 -6
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js.map +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/state.d.ts +1 -1
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js +12 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js.map +1 -1
- package/package.json +2 -2
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/draft.ts
CHANGED
|
@@ -16,6 +16,7 @@ import type {
|
|
|
16
16
|
Draft,
|
|
17
17
|
ReadResult,
|
|
18
18
|
Scope,
|
|
19
|
+
ConfigTarget,
|
|
19
20
|
} from '../generated-contracts.ts';
|
|
20
21
|
import { NUMERIC_FIELDS, numericValue, numericDiagnostic } from './numeric.ts';
|
|
21
22
|
import { bestMatch, fields, normalize } from './search.ts';
|
|
@@ -35,6 +36,10 @@ export function copyDraft(draft: Draft): Draft {
|
|
|
35
36
|
export function sameDraft(left: Draft, right: Draft): boolean {
|
|
36
37
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
37
38
|
}
|
|
39
|
+
export const definitiveSaveRefusal = (code: string): boolean => ['invalid_request','invalid_configuration','configuration_conflict','not_installed','ownership_mismatch','unsupported_protocol','unsupported_operation'].includes(code);
|
|
40
|
+
export interface PendingSave {
|
|
41
|
+
draft: Draft; revision: string; target?: ConfigTarget; installation: ReadResult['installation'];
|
|
42
|
+
}
|
|
38
43
|
|
|
39
44
|
/** Pure tool draft. Persistence and host configuration calls live in the hook. */
|
|
40
45
|
export class Editor {
|
|
@@ -66,6 +71,39 @@ export class Editor {
|
|
|
66
71
|
buffers: Record<NumericField, string>;
|
|
67
72
|
fieldErrors: Partial<Record<NumericField, string>> = {};
|
|
68
73
|
fieldErrorMessages: Partial<Record<NumericField, LocalizedText>> = {};
|
|
74
|
+
saveState: 'idle' | 'pending' | 'unknown' = 'idle';
|
|
75
|
+
pendingSave: PendingSave | null = null;
|
|
76
|
+
mutationGeneration = 0;
|
|
77
|
+
|
|
78
|
+
canMutateDraft(generation = this.mutationGeneration): boolean {
|
|
79
|
+
if (this.saveState === 'idle' && generation === this.mutationGeneration) return true;
|
|
80
|
+
this.compositionError = text('editor.save_locked');
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
setSaveState(value: Editor['saveState']): void {
|
|
84
|
+
if (this.saveState !== value) this.mutationGeneration++;
|
|
85
|
+
this.saveState = value;
|
|
86
|
+
}
|
|
87
|
+
beginSave(): PendingSave {
|
|
88
|
+
if (!this.canMutateDraft()) throw new Error('A display save is already unresolved');
|
|
89
|
+
this.pendingSave = {draft:copyDraft(this.draft),revision:this.baseline.revision,installation:JSON.parse(JSON.stringify(this.baseline.installation)) as ReadResult['installation'],
|
|
90
|
+
...(this.baseline.configuration ? {target:JSON.parse(JSON.stringify(this.baseline.configuration.target)) as ConfigTarget} : {})};
|
|
91
|
+
this.setSaveState('pending');
|
|
92
|
+
return this.pendingSave;
|
|
93
|
+
}
|
|
94
|
+
saveFailed(code: string): void {
|
|
95
|
+
const refused = definitiveSaveRefusal(code);
|
|
96
|
+
this.setSaveState(refused ? 'idle' : 'unknown');
|
|
97
|
+
if (refused) this.pendingSave = null;
|
|
98
|
+
}
|
|
99
|
+
reconcileSave(current: ReadResult): 'saved' | 'not_committed' | 'conflict' {
|
|
100
|
+
const submitted = this.pendingSave;
|
|
101
|
+
if (!submitted) throw new Error('No pending display save');
|
|
102
|
+
const outcome = sameDraft(current.draft,submitted.draft) && current.installed && JSON.stringify(current.installation) === JSON.stringify(submitted.installation) ? 'saved' : current.revision === submitted.revision ? 'not_committed' : 'conflict';
|
|
103
|
+
if (outcome === 'saved') this.committed(current);
|
|
104
|
+
else { this.pendingSave=null;this.setSaveState('idle'); }
|
|
105
|
+
return outcome;
|
|
106
|
+
}
|
|
69
107
|
|
|
70
108
|
constructor(
|
|
71
109
|
public readonly description: DescribeResult,
|
|
@@ -87,6 +125,7 @@ export class Editor {
|
|
|
87
125
|
}
|
|
88
126
|
|
|
89
127
|
replaceDraft(draft: Draft): void {
|
|
128
|
+
if (!this.canMutateDraft()) return;
|
|
90
129
|
this.draft = copyDraft(draft);
|
|
91
130
|
for (const scope of ['main', 'subagent'] as const) {
|
|
92
131
|
this.order[scope] = nodes(this.draft,scope).map(i=>i.id);
|
|
@@ -157,6 +196,7 @@ export class Editor {
|
|
|
157
196
|
this.adding=false;this.pickerSaved=null;
|
|
158
197
|
}
|
|
159
198
|
instanceAction(scope: Scope, action:'add'|'copy'|'remove', typeId?:string): boolean {
|
|
199
|
+
if (!this.canMutateDraft()) return false;
|
|
160
200
|
this.compositionError = text('composition.invalid');
|
|
161
201
|
const draft=copyDraft(this.draft), list=nodes(draft,scope);
|
|
162
202
|
const selected=this.adding ? this.pickerSaved?.selected : this.selected[scope];
|
|
@@ -202,6 +242,7 @@ export class Editor {
|
|
|
202
242
|
}
|
|
203
243
|
|
|
204
244
|
toggle(scope: Scope, id: string): boolean {
|
|
245
|
+
if (!this.canMutateDraft()) return false;
|
|
205
246
|
this.compositionError = text('composition.invalid');
|
|
206
247
|
if(this.adding)return this.instanceAction(scope,'add',id);
|
|
207
248
|
const draft=copyDraft(this.draft),node=nodes(draft,scope).find(i=>i.id===id);
|
|
@@ -212,6 +253,7 @@ export class Editor {
|
|
|
212
253
|
}
|
|
213
254
|
|
|
214
255
|
move(scope: Scope, delta: -1 | 1): boolean {
|
|
256
|
+
if (!this.canMutateDraft()) return false;
|
|
215
257
|
this.compositionError = text('composition.invalid');
|
|
216
258
|
if (this.adding || this.filtered(scope)) return false;
|
|
217
259
|
const visible = this.visible(scope).map((item) => item.id as string);
|
|
@@ -238,6 +280,7 @@ export class Editor {
|
|
|
238
280
|
}
|
|
239
281
|
|
|
240
282
|
setBuffer(field: NumericField, value: string): void {
|
|
283
|
+
if (!this.canMutateDraft()) return;
|
|
241
284
|
this.activeNumeric = field;
|
|
242
285
|
this.buffers[field] = value;
|
|
243
286
|
delete this.fieldErrors[field];
|
|
@@ -254,6 +297,7 @@ export class Editor {
|
|
|
254
297
|
}
|
|
255
298
|
|
|
256
299
|
acceptNumeric(field?: NumericField): boolean {
|
|
300
|
+
if (!this.canMutateDraft()) return false;
|
|
257
301
|
const values: Partial<Record<NumericField, number | 'event'>> = {};
|
|
258
302
|
const fields = field ? [field] : NUMERIC_FIELDS;
|
|
259
303
|
for (const key of fields) {
|
|
@@ -273,6 +317,7 @@ export class Editor {
|
|
|
273
317
|
}
|
|
274
318
|
|
|
275
319
|
committed(current: ReadResult): void {
|
|
320
|
+
this.pendingSave=null;this.setSaveState('idle');
|
|
276
321
|
this.baseline = { ...current, draft: copyDraft(current.draft) };
|
|
277
322
|
this.draft = copyDraft(current.draft);
|
|
278
323
|
this.cancelNumeric();
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/forms.ts
CHANGED
|
@@ -95,6 +95,7 @@ function options(draft: Draft, scope: 'main' | 'subagent', id: string) {
|
|
|
95
95
|
}
|
|
96
96
|
export function setFormValue(view: FormView, current: FormRow, raw: string | boolean): boolean {
|
|
97
97
|
const e = view.editor!;
|
|
98
|
+
if (!e.canMutateDraft()) { setMessage(view, 'message', e.compositionError); return false; }
|
|
98
99
|
const spec = current.spec;
|
|
99
100
|
let value: unknown = raw;
|
|
100
101
|
if (spec.kind === 'integer') {
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/group-manager.ts
CHANGED
|
@@ -32,6 +32,7 @@ function form(e: Editor, g?: GroupDraft): void {
|
|
|
32
32
|
}
|
|
33
33
|
function apply(e: Editor, edit: GroupEdit): void {
|
|
34
34
|
const m = e.groupManager!;
|
|
35
|
+
if (!e.canMutateDraft()) { m.error=true;m.errorMessage=e.compositionError;return; }
|
|
35
36
|
try {
|
|
36
37
|
const display = editGroup(e.draft.display, m.scope, edit, () => newInstance('text', groupScope(e.draft.display, m.scope).instances).id);
|
|
37
38
|
if (!isDraft({ ...e.draft, display })) throw new Error('invalid');
|
|
@@ -162,7 +162,11 @@ export async function performProfileAction(e: Editor, backend: ProfileBackend):
|
|
|
162
162
|
if (!m || !effect) return;
|
|
163
163
|
m.effect = null;
|
|
164
164
|
let writing = false;
|
|
165
|
+
let savingDisplay = false;
|
|
165
166
|
try {
|
|
167
|
+
let generation=e.mutationGeneration;
|
|
168
|
+
const permitted=()=>e.profiles===m && e.canMutateDraft(generation);
|
|
169
|
+
if (!['load','export'].includes(effect.kind) && !e.canMutateDraft()) { m.message=e.compositionError;return; }
|
|
166
170
|
if (effect.kind === 'load') {
|
|
167
171
|
const copy = m.action === 'save' && m.candidate !== null;
|
|
168
172
|
m.library = await backend.request('profiles_read'); m.page = 'list'; m.cursor = 0;
|
|
@@ -172,12 +176,13 @@ export async function performProfileAction(e: Editor, backend: ProfileBackend):
|
|
|
172
176
|
if (effect.kind === 'switch') {
|
|
173
177
|
if (effect.save) {
|
|
174
178
|
if (!e.acceptNumeric()) throw new BackendError('invalid_draft', text('profiles.invalid_draft'));
|
|
175
|
-
writing = true;
|
|
176
|
-
const saved = await backend.request('apply', { draft:
|
|
177
|
-
...(
|
|
178
|
-
e.committed(saved); writing = false;
|
|
179
|
+
const submitted=e.beginSave();writing = true;savingDisplay=true;
|
|
180
|
+
const saved = await backend.request('apply', { draft: submitted.draft, expected_revision: submitted.revision,
|
|
181
|
+
...(submitted.target ? { target: submitted.target } : {}) });
|
|
182
|
+
e.committed(saved); writing = false;savingDisplay=false;generation=e.mutationGeneration;
|
|
179
183
|
}
|
|
180
184
|
const current = await backend.request('read', { target: effect.next.target });
|
|
185
|
+
if(!permitted()) {m.message=e.compositionError;return;}
|
|
181
186
|
e.committed(current);
|
|
182
187
|
e.replaceDraft(current.draft);
|
|
183
188
|
if (effect.next.display) e.replaceDraft({ ...current.draft, display: JSON.parse(JSON.stringify(effect.next.display)) as DisplayDraft });
|
|
@@ -186,6 +191,7 @@ export async function performProfileAction(e: Editor, backend: ProfileBackend):
|
|
|
186
191
|
if (effect.kind === 'import' || effect.kind === 'reuse') {
|
|
187
192
|
const original = JSON.stringify(e.draft);
|
|
188
193
|
const result = await backend.request('profile_import', { path: effect.path });
|
|
194
|
+
if(!permitted()) {m.message=e.compositionError;return;}
|
|
189
195
|
if (effect.kind === 'reuse') {
|
|
190
196
|
if (JSON.stringify(e.draft) !== original || e.profiles !== m) throw new BackendError('stale_import', text('review.stale'));
|
|
191
197
|
const draft = { display: result.display, host: e.draft.host };
|
|
@@ -204,10 +210,12 @@ export async function performProfileAction(e: Editor, backend: ProfileBackend):
|
|
|
204
210
|
if (effect.payload.bind_path && typeof effect.payload.bind_path === 'string') {
|
|
205
211
|
const host = e.draft.host;
|
|
206
212
|
const current = await backend.request('read', { target: { kind: 'project', path: effect.payload.bind_path } });
|
|
213
|
+
if(!permitted()) {m.message=e.compositionError;return;}
|
|
207
214
|
e.committed(current); e.replaceDraft({ ...current.draft, host });
|
|
208
215
|
} else if (e.baseline.configuration && (e.baseline.configuration.target.kind !== 'profile' ||
|
|
209
216
|
m.library.profiles.some(p=>p.id===e.baseline.configuration!.profile_id))) {
|
|
210
217
|
const current = await backend.request('read', { target: e.baseline.configuration.target });
|
|
218
|
+
if(!permitted()) {m.message=e.compositionError;return;}
|
|
211
219
|
if (current.configuration?.profile_id === e.baseline.configuration.profile_id &&
|
|
212
220
|
JSON.stringify(current.draft) === JSON.stringify(e.baseline.draft)) e.baseline = current;
|
|
213
221
|
}
|
|
@@ -215,12 +223,13 @@ export async function performProfileAction(e: Editor, backend: ProfileBackend):
|
|
|
215
223
|
m.page = 'list'; m.cursor = 0; m.candidate = null; m.confirmation = null; m.message = text('profiles.saved');
|
|
216
224
|
} catch (error) {
|
|
217
225
|
const code = error instanceof BackendError ? error.code : '';
|
|
226
|
+
if(savingDisplay)e.saveFailed(code);
|
|
218
227
|
if (code === 'profile_duplicate' || code === 'profile_bound' || effect.kind === 'export' && code === 'io_error' && /EEXIST/u.test(String(error))) {
|
|
219
228
|
m.confirmation = effect.kind === 'mutation' ? { ...effect, payload: { ...effect.payload, overwrite: true } }
|
|
220
229
|
: effect.kind === 'export' ? { ...effect, overwrite: true } : null;
|
|
221
230
|
m.page = 'confirm'; m.cursor = 1; m.message = text('profiles.overwrite');
|
|
222
231
|
} else {
|
|
223
|
-
m.uncertain = writing && !['profile_conflict','profile_referenced','profile_invalid','profile_name','profile_path','ownership_mismatch','configuration_conflict','invalid_request','profile_size'].includes(code);
|
|
232
|
+
m.uncertain = !savingDisplay && writing && !['profile_conflict','profile_referenced','profile_invalid','profile_name','profile_path','ownership_mismatch','configuration_conflict','invalid_request','profile_size'].includes(code);
|
|
224
233
|
m.message = error instanceof BackendError && error.localization ? error.localization : text('profiles.failed', { value: error instanceof Error ? error.message : String(error) });
|
|
225
234
|
}
|
|
226
235
|
}
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/quick-setup.ts
CHANGED
|
@@ -76,6 +76,7 @@ export function quickView(quick: QuickSetup, language: Language, width: number,
|
|
|
76
76
|
export function controlQuick(editor: Editor, key: string): 'transfer' | 'save' | 'profiles' | null {
|
|
77
77
|
const quick = editor.quick;
|
|
78
78
|
if (!quick) return null;
|
|
79
|
+
if (!editor.canMutateDraft() && !['cancel','escape','tab','up','down','home','end','pageup','pagedown'].includes(key)) return null;
|
|
79
80
|
const effect = quickKey(quick,key);
|
|
80
81
|
if (effect === 'cancel') editor.quick = null;
|
|
81
82
|
if (effect === 'preset') { editor.preset=quick.preset; editor.pendingTransfer='preset'; return 'transfer'; }
|
|
@@ -10,6 +10,7 @@ export interface SourceManager {
|
|
|
10
10
|
library: SourcesResult | null;
|
|
11
11
|
context: SourceContext | null;
|
|
12
12
|
owner: string;
|
|
13
|
+
closed: boolean;
|
|
13
14
|
page: 'list' | 'actions' | 'kind' | 'form' | 'review' | 'remove' | 'bind' | 'unbind' | 'diagnose' | 'auto-review';
|
|
14
15
|
automaticInterval: number;
|
|
15
16
|
cursor: number;
|
|
@@ -36,7 +37,7 @@ export interface SourceBackend {
|
|
|
36
37
|
}
|
|
37
38
|
const external = ['external-value', 'github-pr', 'github-ci'];
|
|
38
39
|
export function openSources(editor: Editor): void {
|
|
39
|
-
editor.sources = { library: null, context: null, owner: 'editor-' + Date.now().toString(36) + '-' + Math.random().toString(36).slice(2), page: 'list', automaticInterval: 300, cursor: 0, scroll: 0, selected: null, kind: 'json', editing: false, fields: [], review: null, details: [], jobs: [], message: null, effect: 'load', target: null };
|
|
40
|
+
editor.sources = { library: null, context: null, owner: 'editor-' + Date.now().toString(36) + '-' + Math.random().toString(36).slice(2), closed: false, page: 'list', automaticInterval: 300, cursor: 0, scroll: 0, selected: null, kind: 'json', editing: false, fields: [], review: null, details: [], jobs: [], message: null, effect: 'load', target: null };
|
|
40
41
|
}
|
|
41
42
|
function source(editor: Editor): SourceDefinition | undefined { return editor.sources!.library?.sources.find(s => s.id === editor.sources!.selected); }
|
|
42
43
|
function actions(editor: Editor): Action[] { return ['edit', 'review', ...(source(editor)?.enabled ? ['disable' as const] : []), 'bind', 'refresh', 'status', 'cancel', 'diagnose', 'remove', 'unbind', ...(source(editor)?.kind === 'github' ? ['auto-review' as const, 'auto-off' as const] : [])]; }
|
|
@@ -138,6 +139,7 @@ export function sourcesKey(editor: Editor, event: TextKey): 'sources' | null {
|
|
|
138
139
|
else if (m.page === 'remove')
|
|
139
140
|
m.effect = 'remove';
|
|
140
141
|
else if (m.page === 'unbind') {
|
|
142
|
+
if (!editor.canMutateDraft()) { m.message=editor.compositionError;return null; }
|
|
141
143
|
const target = targets(editor)[m.cursor];
|
|
142
144
|
const node = target && editor.instance(target.scope, target.id);
|
|
143
145
|
if (node?.source) {
|
|
@@ -159,9 +161,10 @@ export async function closeSources(editor: Editor, backend: SourceBackend): Prom
|
|
|
159
161
|
const m = editor.sources;
|
|
160
162
|
if (!m)
|
|
161
163
|
return;
|
|
164
|
+
m.closed = true;
|
|
162
165
|
let failed: unknown;
|
|
163
|
-
for (const job of m.jobs.filter(job => job.state === 'running'
|
|
164
|
-
try { await backend.request('
|
|
166
|
+
for (const job of m.jobs.filter(job => job.state === 'running')) {
|
|
167
|
+
try { await backend.request('source_release', { id: job.id, owner:m.owner }); }
|
|
165
168
|
catch (error) { failed = error; }
|
|
166
169
|
}
|
|
167
170
|
if (failed) throw failed;
|
|
@@ -175,6 +178,8 @@ export async function performSourceAction(editor: Editor, backend: SourceBackend
|
|
|
175
178
|
m.effect = null;
|
|
176
179
|
m.message = null;
|
|
177
180
|
try {
|
|
181
|
+
const generation=editor.mutationGeneration;
|
|
182
|
+
if (effect === 'bind' && !editor.canMutateDraft()) { m.message=editor.compositionError;return; }
|
|
178
183
|
if (effect === 'close') {
|
|
179
184
|
await closeSources(editor, backend);
|
|
180
185
|
return;
|
|
@@ -207,8 +212,13 @@ export async function performSourceAction(editor: Editor, backend: SourceBackend
|
|
|
207
212
|
const selected = source(editor)!;
|
|
208
213
|
const context = await backend.request('source_context', { project: selected.scope.project ?? m.context?.project ?? null, session: selected.scope.session, agent: selected.scope.agent });
|
|
209
214
|
if (effect === 'refresh') {
|
|
215
|
+
if (m.closed || editor.sources !== m) return;
|
|
210
216
|
const job = await backend.request('source_refresh', { id: m.selected, context, owner: m.owner });
|
|
211
|
-
m.
|
|
217
|
+
if (m.closed || editor.sources !== m) {
|
|
218
|
+
await backend.request('source_release', { id: job.id, owner: m.owner });
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
m.jobs = [...m.jobs.filter(previous=>previous.id!==job.id),job];
|
|
212
222
|
m.message = text('sources.refresh_started');
|
|
213
223
|
}
|
|
214
224
|
else {
|
|
@@ -238,6 +248,7 @@ export async function performSourceAction(editor: Editor, backend: SourceBackend
|
|
|
238
248
|
const result = await backend.request('sources_apply', payload);
|
|
239
249
|
m.library = result;
|
|
240
250
|
if (effect === 'bind' && m.target && result.binding) {
|
|
251
|
+
if (!editor.canMutateDraft(generation) || editor.sources !== m) { m.message=editor.compositionError;return; }
|
|
241
252
|
const node = editor.instance(m.target.scope, m.target.id);
|
|
242
253
|
if (node)
|
|
243
254
|
node.source = result.binding;
|
|
@@ -19,7 +19,7 @@ function definition(v: unknown): boolean {
|
|
|
19
19
|
return fields(s, ['executable', 'args', 'cwd', 'input', 'output', 'timeout_ms']) && text(s.executable) && text(s.cwd) && Array.isArray(s.args) && s.args.length <= 128 && s.args.every(arg => typeof arg === 'string' && arg.length <= 8192 && !arg.includes('\0')) && object(s.input) && Object.entries(s.input).every(([key, value]) => /^[A-Za-z][A-Za-z0-9_]{0,63}$/u.test(key) && ['project', 'session', 'agent', 'branch', 'head'].includes(String(value))) && ['json', 'text'].includes(String(s.output)) && typeof s.timeout_ms === 'number' && Number.isInteger(s.timeout_ms) && s.timeout_ms >= 100 && s.timeout_ms <= 30000;
|
|
20
20
|
}
|
|
21
21
|
function job(v: unknown): boolean {
|
|
22
|
-
return fields(v, ['version', 'id', 'source_id', 'source_revision', 'owner', 'context', 'started_at', 'deadline_at', 'state', 'reason', 'trigger', 'identity']) && v.version ===
|
|
22
|
+
return fields(v, ['version', 'id', 'source_id', 'source_revision', 'owner', 'context', 'started_at', 'deadline_at', 'state', 'reason', 'trigger', 'identity', 'consumers']) && v.version === 3 && Array.isArray(v.consumers) && v.consumers.length <= 128 && new Set(v.consumers.map(c=>object(c)?c.owner:null)).size === v.consumers.length && v.consumers.every(c=>fields(c,['owner','expires_at']) && id(c.owner) && text(c.expires_at) && Number.isFinite(Date.parse(c.expires_at)) && typeof v.deadline_at==='string' && Date.parse(c.expires_at)<=Date.parse(v.deadline_at)) && ['manual', 'automatic'].includes(String(v.trigger)) && typeof v.identity === 'string' && /^[a-f0-9]{64}$/.test(v.identity) && ['id', 'source_id', 'source_revision', 'owner'].every(key => id(v[key])) && isSourceContext(v.context) && text(v.started_at) && Number.isFinite(Date.parse(v.started_at)) && text(v.deadline_at) && Number.isFinite(Date.parse(v.deadline_at)) && ['running', 'completed', 'failed', 'cancelled'].includes(String(v.state)) && text(v.reason);
|
|
23
23
|
}
|
|
24
24
|
function view(v: unknown): boolean {
|
|
25
25
|
return object(v) && nullable(v.source_id) && text(v.name) && ['valid', 'missing', 'partial', 'error', 'unsupported', 'disabled', 'unbound', 'mismatch'].includes(String(v.state)) && text(v.reason) && nullable(v.observed_at) && ['current', 'stale', 'unknown'].includes(String(v.freshness)) && scalar(v.value) && nullable(v.unit) && (v.fields === undefined || object(v.fields) && Object.values(v.fields).every(scalar));
|
|
@@ -31,7 +31,7 @@ export function isSourceResult(operation: string, value: unknown): boolean {
|
|
|
31
31
|
return isSourceContext(value);
|
|
32
32
|
if (operation === 'source_review')
|
|
33
33
|
return fields(value, ['source', 'review_revision']) && definition(value.source) && object(value.source) && value.review_revision === value.source.revision;
|
|
34
|
-
if (['source_refresh', 'source_status', 'source_cancel'].includes(operation))
|
|
34
|
+
if (['source_refresh', 'source_status', 'source_release', 'source_cancel'].includes(operation))
|
|
35
35
|
return job(value);
|
|
36
36
|
if (operation === 'source_diagnose')
|
|
37
37
|
return fields(value, ['source', 'view', 'jobs', 'automatic']) && object(value.automatic) && ['off', 'waiting', 'running', 'backoff', 'paused'].includes(String(value.automatic.state)) && text(value.automatic.reason) && ['next_at', 'last_attempt', 'last_success'].every(k => value.automatic && nullable((value.automatic as Record<string, unknown>)[k])) && typeof value.automatic.interval_seconds === 'number' && value.automatic.interval_seconds >= 60 && value.automatic.interval_seconds <= 86400 && definition(value.source) && view(value.view) && Array.isArray(value.jobs) && value.jobs.every(job);
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-contracts.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by tools/generation/resources.ts; do not edit.
|
|
2
|
-
export const PROTOCOL_VERSION =
|
|
2
|
+
export const PROTOCOL_VERSION = 25 as const;
|
|
3
3
|
export const ITEM_DEFAULTS = {"label": null, "icon": null, "priority": 50, "max_width": null, "formatting": {}, "foreground": null, "background": null, "visibility": "always", "visibility_threshold": 70};
|
|
4
4
|
export const VISIBILITY_ITEMS = {"main": {"git": "git-dirty", "git-changes": "git-dirty", "active-agents": "nonzero", "task-progress": "nonzero", "context-used": "used-at-least", "context-remaining": "used-at-least", "five-hour-limit": "used-at-least", "weekly-limit": "used-at-least", "spend-limit": "used-at-least"}, "subagent": {"context-used": "used-at-least", "context-remaining": "used-at-least"}} as const;
|
|
5
5
|
export const GUIDANCE_KEYS = {"source_kinds": ["configuration", "official_input", "local_git", "local_system", "transcript", "local_state", "lifecycle", "native_timing", "live_metrics", "telemetry"], "scopes": ["main", "main_context", "session", "all_sessions", "task", "subagent", "subagent_context", "repository", "local", "latest_request"], "requirements": ["observed_field", "subagent_rows", "agent_context", "configured_effort", "agent_effort_optional", "git_repository", "git_upstream", "git_base", "pull_request", "worktree_session", "usage_records", "task_observation", "native_timing", "complete_waits", "live_metrics", "owned_agents", "checklist_events", "tool_events", "complete_stream", "request_coverage", "existing_telemetry", "gateway", "gateway_284", "valid_window", "warm_cache", "fast_mode", "thinking", "agent_mode", "vim_mode", "context_observation", "cost_rate"]} as const;
|
|
@@ -509,7 +509,8 @@ export const SEPARATORSTYLE_VALUES = ["classic", "compact", "powerline"] as cons
|
|
|
509
509
|
export const SCOPELABELS_VALUES = ["off", "when-subagents", "always"] as const;
|
|
510
510
|
export const STATUSLINELANGUAGE_VALUES = ["en", "zh-CN", "zh-TW", "zh-HK", "ja", "ko"] as const;
|
|
511
511
|
export const UNAVAILABLEREASON_VALUES = ["not_observed", "unsupported_host", "unknown_host_version", "source_unavailable", "condition_not_met", "runtime_disabled", "native_timing_disabled", "wait_coverage_missing", "stale", "incomplete", "ambiguous_owner", "observed_only", "missing_stream", "synthetic_response", "abnormal_clock", "inconsistent_request", "request_join_unavailable"] as const;
|
|
512
|
-
export
|
|
512
|
+
export const OPERATIONS = ['sources_read', 'sources_apply', 'source_review', 'source_context', 'source_refresh', 'source_status', 'source_release', 'source_cancel', 'source_diagnose', 'describe', 'read', 'preview', 'apply', 'import', 'export', 'preset', 'read_ui_preferences', 'set_ui_language', 'review_import', 'explain', 'diagnose', 'profiles_read', 'profiles_apply', 'profile_import', 'profile_export', 'task_details'] as const;
|
|
513
|
+
export type Operation = typeof OPERATIONS[number];
|
|
513
514
|
export interface ItemGuidance {
|
|
514
515
|
source_kinds: string[];
|
|
515
516
|
measurement_scope: string;
|
|
@@ -741,7 +742,8 @@ export interface SourceView {
|
|
|
741
742
|
fields?: Record<string, string | number | boolean | null>;
|
|
742
743
|
}
|
|
743
744
|
export interface SourceJob {
|
|
744
|
-
version:
|
|
745
|
+
version: 3; id: string; source_id: string; source_revision: string; owner: string; trigger: 'manual' | 'automatic'; identity: string;
|
|
746
|
+
consumers: { owner: string; expires_at: string }[];
|
|
745
747
|
context: SourceContext; started_at: string; deadline_at: string;
|
|
746
748
|
state: 'running' | 'completed' | 'failed' | 'cancelled'; reason: string;
|
|
747
749
|
}
|
|
@@ -941,6 +943,7 @@ export interface ResultMap {
|
|
|
941
943
|
source_context: SourceContext;
|
|
942
944
|
source_refresh: SourceJob;
|
|
943
945
|
source_status: SourceJob;
|
|
946
|
+
source_release: SourceJob;
|
|
944
947
|
source_cancel: SourceJob;
|
|
945
948
|
source_diagnose: { source: SourceDefinition; view: SourceView; jobs: SourceJob[]; automatic: AutomaticStatus };
|
|
946
949
|
describe: DescribeResult;
|
|
@@ -1978,7 +1978,17 @@ export const LOCALES = {
|
|
|
1978
1978
|
"native.capacity.failed": "The editor cannot draw this view.",
|
|
1979
1979
|
"native.capacity.saved": "The last save succeeded. Retry only redraws the editor.",
|
|
1980
1980
|
"native.capacity.unknown": "Save outcome unknown. Check saved state before retrying.",
|
|
1981
|
-
"native.capacity.retained": "Received draft retained; retry does not save or discard it."
|
|
1981
|
+
"native.capacity.retained": "Received draft retained; retry does not save or discard it.",
|
|
1982
|
+
"statusline.indicator.remaining": "{percentage}% left",
|
|
1983
|
+
"statusline.indicator.used": "{percentage}% used",
|
|
1984
|
+
"editor.save_locked": "Check the pending save before changing the display draft.",
|
|
1985
|
+
"editor.save_unknown": "Save outcome unknown. Ctrl+K checks saved state without saving again.",
|
|
1986
|
+
"editor.check_saved": "Check saved state",
|
|
1987
|
+
"editor.saved": "The submitted display configuration is saved.",
|
|
1988
|
+
"editor.not_committed": "No display changes were committed. The retained draft can be edited.",
|
|
1989
|
+
"editor.conflict": "Configuration conflict. The draft is retained; cancel and reopen to load the saved configuration.",
|
|
1990
|
+
"editor.still_unknown": "Save outcome remains unknown: {detail}",
|
|
1991
|
+
"task.language_unavailable": "Interface preferences are unavailable; using English."
|
|
1982
1992
|
},
|
|
1983
1993
|
"zh-CN": {
|
|
1984
1994
|
"preferences.read_failed": "无法读取 {path} 的界面偏好,使用英文:{detail}",
|
|
@@ -3950,7 +3960,17 @@ export const LOCALES = {
|
|
|
3950
3960
|
"native.capacity.failed": "编辑器暂时无法绘制此视图。",
|
|
3951
3961
|
"native.capacity.saved": "上次保存已成功;重试只会重新绘制界面。",
|
|
3952
3962
|
"native.capacity.unknown": "保存结果未知,请先核对已保存状态。",
|
|
3953
|
-
"native.capacity.retained": "已接收的草稿仍保留;重试不会保存或丢弃草稿。"
|
|
3963
|
+
"native.capacity.retained": "已接收的草稿仍保留;重试不会保存或丢弃草稿。",
|
|
3964
|
+
"statusline.indicator.remaining": "剩余 {percentage}%",
|
|
3965
|
+
"statusline.indicator.used": "已用 {percentage}%",
|
|
3966
|
+
"editor.save_locked": "修改显示草稿前,请先核对尚未确定的保存结果。",
|
|
3967
|
+
"editor.save_unknown": "保存结果未知。Ctrl+K 只读核对已保存状态,不会再次保存。",
|
|
3968
|
+
"editor.check_saved": "核对保存状态",
|
|
3969
|
+
"editor.saved": "提交的显示配置已保存。",
|
|
3970
|
+
"editor.not_committed": "未提交显示更改,可以继续编辑保留的草稿。",
|
|
3971
|
+
"editor.conflict": "配置冲突。草稿已保留;取消并重新打开可加载已保存配置。",
|
|
3972
|
+
"editor.still_unknown": "保存结果仍未知:{detail}",
|
|
3973
|
+
"task.language_unavailable": "无法读取界面偏好,使用英语。"
|
|
3954
3974
|
},
|
|
3955
3975
|
"zh-TW": {
|
|
3956
3976
|
"preferences.read_failed": "無法讀取 {path} 的介面偏好,使用英文:{detail}",
|
|
@@ -5922,7 +5942,17 @@ export const LOCALES = {
|
|
|
5922
5942
|
"native.capacity.failed": "編輯器暫時無法繪製此檢視。",
|
|
5923
5943
|
"native.capacity.saved": "上次儲存已成功;重試只會重新繪製介面。",
|
|
5924
5944
|
"native.capacity.unknown": "儲存結果未知,請先核對已儲存狀態。",
|
|
5925
|
-
"native.capacity.retained": "已接收的草稿仍保留;重試不會儲存或捨棄草稿。"
|
|
5945
|
+
"native.capacity.retained": "已接收的草稿仍保留;重試不會儲存或捨棄草稿。",
|
|
5946
|
+
"statusline.indicator.remaining": "剩餘 {percentage}%",
|
|
5947
|
+
"statusline.indicator.used": "已用 {percentage}%",
|
|
5948
|
+
"editor.save_locked": "修改顯示草稿前,請先核對尚未確定的儲存結果。",
|
|
5949
|
+
"editor.save_unknown": "儲存結果未知。Ctrl+K 唯讀核對已儲存狀態,不會再次儲存。",
|
|
5950
|
+
"editor.check_saved": "核對儲存狀態",
|
|
5951
|
+
"editor.saved": "提交的顯示設定已儲存。",
|
|
5952
|
+
"editor.not_committed": "未提交顯示變更,可以繼續編輯保留的草稿。",
|
|
5953
|
+
"editor.conflict": "設定衝突。草稿已保留;取消並重新開啟可載入已儲存設定。",
|
|
5954
|
+
"editor.still_unknown": "儲存結果仍未知:{detail}",
|
|
5955
|
+
"task.language_unavailable": "無法讀取介面偏好,使用英語。"
|
|
5926
5956
|
},
|
|
5927
5957
|
"zh-HK": {
|
|
5928
5958
|
"preferences.read_failed": "無法讀取 {path} 的介面偏好,使用英文:{detail}",
|
|
@@ -7894,7 +7924,17 @@ export const LOCALES = {
|
|
|
7894
7924
|
"native.capacity.failed": "編輯器暫時無法繪製此畫面。",
|
|
7895
7925
|
"native.capacity.saved": "上次儲存已成功;重試只會重新繪製介面。",
|
|
7896
7926
|
"native.capacity.unknown": "儲存結果未知,請先核對已儲存狀態。",
|
|
7897
|
-
"native.capacity.retained": "已接收的草稿仍保留;重試不會儲存或捨棄草稿。"
|
|
7927
|
+
"native.capacity.retained": "已接收的草稿仍保留;重試不會儲存或捨棄草稿。",
|
|
7928
|
+
"statusline.indicator.remaining": "剩餘 {percentage}%",
|
|
7929
|
+
"statusline.indicator.used": "已用 {percentage}%",
|
|
7930
|
+
"editor.save_locked": "修改顯示草稿前,請先核對尚未確定的儲存結果。",
|
|
7931
|
+
"editor.save_unknown": "儲存結果未知。Ctrl+K 唯讀核對已儲存狀態,不會再次儲存。",
|
|
7932
|
+
"editor.check_saved": "核對儲存狀態",
|
|
7933
|
+
"editor.saved": "提交的顯示設定已儲存。",
|
|
7934
|
+
"editor.not_committed": "未提交顯示變更,可以繼續編輯保留的草稿。",
|
|
7935
|
+
"editor.conflict": "設定衝突。草稿已保留;取消並重新開啟可載入已儲存設定。",
|
|
7936
|
+
"editor.still_unknown": "儲存結果仍未知:{detail}",
|
|
7937
|
+
"task.language_unavailable": "無法讀取介面偏好,使用英語。"
|
|
7898
7938
|
},
|
|
7899
7939
|
"ja": {
|
|
7900
7940
|
"preferences.read_failed": "{path} の UI 設定を読み込めません。英語を使用します: {detail}",
|
|
@@ -9866,7 +9906,17 @@ export const LOCALES = {
|
|
|
9866
9906
|
"native.capacity.failed": "この画面を描画できません。",
|
|
9867
9907
|
"native.capacity.saved": "前回の保存は成功しました。再試行は再描画のみです。",
|
|
9868
9908
|
"native.capacity.unknown": "保存結果が不明です。再試行前に保存状態を確認してください。",
|
|
9869
|
-
"native.capacity.retained": "受信済みの下書きは保持されています。再試行では保存も破棄もしません。"
|
|
9909
|
+
"native.capacity.retained": "受信済みの下書きは保持されています。再試行では保存も破棄もしません。",
|
|
9910
|
+
"statusline.indicator.remaining": "残り {percentage}%",
|
|
9911
|
+
"statusline.indicator.used": "使用 {percentage}%",
|
|
9912
|
+
"editor.save_locked": "表示の下書きを変更する前に、未確定の保存結果を確認してください。",
|
|
9913
|
+
"editor.save_unknown": "保存結果は不明です。Ctrl+K で再保存せずに保存状態を確認します。",
|
|
9914
|
+
"editor.check_saved": "保存状態を確認",
|
|
9915
|
+
"editor.saved": "送信した表示設定は保存されています。",
|
|
9916
|
+
"editor.not_committed": "表示の変更は保存されていません。保持された下書きを編集できます。",
|
|
9917
|
+
"editor.conflict": "設定が競合しています。下書きは保持されています。キャンセルして開き直すと保存済み設定を読み込みます。",
|
|
9918
|
+
"editor.still_unknown": "保存結果はまだ不明です: {detail}",
|
|
9919
|
+
"task.language_unavailable": "インターフェース設定を読み込めないため、英語を使用します。"
|
|
9870
9920
|
},
|
|
9871
9921
|
"ko": {
|
|
9872
9922
|
"preferences.read_failed": "{path}의 UI 환경설정을 읽을 수 없어 영어를 사용합니다: {detail}",
|
|
@@ -11838,7 +11888,17 @@ export const LOCALES = {
|
|
|
11838
11888
|
"native.capacity.failed": "이 화면을 그릴 수 없습니다.",
|
|
11839
11889
|
"native.capacity.saved": "마지막 저장이 완료되었습니다. 재시도는 화면만 다시 그립니다.",
|
|
11840
11890
|
"native.capacity.unknown": "저장 결과를 알 수 없습니다. 재시도 전에 저장 상태를 확인하세요.",
|
|
11841
|
-
"native.capacity.retained": "받은 초안은 유지됩니다. 재시도는 초안을 저장하거나 버리지 않습니다."
|
|
11891
|
+
"native.capacity.retained": "받은 초안은 유지됩니다. 재시도는 초안을 저장하거나 버리지 않습니다.",
|
|
11892
|
+
"statusline.indicator.remaining": "{percentage}% 남음",
|
|
11893
|
+
"statusline.indicator.used": "{percentage}% 사용",
|
|
11894
|
+
"editor.save_locked": "표시 초안을 변경하기 전에 미확정 저장 결과를 확인하세요.",
|
|
11895
|
+
"editor.save_unknown": "저장 결과를 알 수 없습니다. Ctrl+K로 다시 저장하지 않고 저장 상태를 확인합니다.",
|
|
11896
|
+
"editor.check_saved": "저장 상태 확인",
|
|
11897
|
+
"editor.saved": "제출한 표시 설정이 저장되었습니다.",
|
|
11898
|
+
"editor.not_committed": "표시 변경 사항이 저장되지 않았습니다. 보존된 초안을 편집할 수 있습니다.",
|
|
11899
|
+
"editor.conflict": "설정 충돌입니다. 초안이 보존되었습니다. 취소하고 다시 열면 저장된 설정을 불러옵니다.",
|
|
11900
|
+
"editor.still_unknown": "저장 결과를 아직 알 수 없습니다: {detail}",
|
|
11901
|
+
"task.language_unavailable": "인터페이스 환경설정을 읽을 수 없어 영어를 사용합니다。"
|
|
11842
11902
|
}
|
|
11843
11903
|
} as const;
|
|
11844
11904
|
export type MessageKey = keyof typeof LOCALES.en;
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/resource-manifest.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"backend_version": "3.9.
|
|
4
|
-
"mod_version": "3.9.
|
|
5
|
-
"protocol_version":
|
|
3
|
+
"backend_version": "3.9.2",
|
|
4
|
+
"mod_version": "3.9.2",
|
|
5
|
+
"protocol_version": 25,
|
|
6
6
|
"files": {
|
|
7
|
-
".claude-plugin/plugin.json": "
|
|
7
|
+
".claude-plugin/plugin.json": "d4bf0cdf3045a8f5d870c54d8a6524b087ed541988386ff02d35d698b7d8e157",
|
|
8
8
|
"hooks/hooks.json": "8395d73f4e9d61a02c0976385465d87a05abb2825408f8b40ae916b144c05575",
|
|
9
|
-
"hooks/register.ts": "
|
|
10
|
-
"lib/backend.ts": "
|
|
9
|
+
"hooks/register.ts": "a903be699d112ba754603661b014e8d6ef27fa4b77c0693363e3e95e82b4aaec",
|
|
10
|
+
"lib/backend.ts": "9847bf4f48c4af3f4208cc454c58e1cce1f858733a3280c282ddfbc10e224136",
|
|
11
11
|
"lib/client/forms.ts": "0169bc1a009cdeb021ac21e7b33d332e7a3d9603c0ad9f5751b4936708396ea7",
|
|
12
|
-
"lib/client/keys.ts": "
|
|
12
|
+
"lib/client/keys.ts": "9a30f7dff03c6a11598ef8cca305abdc85854b89c0489679fd92dfba3e93d83b",
|
|
13
13
|
"lib/client/messages.ts": "2bd3f05645ef2bed015c31f48fe0773a9949f6c27e9912ece8caa5ac51db1240",
|
|
14
|
-
"lib/client/settings.ts": "
|
|
15
|
-
"lib/editor/alignment-manager.ts": "
|
|
14
|
+
"lib/client/settings.ts": "a4fbcecf3ddd6269823d234e53ef90b15f6ad0bc54c38bf12c4b854277d57f6a",
|
|
15
|
+
"lib/editor/alignment-manager.ts": "6c1d73a854c2bc1d3386a1c4549caea3c94c5db6e3afa248ed3a42433f2b3ef3",
|
|
16
16
|
"lib/editor/alignments.ts": "75d704b1a7108ac254242b493977897e076429cedd26969ef2ab82027ecfbb5a",
|
|
17
17
|
"lib/editor/appearance.ts": "797b990480c74cfd0f539214c15fcfba3cbbe8b8c3463eb3208e919a72b8fd2f",
|
|
18
18
|
"lib/editor/cost-rate.ts": "db2454d17f53b5d365c4fff83d5285d00ffd60a84ec3504ebdfe69b06bacdcf1",
|
|
19
|
-
"lib/editor/draft.ts": "
|
|
19
|
+
"lib/editor/draft.ts": "bef13dfd96aa53033ad5779beec096d45099f8cff94375369174e53077d68ad7",
|
|
20
20
|
"lib/editor/explanation.ts": "ecf3e84bfa5ffc6c9c8102cc7c82f3ab965f72a6faebe078c76b05dc91a3cc60",
|
|
21
|
-
"lib/editor/forms.ts": "
|
|
21
|
+
"lib/editor/forms.ts": "1c923bf2ea57b835b73a71e95e056843feb790bff38518032d40fd15382fe9b9",
|
|
22
22
|
"lib/editor/gradients.ts": "ba236731382c7baf21eec9667c56a805043d78a76a26d18e96cc30b80d8e10e2",
|
|
23
|
-
"lib/editor/group-manager.ts": "
|
|
23
|
+
"lib/editor/group-manager.ts": "47ae7708ee9986aeacddb22ad43b4242931296a0bd679526e70697012bc203cd",
|
|
24
24
|
"lib/editor/groups.ts": "e7f62ffef56b0df88dc3ab581ba2b6eaf8c3ab1ef5cdc31d0673219e9661569c",
|
|
25
25
|
"lib/editor/guidance.ts": "0ac8d87d7162327f76db39c02fd97fa7dd80ceffa29abd08da20d6eb8b1d7574",
|
|
26
26
|
"lib/editor/import-differences.ts": "42381bff34430071b6e3d7d5b23335411934c093bac798473561b4bcbadc6294",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"lib/editor/instances.ts": "03a64e4c015de655bab1f1fde5a33b149b0705e1b663bd6179b89756af88c676",
|
|
31
31
|
"lib/editor/navigation.ts": "f66f382918f7071f8a1373955b8818fcd010d712e6bd84fe7ce461a123f4bb41",
|
|
32
32
|
"lib/editor/numeric.ts": "65645e2d9e95223662275f499541cc67c5c3d4efa177e50a4fbe9b00b51043ea",
|
|
33
|
-
"lib/editor/profile-manager.ts": "
|
|
34
|
-
"lib/editor/quick-setup.ts": "
|
|
33
|
+
"lib/editor/profile-manager.ts": "bbc6dc0956a1171f386e2f5e333cc95742b5608f7ba70a15c201925f92ed5d1f",
|
|
34
|
+
"lib/editor/quick-setup.ts": "6bd103850aee098d48398ed096f075f368ef6f03ec877acb46227b6da24843bd",
|
|
35
35
|
"lib/editor/search.ts": "07e9ae365f89259bcd93957d39aaeb3cbfe09572a5f2a6f82eef2c2876021f21",
|
|
36
36
|
"lib/editor/setup.ts": "3a9e1e1adeca0292b486e15d87362d286334433801b55ad1cbc138e8db636a85",
|
|
37
|
-
"lib/editor/source-manager.ts": "
|
|
38
|
-
"lib/editor/source-validation.ts": "
|
|
37
|
+
"lib/editor/source-manager.ts": "a899664e5574caa95afebf8c61f7b9efdcf198cf258fd982f0da515035eb45d4",
|
|
38
|
+
"lib/editor/source-validation.ts": "3e5c96ec95426a00f939898ad93aa4d46708fec94d5191b278e83b639e784595",
|
|
39
39
|
"lib/editor/task-detail.ts": "7277f84ec6fc91c24156a010af0ed1324b4f28076150cc02e90c652a8eeed93a",
|
|
40
40
|
"lib/editor/text-input.ts": "c1968edf898e9abd96da9f5326d530c581ef320721197bfb63497825198f81f0",
|
|
41
|
-
"lib/generated-contracts.ts": "
|
|
41
|
+
"lib/generated-contracts.ts": "58de3c543c1e714b48e45e45a25014678c165b9b3b8fb11b647f6b30dd8f68dd",
|
|
42
42
|
"lib/generated-unicode.ts": "781c7db664dc6166bc2fcf878565937cd8b25b57d192ae420b3016e1ce510907",
|
|
43
|
-
"lib/i18n/generated-locales.ts": "
|
|
43
|
+
"lib/i18n/generated-locales.ts": "20d7ab15c6b94df1e697efeb1254b6c64d8b489c8ec063366557895d37603943",
|
|
44
44
|
"lib/i18n/index.ts": "e5e62b59bdd1c984c182cbf706e5d98b398b4d5e9efb233803eacde38f7e5a9a",
|
|
45
45
|
"lib/i18n/messages.ts": "31775673f7b18efec0f131012e220c523625c77e1e34fc09ecc7732070ede5d1",
|
|
46
46
|
"lib/i18n/presentation.ts": "50f663ecfc272883bffc3c882db4a3bc0be54f9b2acbb0d0ea81bb142f347cab",
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/resource-manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"backend_version": "3.9.
|
|
4
|
-
"mod_version": "3.9.
|
|
3
|
+
"backend_version": "3.9.2",
|
|
4
|
+
"mod_version": "3.9.2",
|
|
5
5
|
"protocol_version": 3,
|
|
6
6
|
"files": {
|
|
7
|
-
".claude-plugin/plugin.json": "
|
|
7
|
+
".claude-plugin/plugin.json": "42bf8a5d2e847e529e44b0738e96f51713cb81b640761ed1b3351b5f35554024",
|
|
8
8
|
"hooks/hooks.json": "b57d3d1b4b71a64712aab61b6c53be6b74ab56c8c2b38deec60e343cf055955d",
|
|
9
9
|
"hooks/observe.ts": "c7266cb79bee870e167172af573b06963f520a59bef56cb926c6bfb70070b0ba",
|
|
10
10
|
"lib/checklists.ts": "88dc407841f917527e70ed5f03c55cdabb9224b077e4765da92f2f5d9654a904",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Language } from "../i18n/registry.js";
|
|
2
|
-
export declare const PROTOCOL_VERSION:
|
|
2
|
+
export declare const PROTOCOL_VERSION: 25;
|
|
3
3
|
export declare const ITEM_DEFAULTS: {
|
|
4
4
|
label: null;
|
|
5
5
|
icon: null;
|
|
@@ -544,7 +544,8 @@ export declare const SEPARATORSTYLE_VALUES: readonly ["classic", "compact", "pow
|
|
|
544
544
|
export declare const SCOPELABELS_VALUES: readonly ["off", "when-subagents", "always"];
|
|
545
545
|
export declare const STATUSLINELANGUAGE_VALUES: readonly ["en", "zh-CN", "zh-TW", "zh-HK", "ja", "ko"];
|
|
546
546
|
export declare const UNAVAILABLEREASON_VALUES: readonly ["not_observed", "unsupported_host", "unknown_host_version", "source_unavailable", "condition_not_met", "runtime_disabled", "native_timing_disabled", "wait_coverage_missing", "stale", "incomplete", "ambiguous_owner", "observed_only", "missing_stream", "synthetic_response", "abnormal_clock", "inconsistent_request", "request_join_unavailable"];
|
|
547
|
-
export
|
|
547
|
+
export declare const OPERATIONS: readonly ["sources_read", "sources_apply", "source_review", "source_context", "source_refresh", "source_status", "source_release", "source_cancel", "source_diagnose", "describe", "read", "preview", "apply", "import", "export", "preset", "read_ui_preferences", "set_ui_language", "review_import", "explain", "diagnose", "profiles_read", "profiles_apply", "profile_import", "profile_export", "task_details"];
|
|
548
|
+
export type Operation = typeof OPERATIONS[number];
|
|
548
549
|
export interface ItemGuidance {
|
|
549
550
|
source_kinds: string[];
|
|
550
551
|
measurement_scope: string;
|
|
@@ -837,13 +838,17 @@ export interface SourceView {
|
|
|
837
838
|
fields?: Record<string, string | number | boolean | null>;
|
|
838
839
|
}
|
|
839
840
|
export interface SourceJob {
|
|
840
|
-
version:
|
|
841
|
+
version: 3;
|
|
841
842
|
id: string;
|
|
842
843
|
source_id: string;
|
|
843
844
|
source_revision: string;
|
|
844
845
|
owner: string;
|
|
845
846
|
trigger: 'manual' | 'automatic';
|
|
846
847
|
identity: string;
|
|
848
|
+
consumers: {
|
|
849
|
+
owner: string;
|
|
850
|
+
expires_at: string;
|
|
851
|
+
}[];
|
|
847
852
|
context: SourceContext;
|
|
848
853
|
started_at: string;
|
|
849
854
|
deadline_at: string;
|
|
@@ -1113,6 +1118,7 @@ export interface ResultMap {
|
|
|
1113
1118
|
source_context: SourceContext;
|
|
1114
1119
|
source_refresh: SourceJob;
|
|
1115
1120
|
source_status: SourceJob;
|
|
1121
|
+
source_release: SourceJob;
|
|
1116
1122
|
source_cancel: SourceJob;
|
|
1117
1123
|
source_diagnose: {
|
|
1118
1124
|
source: SourceDefinition;
|