@xrn1997/dsh-session-delete 0.9.0 → 0.11.0
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 +40 -39
- package/lib/client.js +28235 -27782
- package/lib/index.js +2090 -1698
- package/lib/types/api/archive-rows.d.ts +4 -17
- package/lib/types/api/attachment-orphans.d.ts +3 -9
- package/lib/types/api/attachment.d.ts +4 -18
- package/lib/types/api/connection-route.d.ts +2 -6
- package/lib/types/api/route-table.d.ts +18 -59
- package/lib/types/api/trash-rows.d.ts +6 -22
- package/lib/types/client/api-base.d.ts +5 -12
- package/lib/types/client/archive-detail.d.ts +6 -14
- package/lib/types/client/archive-pane.d.ts +27 -24
- package/lib/types/client/archive-store.d.ts +7 -3
- package/lib/types/client/attachment-view.d.ts +3 -10
- package/lib/types/client/batch-bar.d.ts +4 -15
- package/lib/types/client/batch-confirm.d.ts +17 -22
- package/lib/types/client/batch-menu-item.d.ts +2 -10
- package/lib/types/client/batch-pick.d.ts +8 -14
- package/lib/types/client/batch-select.d.ts +11 -26
- package/lib/types/client/batch-selection-store.d.ts +25 -9
- package/lib/types/client/busy-gate.d.ts +2 -4
- package/lib/types/client/config-settings.d.ts +2 -3
- package/lib/types/client/confirm-dialog.d.ts +4 -7
- package/lib/types/client/context-menu-actions.d.ts +2 -8
- package/lib/types/client/context.d.ts +6 -15
- package/lib/types/client/copy.d.ts +36 -44
- package/lib/types/client/delete-confirm.d.ts +25 -13
- package/lib/types/client/delete-menu-item.d.ts +5 -9
- package/lib/types/client/detail-blocks.d.ts +5 -6
- package/lib/types/client/detail-ledger.d.ts +6 -10
- package/lib/types/client/detail-pane.d.ts +5 -10
- package/lib/types/client/drop-machine.d.ts +34 -0
- package/lib/types/client/host-archive-watch.d.ts +5 -18
- package/lib/types/client/host-rows.d.ts +31 -42
- package/lib/types/client/index.d.ts +5 -19
- package/lib/types/client/main-view.d.ts +25 -34
- package/lib/types/client/maintenance-parts.d.ts +2 -5
- package/lib/types/client/maintenance-settings.d.ts +3 -13
- package/lib/types/client/markdown.d.ts +4 -9
- package/lib/types/client/notice.d.ts +2 -5
- package/lib/types/client/orphan-maintenance.d.ts +7 -19
- package/lib/types/client/panel-tab.d.ts +39 -0
- package/lib/types/client/pending-open.d.ts +0 -1
- package/lib/types/client/plugin.d.ts +2 -4
- package/lib/types/client/prompt-rail.d.ts +1 -2
- package/lib/types/client/receipt.d.ts +13 -43
- package/lib/types/client/remote.d.ts +32 -98
- package/lib/types/client/scene.d.ts +41 -0
- package/lib/types/client/session-detail.d.ts +11 -41
- package/lib/types/client/session-list.d.ts +10 -44
- package/lib/types/client/session-live.d.ts +3 -13
- package/lib/types/client/settings-cards.d.ts +3 -6
- package/lib/types/client/settings-view.d.ts +1 -7
- package/lib/types/client/store.d.ts +6 -25
- package/lib/types/client/subagent-section.d.ts +4 -13
- package/lib/types/client/trash-confirm.d.ts +7 -9
- package/lib/types/client/trash-detail.d.ts +9 -12
- package/lib/types/client/trash-drop.d.ts +33 -0
- package/lib/types/client/trash-entry.d.ts +8 -2
- package/lib/types/client/trash-nav.d.ts +4 -11
- package/lib/types/client/trash-panel.d.ts +4 -6
- package/lib/types/client/trash-snapshot.d.ts +27 -22
- package/lib/types/client/trash-store.d.ts +12 -4
- package/lib/types/client/trash-tab.d.ts +22 -0
- package/lib/types/client/trash-view.d.ts +19 -49
- package/lib/types/client/ui/Checkbox.d.ts +5 -2
- package/lib/types/client/ui/ErrorBoundary.d.ts +2 -1
- package/lib/types/client/ui/Modal.d.ts +3 -1
- package/lib/types/client/ui/Toast.d.ts +6 -3
- package/lib/types/client/ui/icons.d.ts +16 -8
- package/lib/types/client/undo-notices.d.ts +45 -30
- package/lib/types/client/undo-toast.d.ts +6 -12
- package/lib/types/client/use-archive-detail-reader.d.ts +2 -3
- package/lib/types/client/use-archive-panel-controller.d.ts +9 -38
- package/lib/types/client/use-archive-query.d.ts +2 -0
- package/lib/types/client/use-column-resize.d.ts +4 -11
- package/lib/types/client/use-detail-frame.d.ts +50 -0
- package/lib/types/client/use-detail-pager.d.ts +5 -13
- package/lib/types/client/use-detail-rail.d.ts +5 -14
- package/lib/types/client/use-detail-reader.d.ts +5 -16
- package/lib/types/client/use-gated-refresh.d.ts +3 -3
- package/lib/types/client/use-list-selection.d.ts +5 -3
- package/lib/types/client/use-maintenance-section.d.ts +7 -12
- package/lib/types/client/use-maintenance.d.ts +7 -13
- package/lib/types/client/use-panel-child-view.d.ts +20 -0
- package/lib/types/client/use-panel-list-read.d.ts +51 -0
- package/lib/types/client/use-panel-selection.d.ts +1 -3
- package/lib/types/client/use-panel-tab.d.ts +134 -0
- package/lib/types/client/use-panel-width.d.ts +3 -11
- package/lib/types/client/use-prompt-rail.d.ts +8 -28
- package/lib/types/client/use-trash-detail-reader.d.ts +3 -10
- package/lib/types/client/use-trash-panel-controller.d.ts +14 -46
- package/lib/types/client/use-trash-query.d.ts +9 -25
- package/lib/types/client/use-write-progress.d.ts +26 -0
- package/lib/types/client/write-progress.d.ts +18 -0
- package/lib/types/client/write-seats.d.ts +33 -75
- package/lib/types/config.d.ts +8 -25
- package/lib/types/deps.d.ts +6 -11
- package/lib/types/domain/closure.d.ts +11 -30
- package/lib/types/errors.d.ts +6 -12
- package/lib/types/index.d.ts +9 -32
- package/lib/types/log/session-log.d.ts +33 -25
- package/lib/types/log/zstd-frames.d.ts +7 -29
- package/lib/types/ports/agent-handles.d.ts +10 -19
- package/lib/types/ports/attachments-port.d.ts +2 -6
- package/lib/types/ports/fs-port.d.ts +17 -31
- package/lib/types/ports/home.d.ts +7 -15
- package/lib/types/ports/host-port.d.ts +51 -98
- package/lib/types/ports/presence-port.d.ts +5 -12
- package/lib/types/remote/map-error.d.ts +4 -17
- package/lib/types/shared/apply-actions.d.ts +36 -0
- package/lib/types/shared/apply-values.d.ts +163 -0
- package/lib/types/shared/project-key.d.ts +5 -23
- package/lib/types/shared/session-path.d.ts +8 -33
- package/lib/types/shared/value-schema.d.ts +54 -0
- package/lib/types/shared/wire.d.ts +117 -249
- package/lib/types/trash/archive-detail.d.ts +9 -20
- package/lib/types/trash/attachments.d.ts +60 -46
- package/lib/types/trash/detail.d.ts +17 -36
- package/lib/types/trash/display-name.d.ts +2 -5
- package/lib/types/trash/entry.d.ts +19 -44
- package/lib/types/trash/groups.d.ts +17 -26
- package/lib/types/trash/ledger.d.ts +5 -11
- package/lib/types/trash/manifest.d.ts +4 -6
- package/lib/types/trash/projection-cache.d.ts +5 -11
- package/lib/types/trash/reconcile.d.ts +11 -23
- package/lib/types/trash/session-rows.d.ts +15 -35
- package/lib/types/trash/shrinking-view.d.ts +10 -11
- package/lib/types/trash/storage-manifest.d.ts +4 -7
- package/lib/types/trash/subagent-summary.d.ts +35 -0
- package/lib/types/verbs/batch-carried.d.ts +22 -4
- package/lib/types/verbs/batch.d.ts +39 -2
- package/lib/types/verbs/config.d.ts +3 -11
- package/lib/types/verbs/delete-session.d.ts +8 -13
- package/lib/types/verbs/empty-batch.d.ts +18 -0
- package/lib/types/verbs/live-admission.d.ts +3 -10
- package/lib/types/verbs/member-journal.d.ts +3 -7
- package/lib/types/verbs/member-presence.d.ts +7 -18
- package/lib/types/verbs/move-group.d.ts +2 -6
- package/lib/types/verbs/orphan-subagents.d.ts +23 -36
- package/lib/types/verbs/permanent-removal.d.ts +91 -84
- package/lib/types/verbs/restore-session.d.ts +10 -26
- package/lib/types/verbs/trash-scope.d.ts +21 -30
- package/lib/types/verbs/write-progress.d.ts +37 -0
- package/package.json +135 -134
- package/lib/types/client/reset-client-state.d.ts +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 一小段本地值形状 DSL:只服务 `shared/` 的线上成功值。
|
|
3
|
+
* schema 同时给出运行期 `check` 与 `Infer` 类型,字段清单只写一次;不 import 宿主包。
|
|
4
|
+
*/
|
|
5
|
+
declare const SCHEMA_TYPE: unique symbol;
|
|
6
|
+
/** 一枚形状:运行期判形与 TypeScript 类型都从它派生。 */
|
|
7
|
+
export interface ValueSchema<T> {
|
|
8
|
+
readonly check: (value: unknown) => value is T;
|
|
9
|
+
/** 类型标记(运行期不存在):`Infer` 从这里取 T。 */
|
|
10
|
+
readonly [SCHEMA_TYPE]?: T;
|
|
11
|
+
/** 对象字段用:缺席也合法(`object` 的逐格检查据此跳过)。 */
|
|
12
|
+
readonly optional?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type Infer<S> = S extends ValueSchema<infer T> ? T : never;
|
|
15
|
+
export interface OptionalSchema<T> extends ValueSchema<T | undefined> {
|
|
16
|
+
readonly optional: true;
|
|
17
|
+
}
|
|
18
|
+
export type SchemaShape = Readonly<Record<string, ValueSchema<unknown>>>;
|
|
19
|
+
type RequiredKeys<S extends SchemaShape> = {
|
|
20
|
+
[K in keyof S]-?: S[K] extends OptionalSchema<unknown> ? never : K;
|
|
21
|
+
}[keyof S];
|
|
22
|
+
type OptionalKeys<S extends SchemaShape> = {
|
|
23
|
+
[K in keyof S]-?: S[K] extends OptionalSchema<unknown> ? K : never;
|
|
24
|
+
}[keyof S];
|
|
25
|
+
type InferOptional<S> = S extends OptionalSchema<infer T> ? T : never;
|
|
26
|
+
/** 对象:必需键逐格校;可选键缺席跳过、在场仍校;未知键不拒(这一层只管已知格)。 */
|
|
27
|
+
export type ObjectOf<S extends SchemaShape> = {
|
|
28
|
+
[K in RequiredKeys<S>]: Infer<S[K]>;
|
|
29
|
+
} & {
|
|
30
|
+
[K in OptionalKeys<S>]?: InferOptional<S[K]>;
|
|
31
|
+
};
|
|
32
|
+
/** 只取几格:回执读落地 id 这类窄读从同一份字段表派生,不另抄一遍形状。 */
|
|
33
|
+
export type PickOf<S extends SchemaShape, K extends keyof S> = {
|
|
34
|
+
[P in K as S[P] extends OptionalSchema<unknown> ? never : P]: Infer<S[P]>;
|
|
35
|
+
} & {
|
|
36
|
+
[P in K as S[P] extends OptionalSchema<unknown> ? P : never]?: InferOptional<S[P]>;
|
|
37
|
+
};
|
|
38
|
+
/** 带字段表的对象 schema:`pick` 用它派生窄读,字段清单仍只住 {@link object} 的那一次声明。 */
|
|
39
|
+
export interface ObjectSchema<S extends SchemaShape> extends ValueSchema<ObjectOf<S>> {
|
|
40
|
+
readonly shape: S;
|
|
41
|
+
}
|
|
42
|
+
export declare function string(): ValueSchema<string>;
|
|
43
|
+
/** 有限数字:`NaN` / `Infinity` 不是读数(与线上判形同一口径)。 */
|
|
44
|
+
export declare function finiteNumber(): ValueSchema<number>;
|
|
45
|
+
export declare function boolean(): ValueSchema<boolean>;
|
|
46
|
+
export declare function optional<const T>(item: ValueSchema<T>): OptionalSchema<T>;
|
|
47
|
+
export declare function literal<const T extends readonly (string | number | boolean | null)[]>(...values: T): ValueSchema<T[number]>;
|
|
48
|
+
export declare function union<const S extends readonly ValueSchema<unknown>[]>(...schemas: S): ValueSchema<Infer<S[number]>>;
|
|
49
|
+
export declare function nullable<const T>(schema: ValueSchema<T>): ValueSchema<T | null>;
|
|
50
|
+
export declare function object<const S extends SchemaShape>(shape: S): ObjectSchema<S>;
|
|
51
|
+
/** 从对象 schema 里只取几格:运行期只校那几格,类型也按那几格收窄。可选格缺席时把 `undefined`
|
|
52
|
+
* 交回该格自己的 check(与 `object` 的「缺席跳过」等价,前提是缺席合法的格都用 {@link optional} 建)。 */
|
|
53
|
+
export declare function pick<const S extends SchemaShape, const K extends readonly (keyof S & string)[]>(schema: ObjectSchema<S>, ...keys: K): ValueSchema<PickOf<S, K[number]>>;
|
|
54
|
+
export {};
|