@dsh-workbench/core 1.0.0-beta.0 → 1.0.0-beta.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.
@@ -9,6 +9,7 @@ export interface DiscoverSourcesDialogProps {
9
9
  readonly detail: string;
10
10
  } | null;
11
11
  readonly busy: boolean;
12
+ readonly adding: boolean;
12
13
  readonly onClose: () => void;
13
14
  readonly onAdd: (url: string) => void;
14
15
  readonly onRemove: (id: string) => void;
@@ -37,6 +37,7 @@ export interface DiscoverController {
37
37
  readonly writeFailed: string | null;
38
38
  readonly provisionFailed: string | null;
39
39
  readonly busy: boolean;
40
+ readonly addingSource: boolean;
40
41
  readonly manageOpen: boolean;
41
42
  readonly problem: {
42
43
  readonly id: string;
@@ -1,4 +1,5 @@
1
1
  export type { UnitModuleFace, UnitMountDeps, UnitMountResult } from '@dsh-workbench/shared/host';
2
+ export type { ExtensionCaller, ExtensionCallOptions, ExtensionNeed, ExtensionSession, CommandReader, ExtensionValue, GitReader, LibReader } from '@dsh-workbench/shared';
2
3
  export type { BoardModuleProps as BoardProps, CallOverrides, DataError, DataReader, DataRequest, DataResult, RequestRecipe, UnitClientApi, UnitClientFace, } from '@dsh-workbench/shared';
3
4
  export type { DshClientContext as ClientContext, DshHostContext as HostContext } from '@dsh-workbench/shared';
4
5
  export type { UnitRegistry } from '../host/unit-registry.js';
@@ -62,6 +62,9 @@ export declare function mountUnits(units: readonly HostUnit[], deps: {
62
62
  ownedUnits?: () => readonly string[];
63
63
  installable?: () => readonly string[];
64
64
  data?: DataReader;
65
+ libs?: UnitMountDeps['libs'];
66
+ git?: UnitMountDeps['git'];
67
+ commands?: UnitMountDeps['commands'];
65
68
  probe?: UnitMountDeps['probe'];
66
69
  store?: UnitMountDeps['store'];
67
70
  values?: UnitMountDeps['values'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-workbench/core",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "个人工作台:Agent 工作台(左栏 + 常驻对话 + 自研右侧数据面板)。",
5
5
  "type": "module",
6
6
  "icon": "./icon.svg",
@@ -98,8 +98,8 @@
98
98
  "proper-lockfile": "^4.1.2",
99
99
  "which": "^7.0.0",
100
100
  "write-file-atomic": "^8.0.0",
101
- "@dsh-workbench/shared": "1.0.0-beta.0",
102
- "@dsh-workbench/adapters-default": "1.0.0-beta.0"
101
+ "@dsh-workbench/shared": "1.0.0-beta.1",
102
+ "@dsh-workbench/adapters-default": "1.0.0-beta.1"
103
103
  },
104
104
  "license": "MIT",
105
105
  "repository": {
@@ -104,12 +104,14 @@ h(Form<{ branch: string }>, {
104
104
 
105
105
  ```tsx
106
106
  h(FormRows, null,
107
- h(FormRow, { label: t('myunit.mode'), hint: t('myunit.modeHint') },
108
- h(SelectField, { value, options, onChange: setMode })))
107
+ h(FormRow, { label: t('myunit.mode'), htmlFor: 'myunit-mode', hint: t('myunit.modeHint') },
108
+ h(SelectField, { id: 'myunit-mode', value, options, onChange: setMode })))
109
109
  ```
110
110
 
111
111
  - 标签归 `FormRow`(默认左置;`layout: 'stacked'` 堆叠)。进了 `FormRow` 就不再给控件 `label` / `hint`。
112
112
  `hint` 与 `problem` 二选一,错误优先。
113
+ - 行是 `<div>`,`<label>` 只包标签文字;要点标签聚焦 / 展开控件,给 `FormRow.htmlFor` 与控件的 `id` 同一个值
114
+ (`Form` 内部按 `field.key` 自动接成 `wb-form-<key>`)。不给 `htmlFor` 就只是排布,点标签不聚焦。
113
115
  - 错误:位置与外观归 `FormRow.problem` + 控件 `invalid`;校验逻辑留在模块(纯函数 + 文案,交给 `validate`)。
114
116
  "是否提交过"与首错聚焦归 `Form`。
115
117
  - 选择:候选多 / 需搜索 / 需分组 / 可能读不到 → `SelectField`;候选少 / 要全览 / 多选 → `ChoiceGroup`。