dsh-charter 0.2.0 → 0.2.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/CHANGELOG.zh.md +51 -1
  3. package/CONTRIBUTING.md +12 -2
  4. package/CONTRIBUTING.zh.md +9 -2
  5. package/README.md +50 -20
  6. package/README.zh.md +39 -17
  7. package/docs/README.md +7 -3
  8. package/docs/README.zh.md +5 -3
  9. package/docs/assets/charter-pane.zh.png +0 -0
  10. package/docs/design/charter-dependency-graph-v1.zh.md +1101 -0
  11. package/docs/design/charter-design-v1.md +7 -3
  12. package/docs/design/charter-design-v1.zh.md +14 -1
  13. package/docs/design/charter-workspace-v2.zh.md +20 -3
  14. package/docs/design/version-roadmap.md +9 -9
  15. package/docs/design/version-roadmap.zh.md +18 -14
  16. package/docs/release-notes/0.2.0.md +7 -7
  17. package/docs/release-notes/0.2.1.md +58 -0
  18. package/docs/release-notes/0.2.2.md +60 -0
  19. package/docs/release-notes/README.md +1 -2
  20. package/docs/releasing.md +12 -7
  21. package/docs/releasing.zh.md +10 -7
  22. package/docs/user-guide.md +48 -22
  23. package/docs/user-guide.zh.md +43 -18
  24. package/docs/verification.md +40 -28
  25. package/docs/verification.zh.md +31 -24
  26. package/lib/client/DependencyGraph.d.ts +19 -0
  27. package/lib/client/locales.d.ts +97 -19
  28. package/lib/client/relation-graph.d.ts +135 -0
  29. package/lib/client/store.d.ts +5 -0
  30. package/lib/client.js +2552 -496
  31. package/lib/core/change-set.d.ts +7 -0
  32. package/lib/core/dependencies.d.ts +29 -0
  33. package/lib/core.js +1 -1
  34. package/lib/{fork-D5HVDV1i.js → fork-KSL6sovw.js} +70 -1
  35. package/lib/host/domain.d.ts +50 -0
  36. package/lib/host/service.d.ts +18 -1
  37. package/lib/host/types.d.ts +37 -1
  38. package/lib/index.js +2 -2
  39. package/lib/remote/service.d.ts +8 -1
  40. package/lib/remote/wire.d.ts +161 -3
  41. package/lib/remote.js +155 -4
  42. package/lib/{service-C3A59BG5.js → service-MsIACddZ.js} +186 -5
  43. package/lib/version.d.ts +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,135 @@
1
+ import type { DeliverableProgress } from '../core/schemas.js';
2
+ /**
3
+ * Client-side dependency-graph projection.
4
+ *
5
+ * The design contract is split in two:
6
+ * - buildRelationGraph compares committed and projected items and derives
7
+ * execution/candidate/history lanes plus edge staging state;
8
+ * - layoutRelationGraph is a deterministic, font-free geometry pass over the
9
+ * semantic model.
10
+ *
11
+ * Both functions are pure. The Pane renders their output; the Host is not
12
+ * involved and no graph coordinate enters the record, prompt, or digest.
13
+ */
14
+ export declare const GRAPH: {
15
+ readonly nodePaddingEm: 0.625;
16
+ readonly summaryEm: 0.78;
17
+ readonly nodeMinWidthEm: 9;
18
+ readonly nodeWidthEm: 10;
19
+ readonly nodeMaxWidthEm: 12;
20
+ readonly nodeHeightEm: {
21
+ readonly 1: 3;
22
+ readonly 2: 4.5;
23
+ };
24
+ readonly rankPitchEm: 12.5;
25
+ readonly rowPitchEm: 5.5;
26
+ readonly candidateGapEm: 2.5;
27
+ readonly historyGapEm: 2.5;
28
+ readonly navigationLimit: 60;
29
+ readonly isolatedNodeLimit: 20;
30
+ readonly touchTargetPx: 44;
31
+ };
32
+ export declare const LINE_CAPACITY: number;
33
+ export type GraphLane = 'execution' | 'candidate' | 'history';
34
+ export type NodeState = 'unchanged' | 'staged-added' | 'staged-removed' | 'staged-changed';
35
+ export type EdgeState = 'committed' | 'staged-added' | 'staged-removed';
36
+ export type EdgeKind = 'requires' | 'proposed' | 'supersedes';
37
+ export interface GraphInputItem {
38
+ readonly id: string;
39
+ readonly kind: string;
40
+ readonly text: string;
41
+ readonly review: string;
42
+ readonly lifecycle: string;
43
+ readonly progress?: DeliverableProgress;
44
+ readonly requires?: readonly string[];
45
+ readonly proposedRequires?: readonly string[];
46
+ readonly supersedes?: string;
47
+ readonly supersededBy?: string;
48
+ readonly order?: number;
49
+ }
50
+ export interface RelationNode {
51
+ readonly id: string;
52
+ readonly lane: GraphLane;
53
+ readonly ghost?: boolean;
54
+ readonly localKey: string | undefined;
55
+ readonly text: string;
56
+ readonly rank: number | undefined;
57
+ readonly order: number;
58
+ readonly groupRank: number | undefined;
59
+ readonly progress: DeliverableProgress | undefined;
60
+ readonly executionDisplay: string | undefined;
61
+ readonly prerequisiteStatus: string | undefined;
62
+ readonly state: NodeState;
63
+ readonly candidateCycle?: boolean;
64
+ }
65
+ export interface RelationEdge {
66
+ readonly from: string;
67
+ readonly to: string;
68
+ readonly kind: EdgeKind;
69
+ readonly state: EdgeState;
70
+ readonly editable: boolean;
71
+ readonly focusable: boolean;
72
+ readonly targetProposalId?: string;
73
+ }
74
+ export interface RelationGraphModel {
75
+ readonly nodes: readonly RelationNode[];
76
+ readonly edges: readonly RelationEdge[];
77
+ readonly topoOrder: readonly string[];
78
+ readonly committedTopoOrder: readonly string[];
79
+ readonly navigables: number;
80
+ }
81
+ export interface PlacedNode extends RelationNode {
82
+ readonly col: number;
83
+ readonly x: number;
84
+ readonly y: number;
85
+ readonly w: number;
86
+ readonly h: number;
87
+ readonly labelLines: 1 | 2;
88
+ }
89
+ export interface PlacedEdge extends RelationEdge {
90
+ readonly key: string;
91
+ readonly path: string;
92
+ readonly labelAt: {
93
+ readonly x: number;
94
+ readonly y: number;
95
+ };
96
+ }
97
+ export interface GraphLayout {
98
+ readonly nodes: readonly PlacedNode[];
99
+ readonly edges: readonly PlacedEdge[];
100
+ readonly width: number;
101
+ readonly height: number;
102
+ readonly traversal: readonly string[];
103
+ readonly navigables: number;
104
+ readonly focusId: string | undefined;
105
+ readonly depth: 1 | 2;
106
+ readonly degraded: {
107
+ readonly supersedesHidden: boolean;
108
+ readonly depthReduced: boolean;
109
+ readonly hidden: boolean;
110
+ readonly isolatedTooMany: boolean;
111
+ };
112
+ }
113
+ export interface BuildRelationGraphInput {
114
+ readonly committed: readonly GraphInputItem[];
115
+ readonly projected: readonly GraphInputItem[];
116
+ readonly ops?: readonly unknown[];
117
+ readonly showSupersedes?: boolean;
118
+ }
119
+ export declare function buildRelationGraph(input: BuildRelationGraphInput): RelationGraphModel;
120
+ export declare function labelLines(text: string): 1 | 2;
121
+ export declare function defaultFocus(model: RelationGraphModel): string | undefined;
122
+ interface LayoutOptions {
123
+ readonly focusId?: string | undefined;
124
+ readonly depth?: 1 | 2;
125
+ readonly supersedesHidden?: boolean;
126
+ }
127
+ export declare function layoutRelationGraph(model: RelationGraphModel, options?: LayoutOptions): GraphLayout;
128
+ export type GraphNavigationKey = 'Home' | 'End' | 'BracketLeft' | 'BracketRight' | 'PageUp' | 'PageDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown';
129
+ export declare function graphNavigationTarget(layout: GraphLayout, currentKey: string, key: GraphNavigationKey): string | null;
130
+ export interface OverlapPair {
131
+ readonly left: string;
132
+ readonly right: string;
133
+ }
134
+ export declare function graphOverlaps(layout: GraphLayout): readonly OverlapPair[];
135
+ export {};
@@ -31,6 +31,9 @@ export interface CharterSource {
31
31
  /** Apply a committed view returned by edit immediately, without waiting for the stream. */
32
32
  readonly accept: (view: CharterView) => void;
33
33
  readonly retry: () => void;
34
+ /** Recent internally cached archives; restore does not require a download. */
35
+ readonly listArchives?: () => Promise<import('../host/types.js').CharterArchiveListResult>;
36
+ readonly readArchive?: (key: string) => Promise<import('../host/types.js').CharterArchiveReadResult>;
34
37
  /** Export the complete raw record archive (owner-only maintenance call). */
35
38
  readonly exportRecord: () => Promise<CharterRecordExport>;
36
39
  /** Explicitly initialize an absent-unconfirmed record. */
@@ -76,6 +79,8 @@ export declare class CharterSessionSource implements CharterSource {
76
79
  readonly runValidators: (requests: readonly import("../host/types.js").CharterValidatorRequest[]) => Promise<import("../host/types.js").CharterValidatorRunResult>;
77
80
  readonly queryMessages: () => Promise<import("../host/types.js").CharterMessageListResult>;
78
81
  readonly proposeMessage: (options?: import("../host/types.js").CharterMessageProposalOptions) => Promise<CharterEditResult>;
82
+ readonly listArchives: () => Promise<import("../host/types.js").CharterArchiveListResult>;
83
+ readonly readArchive: (key: string) => Promise<import("../host/types.js").CharterArchiveReadResult>;
79
84
  readonly exportRecord: () => Promise<CharterRecordExport>;
80
85
  readonly initializeRecord: (request: CharterInitializeRequest) => Promise<CharterRecordOperationResult>;
81
86
  readonly restoreRecord: (request: CharterRestoreRequest) => Promise<CharterRecordOperationResult>;