@monotykamary/dsh-client-ui-trajectory 0.1.0-rc.5
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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +17 -0
- package/README.zh.md +17 -0
- package/lib/client.js +7370 -0
- package/lib/index.js +6 -0
- package/lib/invariant.js +25 -0
- package/lib/types/client/TrajectoryCell.d.ts +10 -0
- package/lib/types/client/TrajectoryGroupHeader.d.ts +13 -0
- package/lib/types/client/TrajectoryTable.d.ts +100 -0
- package/lib/types/client/TrajectoryTimeline.d.ts +24 -0
- package/lib/types/client/TrajectoryToolbar.d.ts +34 -0
- package/lib/types/client/TrajectoryTurn.d.ts +14 -0
- package/lib/types/client/TrajectoryTurnHeader.d.ts +11 -0
- package/lib/types/client/TrajectoryView.d.ts +14 -0
- package/lib/types/client/duration-store.d.ts +7 -0
- package/lib/types/client/index.d.ts +14 -0
- package/lib/types/client/layout.d.ts +41 -0
- package/lib/types/client/locales.d.ts +16 -0
- package/lib/types/client/timeline.d.ts +50 -0
- package/lib/types/client/trajectory-assistant-definition.d.ts +8 -0
- package/lib/types/client/trajectory-compaction-definition.d.ts +8 -0
- package/lib/types/client/trajectory-contract.d.ts +64 -0
- package/lib/types/client/trajectory-definition-common.d.ts +12 -0
- package/lib/types/client/trajectory-message-definitions.d.ts +8 -0
- package/lib/types/client/trajectory-preview.d.ts +8 -0
- package/lib/types/client/trajectory-record.d.ts +105 -0
- package/lib/types/client/trajectory-request-header-definition.d.ts +8 -0
- package/lib/types/client/trajectory-search-index.d.ts +20 -0
- package/lib/types/client/trajectory-snapshot-builder.d.ts +29 -0
- package/lib/types/client/trajectory-tool-definition.d.ts +8 -0
- package/lib/types/client/trajectory-virtual-rows.d.ts +34 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/invariant.d.ts +16 -0
- package/package.json +86 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Incremental full-text index for the trajectory ledger. */
|
|
2
|
+
import type { TrajectoryTurnModel } from './layout.ts';
|
|
3
|
+
/** Session-view-local index that reparses Markdown only when one record's source changes. */
|
|
4
|
+
export declare class TrajectorySearchIndex {
|
|
5
|
+
private readonly entries;
|
|
6
|
+
private layouts;
|
|
7
|
+
/**
|
|
8
|
+
* Incrementally synchronize one or more current trajectory layout slices.
|
|
9
|
+
* @param layouts - Finalized and optional streaming layouts from the same view.
|
|
10
|
+
* @returns Whether the indexed layout version changed.
|
|
11
|
+
*/
|
|
12
|
+
update(layouts: readonly (readonly TrajectoryTurnModel[])[]): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Match a query against the latest committed index version.
|
|
15
|
+
* @param query - Space-separated case-insensitive search terms.
|
|
16
|
+
* @returns Matching stable record identities, or `null` without a query.
|
|
17
|
+
*/
|
|
18
|
+
search(query: string): ReadonlySet<string> | null;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=trajectory-search-index.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Context } from '@monotykamary/cordis';
|
|
2
|
+
import type { ConversationViewBuilder, ConversationViewDefinition } from '@monotykamary/dsh-client-runtime/client';
|
|
3
|
+
import type { TrajectoryConversationViewNode, TrajectorySnapshot } from './trajectory-contract.ts';
|
|
4
|
+
/** Stable empty target used until a Session has assembled Trajectory records. */
|
|
5
|
+
export declare const EMPTY_TRAJECTORY_SNAPSHOT: TrajectorySnapshot;
|
|
6
|
+
/** Simple keyed adapter retaining the old Trajectory snapshot and stage layout. */
|
|
7
|
+
export declare class TrajectorySnapshotBuilder implements ConversationViewBuilder<TrajectoryConversationViewNode, TrajectorySnapshot> {
|
|
8
|
+
private readonly nodes;
|
|
9
|
+
private readonly positions;
|
|
10
|
+
private contributions;
|
|
11
|
+
readonly empty: TrajectorySnapshot;
|
|
12
|
+
replace(input: {
|
|
13
|
+
readonly nodes: readonly TrajectoryConversationViewNode[];
|
|
14
|
+
}): TrajectorySnapshot;
|
|
15
|
+
apply(input: {
|
|
16
|
+
readonly upserts: readonly TrajectoryConversationViewNode[];
|
|
17
|
+
}): TrajectorySnapshot;
|
|
18
|
+
private snapshot;
|
|
19
|
+
private rebuildContributions;
|
|
20
|
+
}
|
|
21
|
+
/** Trajectory target factory preserving the existing stage-oriented view model. */
|
|
22
|
+
export declare const trajectoryViewDefinition: ConversationViewDefinition<TrajectoryConversationViewNode, TrajectorySnapshot>;
|
|
23
|
+
/**
|
|
24
|
+
* Register the stage-oriented Trajectory target builder.
|
|
25
|
+
*
|
|
26
|
+
* @param ctx - Plugin context receiving the view Definition.
|
|
27
|
+
*/
|
|
28
|
+
export declare function registerTrajectoryConversationView(ctx: Context): void;
|
|
29
|
+
//# sourceMappingURL=trajectory-snapshot-builder.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Context } from '@monotykamary/cordis';
|
|
2
|
+
/**
|
|
3
|
+
* Register the Trajectory Tool lifecycle.
|
|
4
|
+
*
|
|
5
|
+
* @param ctx - Plugin context receiving the Definition.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerTrajectoryToolDefinition(ctx: Context): void;
|
|
8
|
+
//# sourceMappingURL=trajectory-tool-definition.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Pure projection from trajectory records to measurable virtual ledger rows. */
|
|
2
|
+
import type { TrajectoryCellProps } from './trajectory-record.ts';
|
|
3
|
+
/** Minimal record shape required by the trajectory virtual-row projection. */
|
|
4
|
+
export interface VirtualizableTrajectoryRecord {
|
|
5
|
+
cell: TrajectoryCellProps;
|
|
6
|
+
collapsedSummaryKind?: 'turn' | 'assistant';
|
|
7
|
+
}
|
|
8
|
+
/** One logical record retained inside a measurable virtual row. */
|
|
9
|
+
export interface TrajectoryVirtualRowEntry<T extends VirtualizableTrajectoryRecord> {
|
|
10
|
+
logicalIndex: number;
|
|
11
|
+
record: T;
|
|
12
|
+
}
|
|
13
|
+
/** One virtualizer item, which may carry zero-height request boundaries. */
|
|
14
|
+
export interface TrajectoryVirtualRow<T extends VirtualizableTrajectoryRecord> {
|
|
15
|
+
entries: readonly TrajectoryVirtualRowEntry<T>[];
|
|
16
|
+
height: number;
|
|
17
|
+
key: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Derive the DOM-safe row identity shared by React, the virtualizer, and
|
|
21
|
+
* browser scroll contracts.
|
|
22
|
+
* @param record - Display record whose identity is required.
|
|
23
|
+
* @returns Stable record identity with a suffix for synthetic fold summaries.
|
|
24
|
+
*/
|
|
25
|
+
export declare function trajectoryVirtualRecordKey(record: VirtualizableTrajectoryRecord): string;
|
|
26
|
+
/**
|
|
27
|
+
* Attach separator-only records to the next content row so the virtualizer
|
|
28
|
+
* never owns a zero-height item. A terminal separator retains its CSS-owned
|
|
29
|
+
* lower-marker clearance as a standalone item.
|
|
30
|
+
* @param records - Final search/fold projection in ledger order.
|
|
31
|
+
* @returns Measurable virtual rows with original logical positions retained.
|
|
32
|
+
*/
|
|
33
|
+
export declare function groupTrajectoryVirtualRows<T extends VirtualizableTrajectoryRecord>(records: readonly T[]): readonly TrajectoryVirtualRow<T>[];
|
|
34
|
+
//# sourceMappingURL=trajectory-virtual-rows.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package-owned invariant companion for `@monotykamary/dsh-client-ui-trajectory`.
|
|
3
|
+
* @module @monotykamary/dsh-client-ui-trajectory/invariant
|
|
4
|
+
*/
|
|
5
|
+
import type { Context } from '@monotykamary/cordis';
|
|
6
|
+
/** Cordis companion plugin name. */
|
|
7
|
+
export declare const name = "client-ui-trajectory-invariant";
|
|
8
|
+
/** Service required before the companion can reserve package ownership. */
|
|
9
|
+
export declare const inject: string[];
|
|
10
|
+
/**
|
|
11
|
+
* Register this package's invariant companion.
|
|
12
|
+
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
+
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
+
*/
|
|
15
|
+
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
+
//# sourceMappingURL=invariant.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@monotykamary/dsh-client-ui-trajectory",
|
|
3
|
+
"description": "Trajectory event ledger with an interactive timing overview: pure-consumer plugin registering into the conversation ViewMap (no service)",
|
|
4
|
+
"version": "0.1.0-rc.5",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/client/ui-trajectory"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./invariant": {
|
|
22
|
+
"types": "./lib/types/invariant.d.ts",
|
|
23
|
+
"default": "./lib/invariant.js"
|
|
24
|
+
},
|
|
25
|
+
"./client": {
|
|
26
|
+
"types": "./lib/types/client/index.d.ts",
|
|
27
|
+
"default": "./lib/client.js"
|
|
28
|
+
},
|
|
29
|
+
"./src/*": "./src/*",
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"dsh": {
|
|
33
|
+
"client": {
|
|
34
|
+
"inject": [
|
|
35
|
+
"@monotykamary/dsh-client-locale",
|
|
36
|
+
"@monotykamary/dsh-client-runtime",
|
|
37
|
+
"@monotykamary/dsh-client-ui-conversation"
|
|
38
|
+
],
|
|
39
|
+
"platform": "web"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@tanstack/react-virtual": "^3.14.9",
|
|
45
|
+
"diff": "^9.0.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^18.2.0",
|
|
49
|
+
"react-dom": "^18.2.0",
|
|
50
|
+
"@monotykamary/dsh-agent": "^0.1.0-rc.5",
|
|
51
|
+
"@monotykamary/dsh-client-locale": "^0.1.0-rc.5",
|
|
52
|
+
"@monotykamary/dsh-client-runtime": "^0.1.0-rc.5",
|
|
53
|
+
"@monotykamary/dsh-invariants": "^0.1.0-rc.5",
|
|
54
|
+
"@monotykamary/dsh-compaction": "^0.1.0-rc.5",
|
|
55
|
+
"@monotykamary/dsh-tools": "^0.1.0-rc.5",
|
|
56
|
+
"@monotykamary/dsh-client-ui-primitives": "^0.1.0-rc.5",
|
|
57
|
+
"@monotykamary/cordis": "^4.0.1"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/react": "~18.3.1",
|
|
61
|
+
"@types/react-dom": "~18.3.0",
|
|
62
|
+
"react": "^18.2.0",
|
|
63
|
+
"react-dom": "^18.2.0",
|
|
64
|
+
"@monotykamary/dsh-agent": "^0.1.0-rc.5",
|
|
65
|
+
"@monotykamary/dsh-client-ui-conversation": "^0.1.0-rc.5",
|
|
66
|
+
"@monotykamary/dsh-client-ui-primitives": "^0.1.0-rc.5",
|
|
67
|
+
"@monotykamary/dsh-client-runtime": "^0.1.0-rc.5",
|
|
68
|
+
"@monotykamary/dsh-client-test-runtime": "^0.1.0-rc.5",
|
|
69
|
+
"@monotykamary/dsh-client-locale": "^0.1.0-rc.5",
|
|
70
|
+
"@monotykamary/dsh-client-ui-slots": "^0.1.0-rc.5",
|
|
71
|
+
"@monotykamary/cordis": "^4.0.1",
|
|
72
|
+
"@monotykamary/dsh-invariants": "^0.1.0-rc.5",
|
|
73
|
+
"@monotykamary/dsh-tools": "^0.1.0-rc.5",
|
|
74
|
+
"@monotykamary/dsh-compaction": "^0.1.0-rc.5"
|
|
75
|
+
},
|
|
76
|
+
"files": [
|
|
77
|
+
"lib/index.js",
|
|
78
|
+
"lib/invariant.js",
|
|
79
|
+
"lib/client.js",
|
|
80
|
+
"lib/types/**/*.d.ts"
|
|
81
|
+
],
|
|
82
|
+
"scripts": {
|
|
83
|
+
"bundle": "tsdown",
|
|
84
|
+
"watch": "tsdown --watch"
|
|
85
|
+
}
|
|
86
|
+
}
|