dsh-charter 0.2.2 → 0.3.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/CHANGELOG.md +59 -1
- package/CHANGELOG.zh.md +54 -1
- package/README.md +75 -51
- package/README.zh.md +68 -45
- package/docs/README.md +5 -4
- package/docs/README.zh.md +6 -3
- package/docs/assets/charter-graph-0.3.0.zh.png +0 -0
- package/docs/assets/charter-graph-0.3.1.png +0 -0
- package/docs/assets/charter-graph-0.3.1.zh.png +0 -0
- package/docs/assets/charter-pane-0.3.0.png +0 -0
- package/docs/assets/charter-pane-0.3.0.zh.png +0 -0
- package/docs/assets/charter-pane-0.3.1.png +0 -0
- package/docs/assets/charter-pane-0.3.1.zh.png +0 -0
- package/docs/assets/dependency-example.svg +90 -0
- package/docs/assets/dependency-example.zh.svg +90 -0
- package/docs/design/charter-dependency-graph-v1.zh.md +26 -21
- package/docs/design/charter-design-v1.md +2 -2
- package/docs/design/charter-design-v1.zh.md +2 -2
- package/docs/design/charter-gui-v1.zh.md +873 -0
- package/docs/design/charter-workspace-v2.zh.md +13 -1
- package/docs/design/compatibility.md +23 -6
- package/docs/design/compatibility.zh.md +22 -6
- package/docs/design/mockups/README.md +29 -0
- package/docs/design/mockups/mockup-graph.html +154 -0
- package/docs/design/mockups/mockup-home-clean.html +146 -0
- package/docs/design/mockups/mockup-home-dirty.html +191 -0
- package/docs/design/mockups/mockup.css +429 -0
- package/docs/design/mockups/style-tile.html +146 -0
- package/docs/design/mockups/tokens.css +670 -0
- package/docs/design/version-roadmap.md +30 -10
- package/docs/design/version-roadmap.zh.md +43 -8
- package/docs/release-notes/0.2.2.md +5 -5
- package/docs/release-notes/0.3.0.md +70 -0
- package/docs/release-notes/0.3.1.md +38 -0
- package/docs/release-notes/README.md +1 -1
- package/docs/releasing.md +5 -4
- package/docs/releasing.zh.md +5 -4
- package/docs/user-guide.md +9 -10
- package/docs/user-guide.zh.md +8 -10
- package/docs/verification.md +114 -10
- package/docs/verification.zh.md +98 -9
- package/lib/client/ChangeSetPanel.d.ts +24 -0
- package/lib/client/DependencyGraph.d.ts +1 -1
- package/lib/client/DiagnosticsPage.d.ts +5 -0
- package/lib/client/ReviewCenterPage.d.ts +5 -0
- package/lib/client/SectionNav.d.ts +14 -0
- package/lib/client/WorkspacePage.d.ts +5 -0
- package/lib/client/change-set-model.d.ts +55 -0
- package/lib/client/draft-store.d.ts +1 -1
- package/lib/client/locales.d.ts +49 -1
- package/lib/client/page-order.d.ts +26 -0
- package/lib/client/pane-format.d.ts +48 -0
- package/lib/client/pane-scope.d.ts +382 -0
- package/lib/client/pane-ui.d.ts +39 -0
- package/lib/client/relation-graph.d.ts +0 -1
- package/lib/client/section-routing.d.ts +12 -0
- package/lib/client/use-change-set-sheet.d.ts +13 -0
- package/lib/client.js +3931 -3118
- package/lib/core/standing-envelope.d.ts +31 -0
- package/lib/host/types.d.ts +6 -1
- package/lib/index.js +1 -1
- package/lib/remote.js +1 -1
- package/lib/{service-MsIACddZ.js → service-BSrE7Kbu.js} +42 -24
- package/lib/version.d.ts +1 -1
- package/package.json +24 -18
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { CharterErrorCode } from '../core/errors.js';
|
|
3
|
+
import type { CharterRecordArchive, DeliverableProgress } from '../core/schemas.js';
|
|
4
|
+
import type { CharterView } from '../host/types.js';
|
|
5
|
+
import type { BootstrapProblem, DraftFeedback } from './draft-store.js';
|
|
6
|
+
import type { DependencyConflictDiff } from '../core/dependencies.js';
|
|
7
|
+
import type { ProjectedItem } from './preview.js';
|
|
8
|
+
import { CHARTER_LOCALE_NS, type CharterLocaleKey } from './locales.js';
|
|
9
|
+
export type CharterText = TranslateNS<typeof CHARTER_LOCALE_NS>;
|
|
10
|
+
export interface ArchivePreview {
|
|
11
|
+
readonly fileName: string;
|
|
12
|
+
readonly archive?: CharterRecordArchive;
|
|
13
|
+
readonly errorKey?: string;
|
|
14
|
+
readonly errorParams?: Readonly<Record<string, string>>;
|
|
15
|
+
readonly health?: 'healthy' | 'schema-invalid' | 'consistency-invalid' | 'lifecycle-mismatch';
|
|
16
|
+
readonly revision?: number | null;
|
|
17
|
+
readonly lifecycle?: string | null;
|
|
18
|
+
readonly digest?: string;
|
|
19
|
+
readonly exportedAt?: number;
|
|
20
|
+
readonly sourceSession?: string;
|
|
21
|
+
readonly payloadDigestOk?: boolean;
|
|
22
|
+
readonly recordDigestOk?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function formatBytes(t: CharterText, bytes: number): string;
|
|
25
|
+
/** Pretty-print the JSON body of the rendered prompt for reading; exact bytes remain available. */
|
|
26
|
+
export declare function formatCharterPreview(preview: string): string | null;
|
|
27
|
+
export declare function progressLabel(progress: DeliverableProgress | undefined, t: CharterText): string;
|
|
28
|
+
export declare function errorLabel(code: CharterErrorCode | string, t: CharterText): string;
|
|
29
|
+
export declare function textIssueMessage(issue: 'empty' | 'control' | 'surrogate', t: CharterText): string;
|
|
30
|
+
export declare function countLabel(t: CharterText, count: number, one: CharterLocaleKey, other: CharterLocaleKey): string;
|
|
31
|
+
/** Resolve a stable feedback descriptor against the current locale. */
|
|
32
|
+
export declare function feedbackText(feedback: DraftFeedback | null, t: CharterText): string | null;
|
|
33
|
+
export declare function feedbackDetail(feedback: DraftFeedback | null): string | undefined;
|
|
34
|
+
export declare function bootstrapProblemText(problem: BootstrapProblem | null, t: CharterText): string | null;
|
|
35
|
+
/** One exhaustive switch over the Host-derived record state. */
|
|
36
|
+
export declare function statusMessage(view: CharterView, t: CharterText): string | null;
|
|
37
|
+
export declare function itemState(item: ProjectedItem): 'done' | 'warning' | 'ongoing' | 'idle';
|
|
38
|
+
export declare const EMPTY_CONFLICT_DIFF: DependencyConflictDiff;
|
|
39
|
+
export declare function shortText(text: string, length?: number): string;
|
|
40
|
+
/** Render the lifecycle fingerprint as a compact, stable date label for the UI. */
|
|
41
|
+
export declare function lifecycleLabel(value: string | null | undefined): string;
|
|
42
|
+
/** Render an archive timestamp without ever throwing on hostile values. */
|
|
43
|
+
export declare function formatTimestamp(value: number | undefined): string;
|
|
44
|
+
/** Localized health label for an archive preview. */
|
|
45
|
+
export declare function archiveHealthLabel(health: 'healthy' | 'schema-invalid' | 'consistency-invalid' | 'lifecycle-mismatch', t: CharterText): string;
|
|
46
|
+
/** Byte budget of the value the Host will store (normalized, not raw input). */
|
|
47
|
+
export declare function normalizedBytes(value: string): number;
|
|
48
|
+
export declare function normalizedNonEmpty(value: string): boolean;
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
export interface PaneScope {
|
|
2
|
+
readonly activeDeliverables: import("./preview.js").ProjectedItem[];
|
|
3
|
+
readonly activeInvariants: import("./preview.js").ProjectedItem[];
|
|
4
|
+
readonly area: "review" | "diagnostics" | "workspace";
|
|
5
|
+
readonly bootstrapPhase: import("./draft-store.js").BootstrapPhase;
|
|
6
|
+
readonly bootstrapProblem: import("./draft-store.js").BootstrapProblem | null;
|
|
7
|
+
readonly counts: {
|
|
8
|
+
readonly active: number;
|
|
9
|
+
readonly pending: number;
|
|
10
|
+
readonly history: number;
|
|
11
|
+
};
|
|
12
|
+
readonly currentDeliverables: import("./preview.js").ProjectedItem[];
|
|
13
|
+
readonly currentInvariants: import("./preview.js").ProjectedItem[];
|
|
14
|
+
readonly deliverables: (import("./preview.js").ProjectedItem & {
|
|
15
|
+
kind: "deliverable";
|
|
16
|
+
})[];
|
|
17
|
+
readonly dependencyByItemId: Map<string, import("../core/dependencies.js").DependencyProjection>;
|
|
18
|
+
readonly dependencyEditorId: string | null;
|
|
19
|
+
readonly dependencyGraphActiveKey: string | undefined;
|
|
20
|
+
readonly dependencyGraphDepth: 1 | 2;
|
|
21
|
+
readonly dependencyGraphHidden: boolean;
|
|
22
|
+
readonly dependencyGraphProblem: string | null;
|
|
23
|
+
readonly dependencyGraphSupersedes: boolean;
|
|
24
|
+
readonly dependencyPlan: never[] | readonly import("../core/dependencies.js").DependencyProjection[];
|
|
25
|
+
readonly dependencyVisibleCount: number;
|
|
26
|
+
readonly draft: import("./draft-store.js").CharterDraft;
|
|
27
|
+
readonly editable: boolean;
|
|
28
|
+
readonly editor: import("./draft-store.js").DraftEditor | null;
|
|
29
|
+
readonly editorNeedsReason: boolean;
|
|
30
|
+
readonly editorReason: string;
|
|
31
|
+
readonly editorText: string;
|
|
32
|
+
readonly focusStatus: () => void;
|
|
33
|
+
readonly goSection: (next: import("./draft-store.js").CharterSection) => void;
|
|
34
|
+
readonly historyDeliverables: (import("./preview.js").ProjectedItem & {
|
|
35
|
+
kind: "deliverable";
|
|
36
|
+
})[];
|
|
37
|
+
readonly historyInvariants: import("./preview.js").ProjectedItem[];
|
|
38
|
+
readonly invariants: import("./preview.js").ProjectedItem[];
|
|
39
|
+
readonly locateGraphNodeInList: (id: string) => void;
|
|
40
|
+
readonly newDeliverable: string;
|
|
41
|
+
readonly newInvariant: string;
|
|
42
|
+
readonly objectiveStaged: boolean;
|
|
43
|
+
readonly openEditor: (target: import("./draft-store.js").DraftEditor) => void;
|
|
44
|
+
readonly openHistory: () => void;
|
|
45
|
+
readonly pendingDeliverables: import("./preview.js").ProjectedItem[];
|
|
46
|
+
readonly pendingInvariants: import("./preview.js").ProjectedItem[];
|
|
47
|
+
readonly planInvalid: boolean;
|
|
48
|
+
readonly projectedItems: readonly import("./preview.js").ProjectedItem[];
|
|
49
|
+
readonly projectedObjective: {
|
|
50
|
+
original: {
|
|
51
|
+
text: string;
|
|
52
|
+
setAtRevision: number;
|
|
53
|
+
};
|
|
54
|
+
current: {
|
|
55
|
+
text: string;
|
|
56
|
+
setAtRevision: number;
|
|
57
|
+
reason?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
} | null;
|
|
60
|
+
readonly relationFocusId: string | undefined;
|
|
61
|
+
readonly relationGraph: import("./relation-graph.js").RelationGraphModel | null;
|
|
62
|
+
readonly relationGraphAvailable: boolean;
|
|
63
|
+
readonly relationLayout: import("./relation-graph.js").GraphLayout | null;
|
|
64
|
+
readonly release: () => void;
|
|
65
|
+
readonly renderItems: (items: readonly import("./preview.js").ProjectedItem[], history: readonly import("./preview.js").ProjectedItem[], emptyKey: "invariants.empty" | "deliverables.empty", windowKey: "invariants" | "deliverables") => import("react").ReactNode;
|
|
66
|
+
readonly saving: boolean;
|
|
67
|
+
readonly section: import("./draft-store.js").CharterSection;
|
|
68
|
+
readonly setDependencyEditorId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
69
|
+
readonly setDependencyGraphActiveKey: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
70
|
+
readonly setDependencyGraphDepth: import("react").Dispatch<import("react").SetStateAction<1 | 2>>;
|
|
71
|
+
readonly setDependencyGraphFocusId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
72
|
+
readonly setDependencyGraphHidden: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
73
|
+
readonly setDependencyGraphSupersedes: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
74
|
+
readonly setDependencyVisibleCount: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
75
|
+
readonly setPendingProposalFocusId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
76
|
+
readonly showEmpty: boolean;
|
|
77
|
+
readonly source: import("./store.js").CharterSource;
|
|
78
|
+
readonly stageGraphRequires: (targetId: string, nextRequires: readonly string[]) => void;
|
|
79
|
+
readonly t: import("@deepseek-ai/dsh-client-ui-slots").TranslateNS<"dsh-charter">;
|
|
80
|
+
readonly unknownBlocked: boolean;
|
|
81
|
+
readonly view: import("../host/types.js").CharterView;
|
|
82
|
+
readonly abandonUnknown: () => void;
|
|
83
|
+
readonly applyBootstrapDraft: () => void;
|
|
84
|
+
readonly applyHintId: string;
|
|
85
|
+
readonly batchByItem: Map<string, {
|
|
86
|
+
readonly batchId: string;
|
|
87
|
+
readonly sourceKind: string;
|
|
88
|
+
}>;
|
|
89
|
+
readonly bootstrap: import("../host/types.js").CharterBootstrapProposal | null;
|
|
90
|
+
readonly bootstrapBudgetOver: boolean;
|
|
91
|
+
readonly bootstrapId: string;
|
|
92
|
+
readonly bootstrapItems: readonly import("./bootstrap-plan.js").BootstrapDraftItem[];
|
|
93
|
+
readonly bootstrapObjective: string;
|
|
94
|
+
readonly bootstrapObjectiveOver: boolean;
|
|
95
|
+
readonly bootstrapPlan: import("./bootstrap-plan.js").BootstrapPlan;
|
|
96
|
+
readonly bootstrapPromptBytes: number;
|
|
97
|
+
readonly bootstrapReplay: boolean;
|
|
98
|
+
readonly bootstrapSaving: boolean;
|
|
99
|
+
readonly bootstrapStorageOver: boolean;
|
|
100
|
+
readonly bootstrapTextIssue: import("./bootstrap-plan.js").DraftTextIssue | undefined;
|
|
101
|
+
readonly bootstrapVisibleCount: number;
|
|
102
|
+
readonly canApplyBootstrap: boolean;
|
|
103
|
+
readonly closedObjectiveProposals: {
|
|
104
|
+
id: string;
|
|
105
|
+
text: string;
|
|
106
|
+
origin: "user" | "agent" | "fork";
|
|
107
|
+
review: "pending" | "accepted" | "rejected" | "purged";
|
|
108
|
+
createdRevision: number;
|
|
109
|
+
reviewedAtRevision?: number | undefined;
|
|
110
|
+
appliedRevision?: number | undefined;
|
|
111
|
+
textDigest?: string | undefined;
|
|
112
|
+
}[];
|
|
113
|
+
readonly confirmAbandon: boolean;
|
|
114
|
+
readonly inactiveItems: import("./preview.js").ProjectedItem[];
|
|
115
|
+
readonly messageBytes: number;
|
|
116
|
+
readonly messageCanSave: boolean;
|
|
117
|
+
readonly messageCandidates: readonly import("../host/types.js").CharterMessageCandidate[];
|
|
118
|
+
readonly messageDraft: string;
|
|
119
|
+
readonly messageKind: "invariant" | "deliverable";
|
|
120
|
+
readonly messageMenuOpen: boolean;
|
|
121
|
+
readonly messageMenuRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
122
|
+
readonly messageOverBudget: boolean;
|
|
123
|
+
readonly messageSeq: number | undefined;
|
|
124
|
+
readonly messageTextAvailable: boolean;
|
|
125
|
+
readonly ops: readonly ({
|
|
126
|
+
type: "objective.initialize";
|
|
127
|
+
text: string;
|
|
128
|
+
} | {
|
|
129
|
+
type: "objective.redirect";
|
|
130
|
+
text: string;
|
|
131
|
+
reason?: string | undefined;
|
|
132
|
+
} | {
|
|
133
|
+
type: "objective.propose";
|
|
134
|
+
clientRef: string;
|
|
135
|
+
text: string;
|
|
136
|
+
} | {
|
|
137
|
+
type: "objective.accept";
|
|
138
|
+
proposalId: string;
|
|
139
|
+
reason?: string | undefined;
|
|
140
|
+
} | {
|
|
141
|
+
type: "objective.reject";
|
|
142
|
+
proposalId: string;
|
|
143
|
+
} | {
|
|
144
|
+
type: "objective.purge";
|
|
145
|
+
proposalId: string;
|
|
146
|
+
} | {
|
|
147
|
+
type: "item.add";
|
|
148
|
+
item: {
|
|
149
|
+
clientRef: string;
|
|
150
|
+
kind: "invariant";
|
|
151
|
+
text: string;
|
|
152
|
+
order: number;
|
|
153
|
+
origin?: "user" | "agent" | "fork" | undefined;
|
|
154
|
+
contentModified?: boolean | undefined;
|
|
155
|
+
} | {
|
|
156
|
+
clientRef: string;
|
|
157
|
+
kind: "deliverable";
|
|
158
|
+
text: string;
|
|
159
|
+
order: number;
|
|
160
|
+
progress: "not-started" | "in-progress" | "blocked" | "done" | "cancelled";
|
|
161
|
+
requires?: string[] | undefined;
|
|
162
|
+
proposedRequires?: string[] | undefined;
|
|
163
|
+
origin?: "user" | "agent" | "fork" | undefined;
|
|
164
|
+
contentModified?: boolean | undefined;
|
|
165
|
+
};
|
|
166
|
+
} | {
|
|
167
|
+
type: "item.propose";
|
|
168
|
+
item: {
|
|
169
|
+
clientRef: string;
|
|
170
|
+
kind: "invariant";
|
|
171
|
+
text: string;
|
|
172
|
+
order: number;
|
|
173
|
+
origin?: "user" | "agent" | "fork" | undefined;
|
|
174
|
+
contentModified?: boolean | undefined;
|
|
175
|
+
} | {
|
|
176
|
+
clientRef: string;
|
|
177
|
+
kind: "deliverable";
|
|
178
|
+
text: string;
|
|
179
|
+
order: number;
|
|
180
|
+
progress: "not-started" | "in-progress" | "blocked" | "done" | "cancelled";
|
|
181
|
+
requires?: string[] | undefined;
|
|
182
|
+
proposedRequires?: string[] | undefined;
|
|
183
|
+
origin?: "user" | "agent" | "fork" | undefined;
|
|
184
|
+
contentModified?: boolean | undefined;
|
|
185
|
+
};
|
|
186
|
+
} | {
|
|
187
|
+
type: "item.edit";
|
|
188
|
+
itemId: string;
|
|
189
|
+
text?: string | undefined;
|
|
190
|
+
order?: number | undefined;
|
|
191
|
+
} | {
|
|
192
|
+
type: "item.accept";
|
|
193
|
+
itemId: string;
|
|
194
|
+
} | {
|
|
195
|
+
type: "item.reject";
|
|
196
|
+
itemId: string;
|
|
197
|
+
} | {
|
|
198
|
+
type: "item.archive";
|
|
199
|
+
itemId: string;
|
|
200
|
+
} | {
|
|
201
|
+
type: "item.restore";
|
|
202
|
+
itemId: string;
|
|
203
|
+
} | {
|
|
204
|
+
type: "item.supersede";
|
|
205
|
+
itemId: string;
|
|
206
|
+
replacement: {
|
|
207
|
+
clientRef: string;
|
|
208
|
+
kind: "invariant";
|
|
209
|
+
text: string;
|
|
210
|
+
order: number;
|
|
211
|
+
origin?: "user" | "agent" | "fork" | undefined;
|
|
212
|
+
contentModified?: boolean | undefined;
|
|
213
|
+
} | {
|
|
214
|
+
clientRef: string;
|
|
215
|
+
kind: "deliverable";
|
|
216
|
+
text: string;
|
|
217
|
+
order: number;
|
|
218
|
+
progress: "not-started" | "in-progress" | "blocked" | "done" | "cancelled";
|
|
219
|
+
requires?: string[] | undefined;
|
|
220
|
+
proposedRequires?: string[] | undefined;
|
|
221
|
+
origin?: "user" | "agent" | "fork" | undefined;
|
|
222
|
+
contentModified?: boolean | undefined;
|
|
223
|
+
};
|
|
224
|
+
} | {
|
|
225
|
+
type: "item.purge";
|
|
226
|
+
itemId: string;
|
|
227
|
+
confirmed: true;
|
|
228
|
+
} | {
|
|
229
|
+
type: "deliverable.progress";
|
|
230
|
+
itemId: string;
|
|
231
|
+
progress: "not-started" | "in-progress" | "blocked" | "done" | "cancelled";
|
|
232
|
+
} | {
|
|
233
|
+
type: "deliverable.requires";
|
|
234
|
+
itemId: string;
|
|
235
|
+
requires: string[];
|
|
236
|
+
} | {
|
|
237
|
+
type: "item.verification.set";
|
|
238
|
+
itemId: string;
|
|
239
|
+
verification: "unchecked" | "verified";
|
|
240
|
+
} | {
|
|
241
|
+
type: "item.validity.set";
|
|
242
|
+
itemId: string;
|
|
243
|
+
validity: {
|
|
244
|
+
state: "unassessed";
|
|
245
|
+
} | {
|
|
246
|
+
state: "attested";
|
|
247
|
+
atRevision: number;
|
|
248
|
+
} | {
|
|
249
|
+
state: "valid";
|
|
250
|
+
validator: string;
|
|
251
|
+
inputDigest: string;
|
|
252
|
+
checkedAtRevision: number;
|
|
253
|
+
resultDigest?: string | undefined;
|
|
254
|
+
} | {
|
|
255
|
+
state: "invalid";
|
|
256
|
+
validator: string;
|
|
257
|
+
inputDigest: string;
|
|
258
|
+
checkedAtRevision: number;
|
|
259
|
+
reason?: string | undefined;
|
|
260
|
+
} | {
|
|
261
|
+
state: "unknown";
|
|
262
|
+
validator: string;
|
|
263
|
+
inputDigest: string;
|
|
264
|
+
checkedAtRevision: number;
|
|
265
|
+
reason?: string | undefined;
|
|
266
|
+
} | {
|
|
267
|
+
state: "stale";
|
|
268
|
+
previous: "unknown" | "attested" | "valid" | "invalid";
|
|
269
|
+
atRevision: number;
|
|
270
|
+
};
|
|
271
|
+
evidence?: {
|
|
272
|
+
kind: "message" | "compaction-summary" | "workspace-file";
|
|
273
|
+
projectionVersion: number;
|
|
274
|
+
digest: string;
|
|
275
|
+
sessionId?: string | undefined;
|
|
276
|
+
seq?: number | undefined;
|
|
277
|
+
path?: string | undefined;
|
|
278
|
+
excerpt?: string | undefined;
|
|
279
|
+
}[] | undefined;
|
|
280
|
+
} | {
|
|
281
|
+
type: "item.attest";
|
|
282
|
+
itemId: string;
|
|
283
|
+
})[];
|
|
284
|
+
readonly pendingItemProposals: import("./preview.js").ProjectedItem[];
|
|
285
|
+
readonly pendingObjectiveProposals: {
|
|
286
|
+
id: string;
|
|
287
|
+
text: string;
|
|
288
|
+
origin: "user" | "agent" | "fork";
|
|
289
|
+
review: "pending" | "accepted" | "rejected" | "purged";
|
|
290
|
+
createdRevision: number;
|
|
291
|
+
reviewedAtRevision?: number | undefined;
|
|
292
|
+
appliedRevision?: number | undefined;
|
|
293
|
+
textDigest?: string | undefined;
|
|
294
|
+
}[];
|
|
295
|
+
readonly proposalReasons: Record<string, string>;
|
|
296
|
+
readonly reviewLimit: number;
|
|
297
|
+
readonly selectedMessage: import("../host/types.js").CharterMessageCandidate | undefined;
|
|
298
|
+
readonly setMessageDraft: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
299
|
+
readonly setMessageKind: import("react").Dispatch<import("react").SetStateAction<"invariant" | "deliverable">>;
|
|
300
|
+
readonly setMessageMenuOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
301
|
+
readonly setMessageSeq: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
302
|
+
readonly setProposalReasons: import("react").Dispatch<import("react").SetStateAction<Record<string, string>>>;
|
|
303
|
+
readonly setReviewLimit: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
304
|
+
readonly unknownReplay: boolean;
|
|
305
|
+
readonly activeArchiveKey: string | null;
|
|
306
|
+
readonly archiveCacheProblem: string | null;
|
|
307
|
+
readonly archiveEntries: readonly import("../host/types.js").CharterArchiveEntry[];
|
|
308
|
+
readonly archiveInputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
309
|
+
readonly archivePreview: import("./pane-format.js").ArchivePreview | null;
|
|
310
|
+
readonly archiveSource: "file" | "cache" | null;
|
|
311
|
+
readonly canExport: boolean;
|
|
312
|
+
readonly capabilities: import("../host/types.js").CharterViewCapabilities | undefined;
|
|
313
|
+
readonly chooseArchive: (file: File) => void;
|
|
314
|
+
readonly chooseCachedArchive: (entry: import("../host/types.js").CharterArchiveEntry) => void;
|
|
315
|
+
readonly confirmRecovery: "initialize" | "restore" | null;
|
|
316
|
+
readonly draftOpen: boolean;
|
|
317
|
+
readonly draftState: import("./draft-store.js").CharterDraftState;
|
|
318
|
+
readonly errorText: (code: string | undefined) => string;
|
|
319
|
+
readonly exportArchive: () => void;
|
|
320
|
+
readonly exportProblem: string | null;
|
|
321
|
+
readonly exportableState: boolean;
|
|
322
|
+
readonly exporting: boolean;
|
|
323
|
+
readonly formattedPreview: string | null;
|
|
324
|
+
readonly initAdmission: {
|
|
325
|
+
readonly ok: true;
|
|
326
|
+
} | {
|
|
327
|
+
readonly ok: false;
|
|
328
|
+
readonly reason: string;
|
|
329
|
+
};
|
|
330
|
+
readonly initializeEmpty: () => void;
|
|
331
|
+
readonly integrityFeedback: string | null;
|
|
332
|
+
readonly maintenanceEnabled: boolean;
|
|
333
|
+
readonly maintenanceProblem: import("./draft-store.js").MaintenanceProblem | null;
|
|
334
|
+
readonly maintenanceReplay: boolean;
|
|
335
|
+
readonly overBudget: boolean;
|
|
336
|
+
readonly preview: string;
|
|
337
|
+
readonly previewBytes: number;
|
|
338
|
+
readonly previewMode: "formatted" | "exact";
|
|
339
|
+
readonly recordDigest: `sha256:${string}` | undefined;
|
|
340
|
+
readonly recordState: import("../host/types.js").CharterRecordState | undefined;
|
|
341
|
+
readonly recoveryBusy: boolean;
|
|
342
|
+
readonly restoreAdmission: {
|
|
343
|
+
readonly ok: true;
|
|
344
|
+
} | {
|
|
345
|
+
readonly ok: false;
|
|
346
|
+
readonly reason: string;
|
|
347
|
+
};
|
|
348
|
+
readonly restoreArchive: () => void;
|
|
349
|
+
readonly restoreArchiveReady: boolean;
|
|
350
|
+
readonly restoreTarget: boolean;
|
|
351
|
+
readonly retainedArchive: {
|
|
352
|
+
format: "dsh-charter-record";
|
|
353
|
+
formatVersion: 1;
|
|
354
|
+
exportedAt: number;
|
|
355
|
+
source: {
|
|
356
|
+
domain: "dsh_charter_v1";
|
|
357
|
+
domainVersion: 1;
|
|
358
|
+
sessionId: string;
|
|
359
|
+
lifecycle: string | null;
|
|
360
|
+
health: "healthy" | "lifecycle-mismatch" | "schema-invalid" | "consistency-invalid";
|
|
361
|
+
revision: number | null;
|
|
362
|
+
recordDigest: string;
|
|
363
|
+
};
|
|
364
|
+
record: unknown;
|
|
365
|
+
payloadDigest: string;
|
|
366
|
+
} | null | undefined;
|
|
367
|
+
readonly setConfirmRecovery: import("react").Dispatch<import("react").SetStateAction<"initialize" | "restore" | null>>;
|
|
368
|
+
readonly setIntegrityFeedback: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
369
|
+
readonly setPreviewMode: import("react").Dispatch<import("react").SetStateAction<"formatted" | "exact">>;
|
|
370
|
+
readonly setValidatorExpectation: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
371
|
+
readonly setValidatorFeedback: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
372
|
+
readonly setValidatorItemId: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
373
|
+
readonly setValidatorKind: import("react").Dispatch<import("react").SetStateAction<"workspace.path-exists" | "workspace.file-digest" | "workspace.file-contains">>;
|
|
374
|
+
readonly setValidatorPath: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
375
|
+
readonly setValidatorRunning: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
376
|
+
readonly validatorExpectation: string;
|
|
377
|
+
readonly validatorFeedback: string | null;
|
|
378
|
+
readonly validatorItemId: string;
|
|
379
|
+
readonly validatorKind: "workspace.path-exists" | "workspace.file-digest" | "workspace.file-contains";
|
|
380
|
+
readonly validatorPath: string;
|
|
381
|
+
readonly validatorRunning: boolean;
|
|
382
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CharterText } from './pane-format.js';
|
|
3
|
+
import { itemState } from './pane-format.js';
|
|
4
|
+
export declare function ErrorDetails({ detail, t }: {
|
|
5
|
+
readonly detail: string | undefined;
|
|
6
|
+
readonly t: CharterText;
|
|
7
|
+
}): ReactNode;
|
|
8
|
+
export declare function ActionButton({ children, onClick, disabled, variant, ariaLabel, ariaDescribedBy, title, busy, className, }: {
|
|
9
|
+
readonly children: ReactNode;
|
|
10
|
+
readonly onClick?: () => void;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
readonly variant?: 'primary' | 'outline' | 'ghost';
|
|
13
|
+
readonly ariaLabel?: string;
|
|
14
|
+
readonly ariaDescribedBy?: string;
|
|
15
|
+
readonly title?: string;
|
|
16
|
+
readonly busy?: boolean;
|
|
17
|
+
readonly className?: string;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function StateMark({ state }: {
|
|
20
|
+
readonly state: ReturnType<typeof itemState> | 'error';
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
export declare function StatusTag({ children, tone, title, }: {
|
|
23
|
+
readonly children: ReactNode;
|
|
24
|
+
readonly tone?: 'quiet' | 'info' | 'success' | 'warning' | 'danger';
|
|
25
|
+
readonly title?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export declare function TextEditor({ value, onChange, reason, onReasonChange, showReason, onSave, onCancel, maxBytes, previousBytes, label, t, }: {
|
|
28
|
+
readonly value: string;
|
|
29
|
+
readonly onChange: (value: string) => void;
|
|
30
|
+
readonly reason?: string;
|
|
31
|
+
readonly onReasonChange?: (value: string) => void;
|
|
32
|
+
readonly showReason?: boolean;
|
|
33
|
+
readonly onSave: () => void;
|
|
34
|
+
readonly onCancel: () => void;
|
|
35
|
+
readonly maxBytes: number;
|
|
36
|
+
readonly previousBytes?: number | undefined;
|
|
37
|
+
readonly label?: string | undefined;
|
|
38
|
+
readonly t: CharterText;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
@@ -113,7 +113,6 @@ export interface GraphLayout {
|
|
|
113
113
|
export interface BuildRelationGraphInput {
|
|
114
114
|
readonly committed: readonly GraphInputItem[];
|
|
115
115
|
readonly projected: readonly GraphInputItem[];
|
|
116
|
-
readonly ops?: readonly unknown[];
|
|
117
116
|
readonly showSupersedes?: boolean;
|
|
118
117
|
}
|
|
119
118
|
export declare function buildRelationGraph(input: BuildRelationGraphInput): RelationGraphModel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CharterSection } from './draft-store.js';
|
|
2
|
+
/**
|
|
3
|
+
* Stable DOM anchors for in-Pane navigation. Keeping the map here (rather than
|
|
4
|
+
* inside the Pane) lets the routing contract be unit-tested and reused by a
|
|
5
|
+
* future Workspace/Review/Diagnostics page split.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SECTION_ANCHOR: Record<CharterSection, string>;
|
|
8
|
+
export declare function sectionAnchor(section: CharterSection): string;
|
|
9
|
+
/** Scroll the host scrollBody to the section anchor; returns the anchor element. */
|
|
10
|
+
export declare function scrollToSectionAnchor(section: CharterSection, doc: Document): HTMLElement | null;
|
|
11
|
+
/** Move focus to the section heading, falling back to the page heading. */
|
|
12
|
+
export declare function focusSectionHeading(target: HTMLElement | null, fallback: HTMLElement | null): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ChangeSetSheetController {
|
|
2
|
+
readonly open: boolean;
|
|
3
|
+
readonly setOpen: (open: boolean) => void;
|
|
4
|
+
readonly close: () => void;
|
|
5
|
+
readonly triggerRef: React.MutableRefObject<HTMLButtonElement | null>;
|
|
6
|
+
readonly sheetRef: React.MutableRefObject<HTMLElement | null>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Narrow-container Change Set sheet controller: state, opener/sheet refs,
|
|
10
|
+
* Escape/Tab handling, and opener focus restore. Extracted from the Pane so a
|
|
11
|
+
* future page split can reuse the same modal behavior.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useChangeSetSheet(): ChangeSetSheetController;
|