@goodpeanuts/dsh-sui 0.1.1 → 0.1.2-fix.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.
@@ -25,7 +25,7 @@ function registerFinanceStateContext(prompt, read) {
25
25
  }
26
26
  }
27
27
  function buildFinanceStateContext(snapshot) {
28
- if (snapshot.status === "unbound") return "【当前账务状态】\n当前会话尚无账本授权;未读取任何默认账本统计。用 finance_books_list 查看默认账本和授权,沿用现有账本授权流程。";
28
+ if (snapshot.status === "unbound") return "【当前账务状态】\n当前会话尚无账本授权;未读取任何默认账本统计。普通聊天不要请求授权;仅在处理用户明确提出的财务任务时使用财务工具。用 finance_books_list 查看默认账本和授权;没有默认账本时,需要账本访问的工具会按需请求授权;也可在账本页面的“数据与同步 → 账本授权”设置默认账本。若没有可选账本,先打开账本页面登录并同步。";
29
29
  return [
30
30
  "【当前账务状态】",
31
31
  "以下是本次模型上下文组装时的轻量状态,覆盖之前的状态快照,不是已读取或已核对的凭据。fingerprint 仅为状态指纹,不能作为读取工具的分页版本;续读须使用各工具实际返回的 dataVersion。",
@@ -7,6 +7,7 @@ import { PersonalPreferencesStore } from "./packages/finance-module/src/personal
7
7
  import { financeDataset } from "./packages/finance-module/src/storage.mjs";
8
8
  import { ManagedDataset } from "./packages/data-maintenance/src/runtime.mjs";
9
9
  import { projectFinanceTools } from "./capabilities/tools.mjs";
10
+ import { createBookAuthorization } from "./capabilities/book-authorization.mjs";
10
11
  import { sessionAttachmentOwnership } from "./session/attachment-ownership.mjs";
11
12
  import { resolveRemoteWritePolicy } from "./remote-write-policy.mjs";
12
13
  import { resolveStoragePaths } from "./storage/paths.mjs";
@@ -92,7 +93,19 @@ async function apply(ctx, config) {
92
93
  const value = Reflect.get(current, key);
93
94
  return typeof value === "function" ? value.bind(current) : value;
94
95
  } });
95
- const tools = projectFinanceTools(selectFinanceModelTools(createFinanceTools(service, ledger, { listSourceRefs: () => [] })));
96
+ let questions;
97
+ ctx.inject(["userQuestions"], (host) => {
98
+ questions = (request) => host.userQuestions.ask(request);
99
+ host.effect(() => () => {
100
+ questions = void 0;
101
+ });
102
+ });
103
+ const authorization = createBookAuthorization({
104
+ runtime: () => manager.get(),
105
+ questions: () => questions
106
+ });
107
+ ctx.effect(() => () => authorization.dispose());
108
+ const tools = projectFinanceTools(selectFinanceModelTools(createFinanceTools(service, ledger, { listSourceRefs: () => [] })), authorization.authorize);
96
109
  for (const tool of tools) ctx.tools.register({
97
110
  ...tool,
98
111
  execute: (args, exec) => manager.run(async () => {
@@ -135,7 +148,7 @@ async function apply(ctx, config) {
135
148
  path: "/api/sui-ledger",
136
149
  handler: async (req, res) => {
137
150
  const url = new URL(req.url ?? "/", "http://localhost"), path = url.pathname.slice(15);
138
- if (path === "/maintenance" || path.startsWith("/maintenance/") || path === "/finance/services" || path.startsWith("/finance/services/") || path === "/finance/session" || path.startsWith("/finance/session/")) {
151
+ if (path === "/maintenance" || path.startsWith("/maintenance/") || path === "/finance/services" || path.startsWith("/finance/services/") || path === "/finance/session" || path.startsWith("/finance/session/") || path === "/finance/default-book" || /^\/finance\/subjects\/[^/]+\/grant(?:\/|$)/.test(path)) {
139
152
  const rejection = web.connection.requestRejection(req);
140
153
  if (rejection !== void 0) {
141
154
  res.statusCode = rejection;
@@ -1,6 +1,6 @@
1
1
  import { join, resolve } from "node:path";
2
2
  import { homedir } from "node:os";
3
- //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-home-paths_159c15e70066431314381a350c2ee56a/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js
3
+ //#region ../../node_modules/.pnpm/@deepseek-ai+dsh-home-paths_43f382ed782d46f05123e7add538564e/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js
4
4
  /**
5
5
  * Shared filesystem path helpers for DeepSeek Harness user data.
6
6
  *
@@ -90,7 +90,7 @@ function createFinanceTools(service, ledger, options = {}) {
90
90
  throw new FinancePublicError(JSON.stringify({
91
91
  code,
92
92
  activeGrant: books.activeGrant,
93
- message: code === "finance_grant_book_mismatch" ? "Use the active grant's bookId if the requested ID was mistyped. Selecting another book requires trusted user action." : "No active book grant. Request finance.book_grant.selection and wait for the trusted response."
93
+ message: code === "finance_grant_book_mismatch" ? "Use the active grant's bookId if the requested ID was mistyped. Selecting another book requires trusted user action." : "No active book grant. Authorize a default book in Ledger → 数据与同步 → 账本授权, or confirm the contextual book selection. If no books exist, log in and sync in Ledger first."
94
94
  }));
95
95
  }
96
96
  if (code) throw new FinancePublicError(JSON.stringify({
@@ -61,7 +61,7 @@ var FinanceDatabase = class {
61
61
  assertTimestamp(input.now, "now");
62
62
  return this.db.transaction(() => {
63
63
  const current = this.getActiveGrant(input.subjectId);
64
- if (input.expectedRevision !== void 0 && current?.revision !== input.expectedRevision) throw new Error("finance_grant_revision_conflict");
64
+ if (input.expectedRevision !== void 0 && (current?.revision ?? 0) !== input.expectedRevision) throw new Error("finance_grant_revision_conflict");
65
65
  if (current?.bookId === input.bookId) return current;
66
66
  const revision = (current?.revision ?? 0) + 1;
67
67
  if (current) this.db.prepare("UPDATE book_read_grants SET replaced_at=? WHERE id=? AND replaced_at IS NULL").run(input.now, current.id);
@@ -18,6 +18,10 @@ function createFinanceInteractionTypes(service) {
18
18
  suggestedBookId: {
19
19
  type: "string",
20
20
  minLength: 1
21
+ },
22
+ expectedRevision: {
23
+ type: "integer",
24
+ minimum: 0
21
25
  }
22
26
  },
23
27
  additionalProperties: false
@@ -39,7 +43,7 @@ function createFinanceInteractionTypes(service) {
39
43
  },
40
44
  additionalProperties: false
41
45
  },
42
- handleResponse(ctx, _payload, response) {
46
+ handleResponse(ctx, payload, response) {
43
47
  if (ctx.request.context.scope.type !== "subject") return {
44
48
  ok: false,
45
49
  error: "Book selection requires a Conversation"
@@ -53,10 +57,11 @@ function createFinanceInteractionTypes(service) {
53
57
  ok: false,
54
58
  error: "A book must be selected"
55
59
  };
56
- const grant = service.bindSubjectGrant({
57
- subjectId: ctx.request.context.scope.subjectId,
60
+ const subjectId = ctx.request.context.scope.subjectId;
61
+ const grant = service.selectSubjectBook({
62
+ subjectId,
58
63
  bookId: response.bookId,
59
- ...response.expectedRevision !== void 0 ? { expectedRevision: response.expectedRevision } : {}
64
+ ...(payload.expectedRevision ?? response.expectedRevision) !== void 0 ? { expectedRevision: payload.expectedRevision ?? response.expectedRevision } : {}
60
65
  });
61
66
  if (response.makeDefault) service.setDefaultBook(grant.bookId);
62
67
  return {
@@ -175,15 +175,67 @@ function createFinanceTrustedControlRoute(finance, interaction, preferences) {
175
175
  return recoveryResponse(() => recovery[2] === "resume" ? finance.resumeCommit(recovery[1], hash, recoveryHash) : finance.endCommit(recovery[1], hash), "checking", recovery[2] === "resume" ? 202 : 200);
176
176
  }
177
177
  if (request.pathname === "/v1/finance/default-book" && request.method === "PUT") {
178
- const bookId = requiredIdentifier((await request.body()).bookId, "bookId");
178
+ const body = await request.body();
179
+ if (Object.keys(body).some((key) => key !== "bookId")) badRequest("Invalid default book request");
180
+ const bookId = body.bookId === null ? null : requiredIdentifier(body.bookId, "bookId");
179
181
  return json(200, { bookId: (await financeCall(() => finance.setDefaultBook(bookId))).bookId });
180
182
  }
183
+ const selection = request.pathname.match(/^\/v1\/finance\/subjects\/([A-Za-z0-9._-]+)\/grant\/selection(?:\/([A-Za-z0-9._-]+))?$/);
184
+ if (request.method === "POST" && selection) {
185
+ const subjectId = selection[1], requestId = selection[2];
186
+ const body = await request.body();
187
+ if (!requestId) {
188
+ if (Object.keys(body).length) badRequest("Book selection accepts an empty object");
189
+ const { books, defaultBookId } = finance.describeBooks({ subjectId });
190
+ const grant = finance.getGrant(subjectId) ?? null;
191
+ const revision = grant?.revision ?? 0;
192
+ const suggestedBookId = grant?.bookId ?? defaultBookId;
193
+ return json(200, {
194
+ request: publicInteraction(interaction.attention().flatMap((item) => item.kind === "interaction" ? [item.value] : []).find((item) => item.type === FinanceInteractionTypes.bookGrantSelection && item.context.scope.type === "subject" && item.context.scope.subjectId === subjectId && record(item.payload)?.expectedRevision === revision) ?? interaction.request({
195
+ type: FinanceInteractionTypes.bookGrantSelection,
196
+ context: {
197
+ scope: {
198
+ type: "subject",
199
+ subjectId
200
+ },
201
+ origin: { module: "finance" }
202
+ },
203
+ title: "选择会话账本",
204
+ summary: "确认当前会话可读取和编辑草稿的账本。",
205
+ payload: {
206
+ reason: "用户选择会话账本",
207
+ expectedRevision: revision,
208
+ ...suggestedBookId ? { suggestedBookId } : {}
209
+ }
210
+ })),
211
+ books,
212
+ grant,
213
+ defaultBookId
214
+ });
215
+ }
216
+ if (Object.keys(body).some((key) => ![
217
+ "decision",
218
+ "bookId",
219
+ "makeDefault"
220
+ ].includes(key))) badRequest("Invalid book selection response");
221
+ if (body.decision !== "confirm" && body.decision !== "cancel") badRequest("decision must be confirm or cancel");
222
+ if (body.decision === "confirm") requiredIdentifier(body.bookId, "bookId");
223
+ if (body.makeDefault !== void 0 && typeof body.makeDefault !== "boolean") badRequest("makeDefault must be a boolean");
224
+ if (!interaction.attention().flatMap((item) => item.kind === "interaction" ? [item.value] : []).find((item) => item.id === requestId && item.type === FinanceInteractionTypes.bookGrantSelection && item.context.scope.type === "subject" && item.context.scope.subjectId === subjectId)) throw new FinanceRouteError(409, "Book selection is no longer current; reopen Book access");
225
+ const result = await financeCall(() => interaction.respond(requestId, body));
226
+ return json(result.accepted ? 200 : 409, {
227
+ accepted: result.accepted,
228
+ ...result.error ? { error: result.error } : {},
229
+ grant: finance.getGrant(subjectId) ?? null,
230
+ defaultBookId: finance.getDefaultBook()
231
+ });
232
+ }
181
233
  const grant = request.pathname.match(/^\/v1\/finance\/subjects\/([A-Za-z0-9._-]+)\/grant$/);
182
234
  if (request.method === "PUT" && grant) {
183
235
  const body = await request.body();
184
236
  const bookId = requiredIdentifier(body.bookId, "bookId");
185
237
  const expectedRevision = body.expectedRevision === void 0 ? void 0 : requiredInteger(body.expectedRevision, "expectedRevision");
186
- return json(200, { grant: await financeCall(() => finance.bindSubjectGrant({
238
+ return json(200, { grant: await financeCall(() => finance.selectSubjectBook({
187
239
  subjectId: grant[1],
188
240
  bookId,
189
241
  ...expectedRevision !== void 0 ? { expectedRevision } : {}
@@ -386,6 +438,8 @@ async function financeCall(operation) {
386
438
  if (message === "checkpoint_not_found") throw new FinanceRouteError(404, "finance_checkpoint_not_found");
387
439
  if (message.includes("finance_workset_version_conflict") || message.includes("finance_workset_review_version_conflict") || message.includes("finance_entry_version_conflict") || message.includes("finance_draft_open_row_exists") || message.includes("finance_draft_book_mismatch") || message.includes("finance_draft_row_frozen") || message.includes("finance_grant_revision_conflict") || message.includes("finance_ledger_revision_conflict")) throw new FinanceRouteError(409, "Finance resource version changed; reload before continuing");
388
440
  if (message.includes("finance_workset_confirmation_pending")) throw new FinanceRouteError(409, "finance_workset_confirmation_pending");
441
+ if (message === "finance_draft_book_change_blocked") throw new FinanceRouteError(409, message);
442
+ if (message === "finance_book_not_found") throw new FinanceRouteError(404, message);
389
443
  if ([
390
444
  "finance_commit_operations_changed",
391
445
  "finance_commit_not_resumable",
@@ -20,7 +20,7 @@ import { createHash, randomUUID } from "node:crypto";
20
20
  //#region ../../packages/finance-module/src/service.ts
21
21
  const DEFAULT_BOOK_SETTING_KEY = "default_book_id";
22
22
  const FINANCE_REMOTE_WRITES_DISABLED_ERROR = "finance_remote_writes_disabled";
23
- const FINANCE_GRANT_MISSING_HINT = "finance_grant_missing: no active BookReadGrant for this subject. Call finance_books_list to inspect the books and the active grant, then create the finance.book_grant.selection interaction so the user can bind a book; do not retry other book tools.";
23
+ const FINANCE_GRANT_MISSING_HINT = "finance_grant_missing: no active BookReadGrant for this subject. Authorize a book in Ledger → 数据与同步 → 账本授权, or confirm the contextual book selection when a finance tool asks. If no books are listed, open the Ledger panel to log in and sync first. Do not retry other book tools before authorization.";
24
24
  function knownBook(ledger, bookId) {
25
25
  const books = ledger.cachedBooks();
26
26
  return Array.isArray(books) && books.some((book) => book?.id === bookId);
@@ -89,6 +89,18 @@ var FinanceApplicationService = class {
89
89
  getGrant(subjectId) {
90
90
  return this.options.store.getActiveGrant(subjectId);
91
91
  }
92
+ /** User selection must not strand a note bound to the previous grant. */
93
+ selectSubjectBook(input) {
94
+ if (!knownBook(this.options.ledger, input.bookId)) throw new Error("finance_book_not_found");
95
+ return this.options.store.transaction(() => {
96
+ const current = this.getGrant(input.subjectId);
97
+ const draft = this.options.store.getOpenDraftRow(input.subjectId);
98
+ if (draft?.entries.length && (current?.bookId !== input.bookId || draft.grantId !== current.id)) throw new Error("finance_draft_book_change_blocked");
99
+ const grant = this.bindSubjectGrant(input);
100
+ if (draft && !draft.entries.length && draft.grantId !== grant.id) this.options.store.deleteDraftRow(draft.id);
101
+ return grant;
102
+ });
103
+ }
92
104
  /** Prompt assembly is a pure read: it must not auto-bind the default book. */
93
105
  getModelFinanceContext(subjectId) {
94
106
  const grant = this.options.store.getActiveGrant(subjectId);
@@ -130,7 +142,7 @@ var FinanceApplicationService = class {
130
142
  return typeof value === "string" && value.trim() ? value : null;
131
143
  }
132
144
  setDefaultBook(bookId) {
133
- if (!knownBook(this.options.ledger, bookId)) throw new Error("finance_book_not_found");
145
+ if (bookId !== null && !knownBook(this.options.ledger, bookId)) throw new Error("finance_book_not_found");
134
146
  this.options.store.setSetting(DEFAULT_BOOK_SETTING_KEY, bookId, this.now());
135
147
  return { bookId };
136
148
  }
@@ -1816,7 +1828,7 @@ var FinanceApplicationService = class {
1816
1828
  requireGrant(subjectId, bookId, grantId) {
1817
1829
  const grant = this.ensureDefaultBookGrant(subjectId);
1818
1830
  if (!grant) throw new Error(FINANCE_GRANT_MISSING_HINT);
1819
- if (grant.bookId !== bookId || grantId && grant.id !== grantId) throw new Error(`finance_grant_book_mismatch: the active BookReadGrant covers book ${grant.bookId}, not ${bookId}. Rebind the book via the finance.book_grant.selection interaction instead of retrying other book tools.`);
1831
+ if (grant.bookId !== bookId || grantId && grant.id !== grantId) throw new Error(`finance_grant_book_mismatch: the active BookReadGrant covers book ${grant.bookId}, not ${bookId}. Switch the book from a financial draft or confirm the contextual book selection; do not retry with a mismatched book.`);
1820
1832
  return grant;
1821
1833
  }
1822
1834
  draftMutationOnce(context, operation, input, mutate) {
@@ -1,4 +1,4 @@
1
- import "../../finance/src/public-error.mjs";
1
+ import { FinancePublicError } from "../../finance/src/public-error.mjs";
2
2
  //#region ../../packages/finance-module/src/tool-contracts.ts
3
3
  const FINANCE_MODEL_TOOL_NAMES = Object.freeze([
4
4
  "finance_ledger_refresh",
@@ -39,4 +39,4 @@ function selectFinanceModelTools(definitions) {
39
39
  return selected;
40
40
  }
41
41
  //#endregion
42
- export { FINANCE_MODEL_TOOL_NAMES, selectFinanceModelTools };
42
+ export { FINANCE_MODEL_TOOL_NAMES, FinancePublicError, selectFinanceModelTools };
@@ -81,6 +81,7 @@ function openBusinessRuntime(options, cleanup, close) {
81
81
  resume();
82
82
  return {
83
83
  service,
84
+ interaction,
84
85
  preferences,
85
86
  ledger,
86
87
  tools,
@@ -1,6 +1,6 @@
1
1
  import { dataDirectory } from "../packages/data-maintenance/src/paths.mjs";
2
2
  import "../packages/data-maintenance/src/index.mjs";
3
- import { dshHomePath } from "../node_modules/.pnpm/@deepseek-ai_dsh-home-paths_159c15e70066431314381a350c2ee56a/node_modules/@deepseek-ai/dsh-home-paths/lib/index.mjs";
3
+ import { dshHomePath } from "../node_modules/.pnpm/@deepseek-ai_dsh-home-paths_43f382ed782d46f05123e7add538564e/node_modules/@deepseek-ai/dsh-home-paths/lib/index.mjs";
4
4
  import { join } from "node:path";
5
5
  //#region src/storage/paths.ts
6
6
  function resolveStoragePaths(configured) {
@@ -1,3 +1,126 @@
1
+ .book-grant-control {
2
+ display: inline-flex;
3
+ }
4
+
5
+ .book-grant-trigger {
6
+ border: 1px solid var(--line);
7
+ background: var(--surface);
8
+ color: var(--ink);
9
+ cursor: pointer;
10
+ font: inherit;
11
+ border-radius: 8px;
12
+ align-items: center;
13
+ gap: 6px;
14
+ padding: 5px 10px;
15
+ font-size: 12px;
16
+ display: inline-flex;
17
+ }
18
+
19
+ .book-grant-trigger svg {
20
+ width: 16px;
21
+ height: 16px;
22
+ }
23
+
24
+ .book-grant-trigger:hover {
25
+ background: var(--surface-soft);
26
+ }
27
+
28
+ .book-grant-trigger:focus-visible {
29
+ outline: 2px solid var(--blue);
30
+ outline-offset: 2px;
31
+ }
32
+
33
+ .book-grant-dialog {
34
+ box-sizing: border-box;
35
+ border: 1px solid var(--line);
36
+ width: min(480px, 100vw - 32px);
37
+ max-height: calc(100dvh - 32px);
38
+ color: var(--ink);
39
+ background: var(--surface);
40
+ border-radius: 14px;
41
+ padding: 24px;
42
+ overflow: auto;
43
+ }
44
+
45
+ .book-grant-dialog::backdrop {
46
+ background: #00000059;
47
+ }
48
+
49
+ .book-grant-dialog form {
50
+ gap: 16px;
51
+ display: grid;
52
+ }
53
+
54
+ .book-grant-dialog header, .book-grant-dialog footer, .book-grant-current-default {
55
+ justify-content: space-between;
56
+ align-items: center;
57
+ gap: 12px;
58
+ display: flex;
59
+ }
60
+
61
+ .book-grant-dialog h2 {
62
+ margin: 0;
63
+ font-size: 18px;
64
+ }
65
+
66
+ .book-grant-dialog p {
67
+ margin: 0;
68
+ font-size: 13px;
69
+ line-height: 1.6;
70
+ }
71
+
72
+ .book-grant-dialog select {
73
+ box-sizing: border-box;
74
+ border: 1px solid var(--line);
75
+ background: var(--surface);
76
+ width: 100%;
77
+ min-width: 0;
78
+ min-height: 36px;
79
+ color: var(--ink);
80
+ font: inherit;
81
+ border-radius: 8px;
82
+ padding: 6px 10px;
83
+ }
84
+
85
+ .book-grant-default {
86
+ align-items: flex-start;
87
+ gap: 8px;
88
+ font-size: 13px;
89
+ line-height: 1.5;
90
+ display: flex;
91
+ }
92
+
93
+ .book-grant-default input {
94
+ flex: none;
95
+ }
96
+
97
+ .book-grant-current-default {
98
+ flex-wrap: wrap;
99
+ font-size: 13px;
100
+ }
101
+
102
+ .book-grant-dialog [role="alert"] {
103
+ color: var(--danger);
104
+ }
105
+
106
+ .book-grant-dialog footer {
107
+ flex-wrap: wrap;
108
+ justify-content: flex-end;
109
+ }
110
+ .ledger-sync-tabs.ledger-sync-tabs {
111
+ box-sizing: border-box;
112
+ scrollbar-width: thin;
113
+ flex-wrap: nowrap;
114
+ min-width: 0;
115
+ max-width: 100%;
116
+ overflow-x: auto;
117
+ }
118
+
119
+ .ledger-sync-tabs.ledger-sync-tabs > button {
120
+ white-space: nowrap;
121
+ word-break: keep-all;
122
+ flex: none;
123
+ }
1
124
  .backup-recovery-page .page-head h1 {
2
125
  margin: 0 0 26px;
3
126
  font-size: 24px;
@@ -147,6 +270,105 @@
147
270
  padding: 22px;
148
271
  }
149
272
  }
273
+ .book-authorization-settings {
274
+ padding: 28px 0;
275
+ }
276
+
277
+ .book-authorization-settings > header {
278
+ align-items: center;
279
+ gap: 12px;
280
+ display: flex;
281
+ }
282
+
283
+ .book-authorization-settings h2 {
284
+ margin: 0;
285
+ font-size: 18px;
286
+ }
287
+
288
+ .book-authorization-settings > p {
289
+ color: var(--muted);
290
+ margin: 14px 0 28px;
291
+ font-size: 14px;
292
+ line-height: 1.7;
293
+ }
294
+
295
+ .book-authorization-status {
296
+ background: var(--surface-soft);
297
+ color: var(--muted);
298
+ border-radius: 12px;
299
+ padding: 3px 9px;
300
+ font-size: 12px;
301
+ }
302
+
303
+ .book-authorization-settings form {
304
+ gap: 24px;
305
+ display: grid;
306
+ }
307
+
308
+ .book-authorization-field {
309
+ align-items: center;
310
+ gap: 32px;
311
+ font-size: 14px;
312
+ display: flex;
313
+ }
314
+
315
+ .book-authorization-field select {
316
+ box-sizing: border-box;
317
+ border: 1px solid var(--line);
318
+ background: var(--surface);
319
+ width: min(360px, 100%);
320
+ min-width: 0;
321
+ color: var(--ink);
322
+ font: inherit;
323
+ border-radius: 8px;
324
+ padding: 9px 12px;
325
+ }
326
+
327
+ .book-authorization-remember {
328
+ align-items: flex-start;
329
+ gap: 8px;
330
+ font-size: 14px;
331
+ line-height: 1.6;
332
+ display: flex;
333
+ }
334
+
335
+ .book-authorization-remember input {
336
+ accent-color: var(--blue);
337
+ flex: none;
338
+ margin-top: 4px;
339
+ }
340
+
341
+ .book-authorization-note {
342
+ color: var(--muted);
343
+ margin: 0;
344
+ font-size: 13px;
345
+ line-height: 1.7;
346
+ }
347
+
348
+ .book-authorization-settings footer {
349
+ border-top: 1px solid var(--line);
350
+ flex-wrap: wrap;
351
+ justify-content: flex-end;
352
+ gap: 12px;
353
+ padding-top: 20px;
354
+ display: flex;
355
+ }
356
+
357
+ .book-authorization-settings [role="alert"] {
358
+ color: var(--danger);
359
+ }
360
+
361
+ @media (width <= 600px) {
362
+ .book-authorization-field {
363
+ flex-direction: column;
364
+ align-items: stretch;
365
+ gap: 8px;
366
+ }
367
+
368
+ .book-authorization-field select {
369
+ width: 100%;
370
+ }
371
+ }
150
372
  .first-run-card {
151
373
  max-width: 640px;
152
374
  padding: 24px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodpeanuts/dsh-sui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2-fix.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Ledger (随手记/feidee) plugin for DeepSeek Harness — finance tools and ledger UI",