dsh-openwrite 0.2.8
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 +201 -0
- package/README.md +107 -0
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/assets/logo-dark.svg +31 -0
- package/assets/logo-light.svg +31 -0
- package/cordis.patch.yml +11 -0
- package/docs/BENCHMARK_TASKS.md +54 -0
- package/docs/COST_MEASUREMENT.md +39 -0
- package/docs/DEVELOPMENT.md +65 -0
- package/docs/DSH_STORE.md +58 -0
- package/docs/FRAMEWORK_ADVANTAGES.md +288 -0
- package/docs/IMPROVEMENT_PLAN.md +252 -0
- package/docs/INSTALL.md +99 -0
- package/docs/LEARNING.md +68 -0
- package/docs/OPEN_SOURCE_NOVEL_AUDIT.md +191 -0
- package/docs/PLUGIN_MAINTENANCE.md +54 -0
- package/docs/PLUGIN_MAINTENANCE_RC7.md +157 -0
- package/docs/QA_20260908.md +103 -0
- package/docs/QA_20260909_BENCHMARK.md +24 -0
- package/docs/RELEASE_ACCEPTANCE.md +116 -0
- package/docs/REVIEW_DAG_FRAMEWORK.md +82 -0
- package/docs/TARGETED_NOVEL_PROJECT_REVIEW.md +167 -0
- package/docs/WORKFLOWS.md +74 -0
- package/docs/WORKSPACE_CONTEXT_CONTRACT.md +125 -0
- package/docs/WORKSPACE_INTEGRATION_GOAL.md +278 -0
- package/docs/research/autosave-race-repro.mjs +133 -0
- package/docs/research/framework-stats-2026-09-05.json +116 -0
- package/dog-tools.mjs +11 -0
- package/package.json +132 -0
- package/packages/openwrite-bridge/LICENSE +201 -0
- package/packages/openwrite-bridge/cordis.patch.yml +10 -0
- package/packages/openwrite-bridge/lib/client.d.ts +95 -0
- package/packages/openwrite-bridge/lib/client.js +193 -0
- package/packages/openwrite-bridge/lib/contracts-generated.d.ts +367 -0
- package/packages/openwrite-bridge/lib/contracts-generated.js +1764 -0
- package/packages/openwrite-bridge/lib/dog-delivery.d.ts +12 -0
- package/packages/openwrite-bridge/lib/dog-delivery.js +362 -0
- package/packages/openwrite-bridge/lib/dog-review.d.ts +50 -0
- package/packages/openwrite-bridge/lib/dog-review.js +470 -0
- package/packages/openwrite-bridge/lib/domain.d.ts +70 -0
- package/packages/openwrite-bridge/lib/domain.js +496 -0
- package/packages/openwrite-bridge/lib/index.d.ts +17 -0
- package/packages/openwrite-bridge/lib/index.js +89 -0
- package/packages/openwrite-bridge/lib/managed-runtime.d.ts +95 -0
- package/packages/openwrite-bridge/lib/managed-runtime.js +510 -0
- package/packages/openwrite-bridge/lib/preset-tools.d.ts +13 -0
- package/packages/openwrite-bridge/lib/preset-tools.js +18 -0
- package/packages/openwrite-bridge/lib/tool-policy.d.ts +6 -0
- package/packages/openwrite-bridge/lib/tool-policy.js +56 -0
- package/packages/openwrite-bridge/lib/tools.d.ts +24 -0
- package/packages/openwrite-bridge/lib/tools.js +2404 -0
- package/packages/openwrite-bridge/package.json +67 -0
- package/packages/studio-panel/LICENSE +21 -0
- package/packages/studio-panel/README.md +51 -0
- package/packages/studio-panel/cordis.patch.yml +5 -0
- package/packages/studio-panel/lib/client.js +158087 -0
- package/packages/studio-panel/lib/client.js.map +1 -0
- package/packages/studio-panel/lib/index.js +50 -0
- package/packages/studio-panel/lib/types/client/AssetEditor.d.ts +122 -0
- package/packages/studio-panel/lib/types/client/AssetsView.d.ts +43 -0
- package/packages/studio-panel/lib/types/client/BenchmarkView.d.ts +9 -0
- package/packages/studio-panel/lib/types/client/ContinuousReader.d.ts +13 -0
- package/packages/studio-panel/lib/types/client/CreationView.d.ts +6 -0
- package/packages/studio-panel/lib/types/client/DagCanvas.d.ts +11 -0
- package/packages/studio-panel/lib/types/client/DiscardDraftDialog.d.ts +8 -0
- package/packages/studio-panel/lib/types/client/DomainToolCard.d.ts +9 -0
- package/packages/studio-panel/lib/types/client/GraphView.d.ts +46 -0
- package/packages/studio-panel/lib/types/client/HeaderChrome.d.ts +18 -0
- package/packages/studio-panel/lib/types/client/LaunchOpenWrite.d.ts +13 -0
- package/packages/studio-panel/lib/types/client/LibraryView.d.ts +6 -0
- package/packages/studio-panel/lib/types/client/MarkdownText.d.ts +3 -0
- package/packages/studio-panel/lib/types/client/ModelView.d.ts +9 -0
- package/packages/studio-panel/lib/types/client/OperationsView.d.ts +6 -0
- package/packages/studio-panel/lib/types/client/OutlinePlans.d.ts +37 -0
- package/packages/studio-panel/lib/types/client/OutlineView.d.ts +29 -0
- package/packages/studio-panel/lib/types/client/ResearchView.d.ts +7 -0
- package/packages/studio-panel/lib/types/client/ReviewCard.d.ts +28 -0
- package/packages/studio-panel/lib/types/client/SceneWorkbench.d.ts +55 -0
- package/packages/studio-panel/lib/types/client/SearchView.d.ts +33 -0
- package/packages/studio-panel/lib/types/client/TasksView.d.ts +11 -0
- package/packages/studio-panel/lib/types/client/TransferWorkspaces.d.ts +19 -0
- package/packages/studio-panel/lib/types/client/TurnMutationSummary.d.ts +62 -0
- package/packages/studio-panel/lib/types/client/VditorBody.d.ts +55 -0
- package/packages/studio-panel/lib/types/client/WorkbenchStore.d.ts +121 -0
- package/packages/studio-panel/lib/types/client/api.d.ts +72 -0
- package/packages/studio-panel/lib/types/client/asset-drafts.d.ts +20 -0
- package/packages/studio-panel/lib/types/client/benchmark-options.d.ts +43 -0
- package/packages/studio-panel/lib/types/client/draft-store.d.ts +26 -0
- package/packages/studio-panel/lib/types/client/dto.d.ts +517 -0
- package/packages/studio-panel/lib/types/client/index.d.ts +4 -0
- package/packages/studio-panel/lib/types/client/locales.d.ts +15 -0
- package/packages/studio-panel/lib/types/client/manuscript-annotations.d.ts +59 -0
- package/packages/studio-panel/lib/types/client/manuscript-markers.d.ts +61 -0
- package/packages/studio-panel/lib/types/client/manuscript-mentions.d.ts +30 -0
- package/packages/studio-panel/lib/types/client/manuscript-overlay-dom.d.ts +7 -0
- package/packages/studio-panel/lib/types/client/manuscript-overlay.d.ts +42 -0
- package/packages/studio-panel/lib/types/client/manuscript-selection.d.ts +59 -0
- package/packages/studio-panel/lib/types/client/model-view-memory.d.ts +17 -0
- package/packages/studio-panel/lib/types/client/storage.d.ts +8 -0
- package/packages/studio-panel/lib/types/client/workbench-epochs.d.ts +16 -0
- package/packages/studio-panel/lib/types/client/workspace-context.d.ts +52 -0
- package/packages/studio-panel/lib/types/client/writing-scope.d.ts +7 -0
- package/packages/studio-panel/lib/types/index.d.ts +5 -0
- package/packages/studio-panel/package.json +105 -0
- package/packages/studio-panel/vendor/vditor/LICENSE +21 -0
- package/packages/studio-panel/vendor/vditor/dist/css/content-theme/dark.css +123 -0
- package/packages/studio-panel/vendor/vditor/dist/css/content-theme/light.css +101 -0
- package/packages/studio-panel/vendor/vditor/dist/index.css +1823 -0
- package/packages/studio-panel/vendor/vditor/dist/index.min.js +1 -0
- package/packages/studio-panel/vendor/vditor/dist/js/i18n/zh_CN.js +86 -0
- package/packages/studio-panel/vendor/vditor/dist/js/icons/ant.js +174 -0
- package/packages/studio-panel/vendor/vditor/dist/js/lute/lute.min.js +72 -0
- package/plugin.d.ts +3 -0
- package/plugin.mjs +80 -0
- package/presets/README.md +32 -0
- package/presets/openwrite/agent.cordis.yml +317 -0
- package/presets/openwrite/preset.yml +3 -0
- package/presets/openwrite/skills/canon/SKILL.md +15 -0
- package/presets/openwrite/skills/dialoguequality/SKILL.md +166 -0
- package/presets/openwrite/skills/dog-delivery-query/SKILL.md +40 -0
- package/presets/openwrite/skills/dog-import-query/SKILL.md +27 -0
- package/presets/openwrite/skills/dog-review-query/SKILL.md +40 -0
- package/presets/openwrite/skills/export-book/SKILL.md +14 -0
- package/presets/openwrite/skills/foreshadow/SKILL.md +14 -0
- package/presets/openwrite/skills/foreshadowing-system/SKILL.md +125 -0
- package/presets/openwrite/skills/learn/SKILL.md +24 -0
- package/presets/openwrite/skills/novel-creator/SKILL.md +88 -0
- package/presets/openwrite/skills/novel-creator/templates/beat_templates.yaml +179 -0
- package/presets/openwrite/skills/novel-creator/templates/example_usage.yaml +74 -0
- package/presets/openwrite/skills/novel-reviewer/SKILL.md +85 -0
- package/presets/openwrite/skills/oh-story-deslop/LICENSE +21 -0
- package/presets/openwrite/skills/oh-story-deslop/SKILL.md +36 -0
- package/presets/openwrite/skills/oh-story-deslop/agents/openai.yaml +4 -0
- package/presets/openwrite/skills/oh-story-deslop/references/method.md +22 -0
- package/presets/openwrite/skills/oh-story-long-analyze/LICENSE +21 -0
- package/presets/openwrite/skills/oh-story-long-analyze/SKILL.md +37 -0
- package/presets/openwrite/skills/oh-story-long-analyze/agents/openai.yaml +4 -0
- package/presets/openwrite/skills/oh-story-long-analyze/references/method.md +22 -0
- package/presets/openwrite/skills/oh-story-long-scan/LICENSE +21 -0
- package/presets/openwrite/skills/oh-story-long-scan/SKILL.md +36 -0
- package/presets/openwrite/skills/oh-story-long-scan/agents/openai.yaml +4 -0
- package/presets/openwrite/skills/oh-story-long-scan/references/method.md +21 -0
- package/presets/openwrite/skills/oh-story-long-write/LICENSE +21 -0
- package/presets/openwrite/skills/oh-story-long-write/SKILL.md +37 -0
- package/presets/openwrite/skills/oh-story-long-write/agents/openai.yaml +4 -0
- package/presets/openwrite/skills/oh-story-long-write/references/method.md +33 -0
- package/presets/openwrite/skills/oh-story-review/LICENSE +21 -0
- package/presets/openwrite/skills/oh-story-review/SKILL.md +36 -0
- package/presets/openwrite/skills/oh-story-review/agents/openai.yaml +4 -0
- package/presets/openwrite/skills/oh-story-review/references/method.md +25 -0
- package/presets/openwrite/skills/progress/SKILL.md +16 -0
- package/presets/openwrite/skills/review-chapter/SKILL.md +17 -0
- package/presets/openwrite/skills/revise-span/SKILL.md +16 -0
- package/presets/openwrite/skills/style-system/SKILL.md +135 -0
- package/presets/openwrite/skills/style-system/prompts/analyze_style.md +214 -0
- package/presets/openwrite/skills/style-system/prompts/batch_extract_style.md +66 -0
- package/presets/openwrite/skills/style-system/prompts/compose_style.md +83 -0
- package/presets/openwrite/skills/style-system/prompts/extract_style.md +84 -0
- package/presets/openwrite/skills/style-system/prompts/initialize_style.md +52 -0
- package/presets/openwrite/skills/style-system/templates/analysis_report.yaml +78 -0
- package/presets/openwrite/skills/style-system/templates/composed_style.md +96 -0
- package/presets/openwrite/skills/style-system/templates/extraction_report.yaml +80 -0
- package/presets/openwrite/skills/style-system/templates/fingerprint.yaml +61 -0
- package/presets/openwrite/skills/style-system/tools/README.md +33 -0
- package/presets/openwrite/skills/truth-validation/SKILL.md +119 -0
- package/presets/openwrite/skills/workflow-manager/SKILL.md +81 -0
- package/presets/openwrite/skills/world-query/SKILL.md +45 -0
- package/presets/openwrite/skills/write-next/SKILL.md +17 -0
- package/release/core-requirements.in +12 -0
- package/release/licenses/@deepseek-ai__cosmokit@1.8.3/LICENSE +21 -0
- package/release/licenses/@deepseek-ai__schemastery@3.18.2/LICENSE +21 -0
- package/release/licenses/@isaacs__fs-minipass@4.0.1/LICENSE +15 -0
- package/release/licenses/@standard-schema__spec@1.1.0/LICENSE +21 -0
- package/release/licenses/@types__d3-color@3.1.3/LICENSE +21 -0
- package/release/licenses/@types__d3-drag@3.0.7/LICENSE +21 -0
- package/release/licenses/@types__d3-interpolate@3.0.4/LICENSE +21 -0
- package/release/licenses/@types__d3-selection@3.0.11/LICENSE +21 -0
- package/release/licenses/@types__d3-transition@3.0.9/LICENSE +21 -0
- package/release/licenses/@types__d3-zoom@3.0.8/LICENSE +21 -0
- package/release/licenses/@xyflow__react@12.11.6/LICENSE +21 -0
- package/release/licenses/@xyflow__system@0.0.82/LICENSE +21 -0
- package/release/licenses/ajv-formats@3.0.1/LICENSE +21 -0
- package/release/licenses/ajv@8.20.0/LICENSE +22 -0
- package/release/licenses/chownr@3.0.0/LICENSE.md +63 -0
- package/release/licenses/classcat@5.0.5/LICENSE.md +7 -0
- package/release/licenses/commander@7.2.0/LICENSE +22 -0
- package/release/licenses/d3-array@3.2.4/LICENSE +13 -0
- package/release/licenses/d3-axis@3.0.0/LICENSE +13 -0
- package/release/licenses/d3-brush@3.0.0/LICENSE +13 -0
- package/release/licenses/d3-chord@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-color@3.1.0/LICENSE +13 -0
- package/release/licenses/d3-contour@4.0.2/LICENSE +13 -0
- package/release/licenses/d3-delaunay@6.0.4/LICENSE +14 -0
- package/release/licenses/d3-dispatch@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-drag@3.0.0/LICENSE +13 -0
- package/release/licenses/d3-dsv@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-ease@3.0.1/LICENSE +28 -0
- package/release/licenses/d3-fetch@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-force@3.0.0/LICENSE +13 -0
- package/release/licenses/d3-format@3.1.2/LICENSE +13 -0
- package/release/licenses/d3-geo@3.1.1/LICENSE +34 -0
- package/release/licenses/d3-hierarchy@3.1.2/LICENSE +13 -0
- package/release/licenses/d3-interpolate@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-path@3.1.0/LICENSE +13 -0
- package/release/licenses/d3-polygon@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-quadtree@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-random@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-scale-chromatic@3.1.0/LICENSE +28 -0
- package/release/licenses/d3-scale@4.0.2/LICENSE +13 -0
- package/release/licenses/d3-selection@3.0.0/LICENSE +13 -0
- package/release/licenses/d3-shape@3.2.0/LICENSE +13 -0
- package/release/licenses/d3-time-format@4.1.0/LICENSE +13 -0
- package/release/licenses/d3-time@3.1.0/LICENSE +13 -0
- package/release/licenses/d3-timer@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-transition@3.0.1/LICENSE +13 -0
- package/release/licenses/d3-zoom@3.0.0/LICENSE +13 -0
- package/release/licenses/d3@7.9.0/LICENSE +13 -0
- package/release/licenses/delaunator@5.1.0/LICENSE +15 -0
- package/release/licenses/elkjs@0.12.0/LICENSE.md +263 -0
- package/release/licenses/fast-deep-equal@3.1.3/LICENSE +21 -0
- package/release/licenses/fast-uri@3.1.7/LICENSE +30 -0
- package/release/licenses/fflate@0.8.2/LICENSE +21 -0
- package/release/licenses/graceful-fs@4.2.11/LICENSE +15 -0
- package/release/licenses/iconv-lite@0.6.3/LICENSE +21 -0
- package/release/licenses/internmap@2.0.3/LICENSE +13 -0
- package/release/licenses/json-schema-traverse@1.0.0/LICENSE +21 -0
- package/release/licenses/lucide-react@0.468.0/LICENSE +15 -0
- package/release/licenses/minipass@7.1.3/LICENSE.md +55 -0
- package/release/licenses/minizlib@3.1.0/LICENSE +26 -0
- package/release/licenses/proper-lockfile@4.1.2/LICENSE +21 -0
- package/release/licenses/require-from-string@2.0.2/license +21 -0
- package/release/licenses/retry@0.12.0/License +21 -0
- package/release/licenses/robust-predicates@3.0.3/LICENSE +24 -0
- package/release/licenses/rw@1.3.3/LICENSE +26 -0
- package/release/licenses/safer-buffer@2.1.2/LICENSE +21 -0
- package/release/licenses/signal-exit@3.0.7/LICENSE.txt +16 -0
- package/release/licenses/tar@7.5.7/LICENSE.md +55 -0
- package/release/licenses/use-sync-external-store@1.6.0/LICENSE +21 -0
- package/release/licenses/yallist@5.0.0/LICENSE.md +63 -0
- package/release/licenses/zustand@4.5.7/LICENSE +21 -0
- package/release/openwrite-5.8.1-py3-none-any.whl +0 -0
- package/release/platform-overrides.in +5 -0
- package/release/python-constraints.in +96 -0
- package/release/requirements.lock +2927 -0
- package/release/runtime-manifest.json +98 -0
- package/release/sdk-compatibility.json +240 -0
- package/release/source.json +859 -0
- package/release/wheels/cryptography-50.0.1-cp312-abi3-macosx_13_0_x86_64.whl +0 -0
- package/release/wheels/licenses/LICENSE.txt +177 -0
- package/release/wheels/provenance.json +15 -0
- package/scripts/dog/delivery-stage.js +32 -0
- package/scripts/dog/import-chapter.js +20 -0
- package/scripts/dog/import-record.js +35 -0
- package/scripts/dog/review-dimension.js +41 -0
- package/scripts/dog/review-record.js +42 -0
- package/scripts/maintenance.mjs +179 -0
- package/scripts/prepare.mjs +21 -0
- package/vendor/dsh-dog/LICENSE +29 -0
- package/vendor/dsh-dog/README.md +114 -0
- package/vendor/dsh-dog/UPSTREAM.md +22 -0
- package/vendor/dsh-dog/cordis.patch.yml +14 -0
- package/vendor/dsh-dog/lib/client.js +2898 -0
- package/vendor/dsh-dog/lib/client.js.map +1 -0
- package/vendor/dsh-dog/lib/core-BiEBMLz3.d.ts +495 -0
- package/vendor/dsh-dog/lib/core-DdfMcrB4.js +2074 -0
- package/vendor/dsh-dog/lib/core.d.ts +2 -0
- package/vendor/dsh-dog/lib/core.js +2 -0
- package/vendor/dsh-dog/lib/index.d.ts +133 -0
- package/vendor/dsh-dog/lib/index.js +967 -0
- package/vendor/dsh-dog/package.json +97 -0
- package/vendor/dsh-dog/schemas/schema-0.2/graph.schema.json +139 -0
- package/vendor/dsh-dog/schemas/schema-0.2/report.schema.json +87 -0
- package/vendor/dsh-dog/schemas/schema-0.2/run.schema.json +259 -0
- package/vendor/dsh-dog/schemas/schema-0.2/runtime-event.schema.json +105 -0
- package/vendor/dsh-dog/schemas/schema-0.2/verification.schema.json +40 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
const name = "@dsh-novel/studio-panel";
|
|
4
|
+
const VENDOR_ROUTE = "/studio-panel/vendor/vditor";
|
|
5
|
+
const VENDOR_FILES = {
|
|
6
|
+
"/LICENSE": "text/plain; charset=utf-8",
|
|
7
|
+
"/dist/index.css": "text/css; charset=utf-8",
|
|
8
|
+
"/dist/index.min.js": "text/javascript; charset=utf-8",
|
|
9
|
+
"/dist/css/content-theme/dark.css": "text/css; charset=utf-8",
|
|
10
|
+
"/dist/css/content-theme/light.css": "text/css; charset=utf-8",
|
|
11
|
+
"/dist/js/lute/lute.min.js": "text/javascript; charset=utf-8",
|
|
12
|
+
"/dist/js/icons/ant.js": "text/javascript; charset=utf-8",
|
|
13
|
+
"/dist/js/i18n/zh_CN.js": "text/javascript; charset=utf-8"
|
|
14
|
+
};
|
|
15
|
+
/** Browser UI loader plus same-origin static assets for the packaged editor engine. */
|
|
16
|
+
function apply(ctx) {
|
|
17
|
+
ctx.inject(["webServer"], (webCtx) => {
|
|
18
|
+
webCtx.effect(() => webCtx.webServer.register({
|
|
19
|
+
kind: "prefix",
|
|
20
|
+
path: VENDOR_ROUTE,
|
|
21
|
+
handler: async (req, res) => {
|
|
22
|
+
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
23
|
+
res.writeHead(405);
|
|
24
|
+
res.end();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const suffix = (req.url ?? "").slice(27).split("?")[0] ?? "";
|
|
28
|
+
const contentType = VENDOR_FILES[suffix];
|
|
29
|
+
if (contentType === void 0) {
|
|
30
|
+
res.writeHead(404);
|
|
31
|
+
res.end();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
const bytes = await readFile(new URL(`../vendor/vditor${suffix}`, import.meta.url));
|
|
36
|
+
res.writeHead(200, {
|
|
37
|
+
"content-type": contentType,
|
|
38
|
+
"cache-control": "public, max-age=31536000, immutable"
|
|
39
|
+
});
|
|
40
|
+
res.end(bytes);
|
|
41
|
+
} catch {
|
|
42
|
+
res.writeHead(404);
|
|
43
|
+
res.end();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}), "studio-panel: packaged Vditor assets");
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { VENDOR_ROUTE, apply, name };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset editor + create form for the 资产 tab. The write surface is exactly
|
|
3
|
+
* the server's contract (verified against OpenWrite tools/structured_assets.py
|
|
4
|
+
* create/update and tools/studio_application.py create_asset/update_asset):
|
|
5
|
+
*
|
|
6
|
+
* - Update: POST /api/assets/update { kind, id, revision, data } — `revision`
|
|
7
|
+
* is the optimistic lock (the detail's fingerprint); a stale revision
|
|
8
|
+
* answers 409 ASSET_CONFLICT. `data` merges into the front matter, filtered
|
|
9
|
+
* server-side to CHARACTER_FIELDS / WORLD_FIELDS (character: name, aliases,
|
|
10
|
+
* tier, summary, tags, personality, goal, fear, taboos, appearance, voice,
|
|
11
|
+
* current_state, organization, progression_system, progression_stage,
|
|
12
|
+
* detail_refs, related; world: name, kind, type, subtype, summary, status,
|
|
13
|
+
* tags, detail_refs, related). Relations edit through data.related as
|
|
14
|
+
* strings or { target, kind, note } dicts. Progression merges data into the
|
|
15
|
+
* YAML document (absent keys, e.g. stages, are preserved).
|
|
16
|
+
* - Create: POST /api/assets { kind, id, data } — id must match
|
|
17
|
+
* [A-Za-z0-9][A-Za-z0-9_.-]{0,79}; progression requires a non-empty stages
|
|
18
|
+
* list of { id, name } and kind in ability/rank/cultivation/career/
|
|
19
|
+
* reputation/curse/custom.
|
|
20
|
+
*/
|
|
21
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
22
|
+
/** The summary fields the editor needs from the parsed detail. */
|
|
23
|
+
export interface AssetEditorSource {
|
|
24
|
+
name: string;
|
|
25
|
+
summary: string;
|
|
26
|
+
aliases: string[];
|
|
27
|
+
tags: string[];
|
|
28
|
+
scalars: {
|
|
29
|
+
key: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}[];
|
|
32
|
+
/** List-typed whitelist fields (taboos/detail_refs), edited one entry per line. */
|
|
33
|
+
lists: {
|
|
34
|
+
key: string;
|
|
35
|
+
items: string[];
|
|
36
|
+
}[];
|
|
37
|
+
related: RelationDraft[];
|
|
38
|
+
/** The markdown body (body_markdown), edited with a preview toggle. */
|
|
39
|
+
body: string;
|
|
40
|
+
/**
|
|
41
|
+
* Derived relations (incoming edges and annotation-sourced entries) shown
|
|
42
|
+
* read-only in the editor. They live in OTHER assets' front matter (or in
|
|
43
|
+
* body annotations), so they are not editable here — but hiding them made
|
|
44
|
+
* the editor look broken next to the read view, which shows them.
|
|
45
|
+
*/
|
|
46
|
+
derivedRelations: DerivedRelation[];
|
|
47
|
+
}
|
|
48
|
+
/** One derived (non-editable) relation row for editor display. */
|
|
49
|
+
export interface DerivedRelation {
|
|
50
|
+
name: string;
|
|
51
|
+
note: string;
|
|
52
|
+
direction: 'outgoing' | 'incoming';
|
|
53
|
+
origin: string;
|
|
54
|
+
}
|
|
55
|
+
/** One editable frontmatter relation row. */
|
|
56
|
+
export interface RelationDraft {
|
|
57
|
+
target: string;
|
|
58
|
+
kind: string;
|
|
59
|
+
note: string;
|
|
60
|
+
}
|
|
61
|
+
/** A relation-target candidate from the loaded asset list. */
|
|
62
|
+
export interface RelationCandidate {
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
kind: string;
|
|
66
|
+
}
|
|
67
|
+
type TFunc = PropsLocale<'studio-panel'>['t'];
|
|
68
|
+
/**
|
|
69
|
+
* Localized label for any front-matter field key (edit form + read field
|
|
70
|
+
* table). List-typed keys delegate to the 索引 labels; unmapped keys fall
|
|
71
|
+
* back to the raw key — unknown fields are never hidden.
|
|
72
|
+
*/
|
|
73
|
+
export declare function fieldLabel(key: string, t: TFunc): string;
|
|
74
|
+
interface AssetEditorProps {
|
|
75
|
+
kind: string;
|
|
76
|
+
/** Current values from the freshly loaded detail (remount on epoch change resets the draft). */
|
|
77
|
+
source: AssetEditorSource;
|
|
78
|
+
candidates: readonly RelationCandidate[];
|
|
79
|
+
saving: boolean;
|
|
80
|
+
saveError: string | null;
|
|
81
|
+
conflict: boolean;
|
|
82
|
+
onSave: (data: Record<string, unknown>, bodyMarkdown: string) => void;
|
|
83
|
+
/** Single-field autosave on blur (Obsidian-style): AssetsView owns the revision chain. */
|
|
84
|
+
onFieldSave: (field: string, value: unknown) => void;
|
|
85
|
+
/** The field key whose single-field save is in flight (input stays interactive otherwise). */
|
|
86
|
+
fieldBusy: string | null;
|
|
87
|
+
onCancel: () => void;
|
|
88
|
+
onRefresh: () => void;
|
|
89
|
+
onDirtyChange?: (dirty: boolean) => void;
|
|
90
|
+
initialDraft?: AssetEditorDraft | undefined;
|
|
91
|
+
onDraftChange?: (draft: AssetEditorDraft, dirty: boolean) => void;
|
|
92
|
+
t: TFunc;
|
|
93
|
+
}
|
|
94
|
+
export interface AssetEditorDraft {
|
|
95
|
+
name: string;
|
|
96
|
+
summary: string;
|
|
97
|
+
aliasesText: string;
|
|
98
|
+
tagsText: string;
|
|
99
|
+
scalars: Record<string, string>;
|
|
100
|
+
related: RelationDraft[];
|
|
101
|
+
listsText: Record<string, string>;
|
|
102
|
+
newTarget: string;
|
|
103
|
+
newNote: string;
|
|
104
|
+
bodyDraft: string;
|
|
105
|
+
}
|
|
106
|
+
/** Read-write editor over one asset's allowed front-matter fields. */
|
|
107
|
+
export declare function AssetEditor({ kind, source, candidates, saving, saveError, conflict, onSave, onFieldSave, fieldBusy, onCancel, onRefresh, onDirtyChange, initialDraft, onDraftChange, t }: AssetEditorProps): import("react").JSX.Element;
|
|
108
|
+
interface NewAssetFormProps {
|
|
109
|
+
kind: 'character' | 'world' | 'progression';
|
|
110
|
+
busy: boolean;
|
|
111
|
+
error: string | null;
|
|
112
|
+
onSubmit: (payload: {
|
|
113
|
+
id: string;
|
|
114
|
+
data: Record<string, unknown>;
|
|
115
|
+
}) => void;
|
|
116
|
+
onCancel: () => void;
|
|
117
|
+
onDirtyChange?: (dirty: boolean) => void;
|
|
118
|
+
t: TFunc;
|
|
119
|
+
}
|
|
120
|
+
/** Inline create form for one asset kind (minimal required fields per the server contract). */
|
|
121
|
+
export declare function NewAssetForm({ kind, busy, error, onSubmit, onCancel, onDirtyChange, t }: NewAssetFormProps): import("react").JSX.Element;
|
|
122
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assets view (资产): OpenWrite's structured canon library (Studio's 资料库)
|
|
3
|
+
* rendered natively as an Obsidian-like master-detail layout — left sidebar
|
|
4
|
+
* (segment switcher, search, compact asset rows with collapsible 设定
|
|
5
|
+
* subcategory groups, 新建 button) + main detail pane (header, two-column
|
|
6
|
+
* fields, 索引, 关系, markdown body) with a read/edit toggle and inline
|
|
7
|
+
* creation. Only the asset domain is writable; manuscript/outline mutations
|
|
8
|
+
* stay with the agent tools.
|
|
9
|
+
*
|
|
10
|
+
* Wire shapes (verified against OpenWrite tools/studio_http.py do_GET,
|
|
11
|
+
* tools/structured_assets.py, tools/world_query.py get_asset_relation_view,
|
|
12
|
+
* tools/studio_application.py workspace/_document_groups/read_document):
|
|
13
|
+
* - GET /api/assets?kind=X — enveloped { ok, data: { assets: [...] } }.
|
|
14
|
+
* Summaries: character/world { kind, id, name, summary, asset_type,
|
|
15
|
+
* aliases, tags, path }; progression adds { stage_count }.
|
|
16
|
+
* - GET /api/assets/{kind}/{id} — enveloped detail { kind, id, name,
|
|
17
|
+
* data: <front-matter/YAML dict>, body_markdown, path, revision } +
|
|
18
|
+
* character/world only: relation_view { confirmed, registered, suggested,
|
|
19
|
+
* incoming, counts } with items { target, name, kind, note, origin,
|
|
20
|
+
* direction, resolved }.
|
|
21
|
+
* - POST /api/assets / POST /api/assets/update — the write contract lives in
|
|
22
|
+
* AssetEditor.tsx's header comment.
|
|
23
|
+
* - GET /api/workspace — NOT enveloped. documents.core[] is the 作品核心
|
|
24
|
+
* document list; operations.reference_library is the 参考作品 (reference
|
|
25
|
+
* works) list — Studio's data-view="deconstruct" surface, NOT the 资料库
|
|
26
|
+
* nav entry (which is this structured asset library).
|
|
27
|
+
* - GET /api/document?path=<p> — NOT enveloped { path, title, content, ... }.
|
|
28
|
+
*/
|
|
29
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
30
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
31
|
+
import { type StudioApiInjected } from './api.ts';
|
|
32
|
+
import { type AssetDraftContext } from './asset-drafts.ts';
|
|
33
|
+
/** Full assets-view props: conversation-view runtime share & injected fetch & locale seat. */
|
|
34
|
+
export type AssetsViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'> & {
|
|
35
|
+
refreshEpoch?: number;
|
|
36
|
+
draftContext?: AssetDraftContext | undefined;
|
|
37
|
+
onDraftStateChange?: (state: {
|
|
38
|
+
dirty: boolean;
|
|
39
|
+
busy: boolean;
|
|
40
|
+
discard: () => void;
|
|
41
|
+
}) => void;
|
|
42
|
+
};
|
|
43
|
+
export declare function AssetsView({ fetchStudioApi, postStudioApi, t, refreshEpoch, draftContext, onDraftStateChange }: AssetsViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { StudioApiInjected } from './api.ts';
|
|
4
|
+
type BenchmarkViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'> & {
|
|
5
|
+
initialRunId?: string;
|
|
6
|
+
refreshEpoch?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function BenchmarkView({ fetchStudioApi, postStudioApi, t, initialRunId, refreshEpoch }: BenchmarkViewProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StudioApiInjected } from './api.ts';
|
|
2
|
+
import type { ChapterSummary } from './WorkbenchStore.ts';
|
|
3
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
|
+
export interface ContinuousReaderProps extends PropsLocale<'studio-panel'> {
|
|
5
|
+
chapters: readonly ChapterSummary[];
|
|
6
|
+
activePath: string;
|
|
7
|
+
activeOccurrenceId: string;
|
|
8
|
+
readingOrderRevision: string;
|
|
9
|
+
fetchStudioApi: StudioApiInjected['fetchStudioApi'];
|
|
10
|
+
onOpenChapter: (path: string, occurrenceId: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/** Read-only, revision-labelled manuscript view over immutable reading occurrences. */
|
|
13
|
+
export declare function ContinuousReader({ chapters, activePath, activeOccurrenceId, readingOrderRevision, fetchStudioApi, onOpenChapter, t, }: ContinuousReaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import { type StudioApiInjected } from './api.ts';
|
|
4
|
+
export type CreationViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'>;
|
|
5
|
+
/** Native manuscript workbench: chapter rail, local Vditor editor and inspector. */
|
|
6
|
+
export declare function CreationView(props: CreationViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import 'dsh-react-flow-style';
|
|
2
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { StudioApiInjected } from './api.ts';
|
|
4
|
+
interface ReviewDagViewProps {
|
|
5
|
+
fetchStudioApi: StudioApiInjected['fetchStudioApi'];
|
|
6
|
+
postStudioApi: StudioApiInjected['postStudioApi'];
|
|
7
|
+
kind: 'review' | 'delivery';
|
|
8
|
+
t: PropsLocale<'studio-panel'>['t'];
|
|
9
|
+
}
|
|
10
|
+
export declare function ReviewDagView({ fetchStudioApi, postStudioApi, kind, t }: ReviewDagViewProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StudioPanelKey } from './locales.ts';
|
|
2
|
+
export interface DiscardDraftDialogProps {
|
|
3
|
+
onKeep: () => void;
|
|
4
|
+
onDiscard: () => void;
|
|
5
|
+
t: (key: StudioPanelKey) => string;
|
|
6
|
+
}
|
|
7
|
+
/** Mount while a navigation action is waiting for the draft decision. */
|
|
8
|
+
export declare function DiscardDraftDialog({ onKeep, onDiscard, t }: DiscardDraftDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
2
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
export type ToolFamily = 'status' | 'context' | 'manuscript' | 'revision' | 'task' | 'search' | 'asset' | 'outline';
|
|
4
|
+
type CardProps = ToolCallViewProps & PropsLocale<'studio-panel'> & {
|
|
5
|
+
family: ToolFamily;
|
|
6
|
+
};
|
|
7
|
+
export declare function DomainToolCard({ block, callId, toolName, family, openFile, t }: CardProps): import("react").JSX.Element;
|
|
8
|
+
export declare function createDomainToolCard(family: ToolFamily): (props: ToolCallViewProps & PropsLocale<"studio-panel">) => import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph view (图谱): OpenWrite continuity data as SVG and React Flow — the
|
|
3
|
+
* foreshadowing board (layered by 主线/支线/彩蛋, ordered by target chapter)
|
|
4
|
+
* and the interactive character/world relationship graph (circular seed layout).
|
|
5
|
+
* Read-only.
|
|
6
|
+
*
|
|
7
|
+
* Wire shape (verified against OpenWrite tools/novel_service.py continuity()
|
|
8
|
+
* + models/foreshadowing.py + tools/world_query.py get_relations_topology):
|
|
9
|
+
* GET /api/continuity answers WITHOUT an envelope —
|
|
10
|
+
* {
|
|
11
|
+
* truth: {...},
|
|
12
|
+
* foreshadowing: {
|
|
13
|
+
* // PENDING nodes only (get_pending_nodes: status 埋伏/待收, weight >= 1);
|
|
14
|
+
* // the stored DAG's edges are NOT exposed by this endpoint.
|
|
15
|
+
* nodes: [{ id, content, weight (1-10), layer (主线/支线/彩蛋),
|
|
16
|
+
* status (埋伏/待收), created_at, target_arc, target_section,
|
|
17
|
+
* target_chapter, tags }],
|
|
18
|
+
* total, by_status, by_layer, by_weight,
|
|
19
|
+
* },
|
|
20
|
+
* foreshadowing_validation: { valid, errors },
|
|
21
|
+
* relationship_graph: {
|
|
22
|
+
* nodes: [{ id, label, kind (character/faction/place/concept/.../unknown),
|
|
23
|
+
* type, status, description, unresolved }],
|
|
24
|
+
* edges: [{ id, source, target, label, kind, origin, confirmed,
|
|
25
|
+
* source_label }],
|
|
26
|
+
* truncated, ...
|
|
27
|
+
* },
|
|
28
|
+
* // 事实账本: three markdown DOCUMENTS (truth_manager.py TruthFiles), not
|
|
29
|
+
* // structured rows — rendered as-is with MarkdownText.
|
|
30
|
+
* truth: { current_state: string, ledger: string, relationships: string },
|
|
31
|
+
* // 章节工作流 (workflow_scheduler.py): stages carry
|
|
32
|
+
* // status pending/running/completed/failed/skipped.
|
|
33
|
+
* workflows: [{ chapter_id, current_stage, error,
|
|
34
|
+
* stages: [{ name, status, message }] }],
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* Sections (toolbar chips): 伏笔 (board + DAG validation errors), 关系图
|
|
38
|
+
* (kind-filtered interactive canvas), 事实账本 (the three truth documents), 工作流
|
|
39
|
+
* (per-chapter pipeline stages). All read-only.
|
|
40
|
+
*/
|
|
41
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
42
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
43
|
+
import type { StudioApiInjected } from './api.ts';
|
|
44
|
+
/** Full graph-view props: conversation-view runtime share & injected fetch & locale seat. */
|
|
45
|
+
export type GraphViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'>;
|
|
46
|
+
export declare function GraphView({ fetchStudioApi, postStudioApi, t }: GraphViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { StudioApiInjected } from './api.ts';
|
|
3
|
+
import { type StudioPanelInjected } from './workspace-context.ts';
|
|
4
|
+
type HeaderProps = PropsRuntime<'conversation.session.header.actions'> & PropsLocale<'studio-panel'>;
|
|
5
|
+
type UtilityProps = PropsRuntime<'conversation.session.header.utilities'> & PropsLocale<'studio-panel'> & Pick<StudioApiInjected, 'postStudioApi'>;
|
|
6
|
+
type ContextChipProps = PropsRuntime<'conversation.input.left'> & PropsLocale<'studio-panel'> & Pick<StudioPanelInjected, 'postStudioApi' | 'workspaces' | 'sessions'>;
|
|
7
|
+
export declare function HeaderProjectStatus({ t }: HeaderProps): import("react").JSX.Element;
|
|
8
|
+
export declare function HeaderUtilities({ postStudioApi, t }: UtilityProps): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Input-bar Workspace chip: reflects the session's dsh Workspace binding and
|
|
11
|
+
* owns binding it into the WorkbenchStore context barrier. When the binding
|
|
12
|
+
* needs action it is a button opening a small popover: an unbound session
|
|
13
|
+
* gets the directory-pick attach flow; a bound-but-uninitialized workspace
|
|
14
|
+
* gets the inline init form (novel id + title, pinned to the canonical
|
|
15
|
+
* path). An initialized workspace renders read-only.
|
|
16
|
+
*/
|
|
17
|
+
export declare function WorkspaceContextChip(props: ContextChipProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Status {
|
|
2
|
+
phase: string;
|
|
3
|
+
message?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
downloadedBytes?: number;
|
|
6
|
+
totalBytes?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function runtimeAction(action: string): Promise<Status>;
|
|
9
|
+
export declare function LaunchOpenWrite({ wide, openWorkspace }: {
|
|
10
|
+
wide: boolean;
|
|
11
|
+
openWorkspace: (path?: string) => Promise<boolean>;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { StudioApiInjected } from './api.ts';
|
|
4
|
+
export type LibraryViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'>;
|
|
5
|
+
/** One native library shell over canon, outline, continuity, research and search. */
|
|
6
|
+
export declare function LibraryView(props: LibraryViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ConvViewProps } from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
2
|
+
import type { InjectFace, PropsLocale } from "@deepseek-ai/dsh-client-ui-slots";
|
|
3
|
+
import { type StudioApiInjected } from "./api.ts";
|
|
4
|
+
export type ModelNavigationGuard = (navigate: () => void) => void;
|
|
5
|
+
type Props = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<"studio-panel"> & {
|
|
6
|
+
onNavigationGuardChange?: (guard: ModelNavigationGuard | null) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function ModelView({ fetchStudioApi, postStudioApi, t, onNavigationGuardChange }: Props): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import { type StudioPanelInjected } from './workspace-context.ts';
|
|
4
|
+
export type OperationsViewProps = ConvViewProps & InjectFace<StudioPanelInjected> & PropsLocale<'studio-panel'>;
|
|
5
|
+
/** Background jobs plus the less frequent transfer/maintenance commands. */
|
|
6
|
+
export declare function OperationsView(props: OperationsViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 预演大纲数据面(供 OutlineView 以“树内接续”方式渲染)。
|
|
3
|
+
*
|
|
4
|
+
* 每套预演 = 一棵和正式大纲一样语法的迷你树(卷/篇/节/章),并携带“构思”。
|
|
5
|
+
* OutlineView 把它的顶层节点接到正式大纲当前卷的末尾——除颜色外与正式树完全一致。
|
|
6
|
+
*/
|
|
7
|
+
export interface PlanTreeNode {
|
|
8
|
+
id: string;
|
|
9
|
+
kind: 'act' | 'section' | 'chapter';
|
|
10
|
+
label: string;
|
|
11
|
+
title: string;
|
|
12
|
+
summary: string;
|
|
13
|
+
children: PlanTreeNode[];
|
|
14
|
+
}
|
|
15
|
+
export interface PlanInfo {
|
|
16
|
+
id: string;
|
|
17
|
+
kind: 'rolling' | 'branch';
|
|
18
|
+
label: string;
|
|
19
|
+
idea: string;
|
|
20
|
+
meta: string;
|
|
21
|
+
nodes: PlanTreeNode[];
|
|
22
|
+
/** rolling 草案专用:正文 / revision / state(供编辑、删除、并入) */
|
|
23
|
+
proposal?: string;
|
|
24
|
+
revision?: string;
|
|
25
|
+
state?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const PLAN_PALETTES: {
|
|
28
|
+
accent: string;
|
|
29
|
+
bar: string;
|
|
30
|
+
bg: string;
|
|
31
|
+
}[];
|
|
32
|
+
export declare function planColor(index: number): {
|
|
33
|
+
accent: string;
|
|
34
|
+
bar: string;
|
|
35
|
+
bg: string;
|
|
36
|
+
};
|
|
37
|
+
export declare function loadPlans(postStudioApi: (path: string, body: unknown) => Promise<unknown>): Promise<PlanInfo[]>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outline view (大纲): the OpenWrite outline tree rendered natively — AND
|
|
3
|
+
* editable in place, Obsidian-style: titles and body blocks render as
|
|
4
|
+
* borderless inputs that look identical to plain text; click into them and
|
|
5
|
+
* type. Commits ride the revision-guarded atomic tree editor
|
|
6
|
+
* (POST /api/outline/edit; operations verified against OpenWrite
|
|
7
|
+
* tools/outline_tree.py mutate_outline_structure):
|
|
8
|
+
*
|
|
9
|
+
* - title input blur/Enter → rename (chapters must carry a number)
|
|
10
|
+
* - body textarea blur → update_summary (updates prose synopsis, preserving metadata)
|
|
11
|
+
* - hover buttons → add_child / add_after / delete (server renumbers on delete)
|
|
12
|
+
* - toolbar → add a top-level volume (add_child with empty node_id)
|
|
13
|
+
*
|
|
14
|
+
* Commit semantics: optimistic local patch + silent revision bump on success
|
|
15
|
+
* (no tree re-render — focus and scroll survive); 409 reloads the tree and
|
|
16
|
+
* asks for a retry; other failures revert the field and toast the server
|
|
17
|
+
* message. A chapter rename changes its node id server-side, so a follow-up
|
|
18
|
+
* op on the same node may 404 — the error path reloads and the user retries.
|
|
19
|
+
*
|
|
20
|
+
* Wire shape (verified against OpenWrite tools/outline_tree.py
|
|
21
|
+
* build_outline_structure): GET /api/outline answers WITHOUT an envelope —
|
|
22
|
+
* { path, revision, roots, counts, drafted_chapters, recommendation }.
|
|
23
|
+
*/
|
|
24
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
25
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
26
|
+
import { type StudioApiInjected } from './api.ts';
|
|
27
|
+
/** Full outline-view props: conversation-view runtime share & injected fetch & locale seat. */
|
|
28
|
+
export type OutlineViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'>;
|
|
29
|
+
export declare function OutlineView({ fetchStudioApi, postStudioApi, t }: OutlineViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { StudioApiInjected } from './api.ts';
|
|
4
|
+
export type ResearchViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'> & {
|
|
5
|
+
initialReportId?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function ResearchView({ fetchStudioApi, postStudioApi, t, initialReportId }: ResearchViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* novel_review_chapter toolview: the OpenWrite multi-dimensional chapter
|
|
3
|
+
* review as a readable report card. Registrant posture over the keyed
|
|
4
|
+
* tool.call.toolview hole — imports the slot contract only, never the chat
|
|
5
|
+
* domain (the bash-sample.tsx pattern).
|
|
6
|
+
*
|
|
7
|
+
* Wire shape (verified against OpenWrite tools/chapter_pipeline.py review
|
|
8
|
+
* stage + tools/review_store.py normalize_review_issues): the tool value is
|
|
9
|
+
* { result: { ok, chapter_id, passed, score, review_v2, issues: <count int>,
|
|
10
|
+
* summary, issue_details: [...], strict, dimensions, ... }, workspace: {...} }.
|
|
11
|
+
* Review v2 is authoritative for quality score, coverage, gate, and delivery.
|
|
12
|
+
* Issue review severity (critical/warning/info) is independent from revision
|
|
13
|
+
* priority (blocker/high/medium/low).
|
|
14
|
+
*
|
|
15
|
+
* Anything unexpected (running call, non-JSON output, missing fields) falls
|
|
16
|
+
* back to the raw pretty-JSON card — the review text is never swallowed.
|
|
17
|
+
*/
|
|
18
|
+
import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
19
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
20
|
+
/** Review card props: the toolview runtime share plus the standard locale seat. */
|
|
21
|
+
type ReviewCardProps = ToolCallViewProps & PropsLocale<'studio-panel'>;
|
|
22
|
+
/**
|
|
23
|
+
* The review card: collapsed summary row (tool · chapter · score · verdict)
|
|
24
|
+
* toggling the expanded report — verdict banner, summary, then issue groups
|
|
25
|
+
* with severity badges, quotes, and suggestions.
|
|
26
|
+
*/
|
|
27
|
+
export declare function NovelReviewCard({ block, t }: ReviewCardProps): import("react").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type StudioApiInjected } from './api.ts';
|
|
2
|
+
type StructureStatus = 'absent' | 'current' | 'stale' | 'ambiguous';
|
|
3
|
+
interface SceneIssue {
|
|
4
|
+
key: string;
|
|
5
|
+
message: string;
|
|
6
|
+
code: string;
|
|
7
|
+
sceneId: string;
|
|
8
|
+
chapterId: string;
|
|
9
|
+
}
|
|
10
|
+
interface SceneRecord {
|
|
11
|
+
id: string;
|
|
12
|
+
chapterId: string;
|
|
13
|
+
chapterTitle: string;
|
|
14
|
+
title: string;
|
|
15
|
+
storyTimeSortKey: string;
|
|
16
|
+
storyTimeLabel: string;
|
|
17
|
+
characters: string[];
|
|
18
|
+
locations: string[];
|
|
19
|
+
events: string[];
|
|
20
|
+
revision: string;
|
|
21
|
+
chapterRevision: string;
|
|
22
|
+
readingIndex: number;
|
|
23
|
+
storyTimeIndex: number;
|
|
24
|
+
chapterIndex: number;
|
|
25
|
+
}
|
|
26
|
+
interface SceneChapter {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
revision: string;
|
|
30
|
+
sceneCount: number;
|
|
31
|
+
}
|
|
32
|
+
interface SceneStructure {
|
|
33
|
+
schemaVersion: string;
|
|
34
|
+
status: StructureStatus;
|
|
35
|
+
revision: string;
|
|
36
|
+
scenes: SceneRecord[];
|
|
37
|
+
chapters: SceneChapter[];
|
|
38
|
+
issues: SceneIssue[];
|
|
39
|
+
plannedMissingChapters: number;
|
|
40
|
+
mutationAllowed: boolean;
|
|
41
|
+
}
|
|
42
|
+
interface MigrationPreview {
|
|
43
|
+
schemaVersion: string;
|
|
44
|
+
revision: string;
|
|
45
|
+
rows: string[];
|
|
46
|
+
issues: SceneIssue[];
|
|
47
|
+
canApply: boolean;
|
|
48
|
+
}
|
|
49
|
+
export type SceneWorkbenchProps = Pick<StudioApiInjected, 'fetchStudioApi' | 'postStudioApi'>;
|
|
50
|
+
/** Normalize the scene envelope without turning planned-missing chapters into scenes. */
|
|
51
|
+
export declare function parseSceneStructure(value: unknown): SceneStructure;
|
|
52
|
+
export declare function parseMigrationPreview(value: unknown): MigrationPreview | null;
|
|
53
|
+
/** Native scene-structure editor. All mutations are guarded by envelope and chapter revisions. */
|
|
54
|
+
export declare function SceneWorkbench({ fetchStudioApi, postStudioApi }: SceneWorkbenchProps): import("react").JSX.Element;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search view (搜索): native project search over the OpenWrite library —
|
|
3
|
+
* debounced query input + scope selector, results with the query highlighted
|
|
4
|
+
* in the snippet. Click-to-read: any result opens an inline preview pane
|
|
5
|
+
* (document via GET /api/document?path=…, hit line highlighted). GET-only;
|
|
6
|
+
* this is the panel's one interactive (non-mutating) view.
|
|
7
|
+
*
|
|
8
|
+
* Wire shape (verified against OpenWrite tools/studio_http.py do_GET +
|
|
9
|
+
* tools/studio_application.py search_project + tools/project_search.py
|
|
10
|
+
* ProjectSearchIndex.search + tools/library_catalog.py scopes):
|
|
11
|
+
* GET /api/search?q=<query>&scope=<scope>&limit=<n> answers WITHOUT an
|
|
12
|
+
* envelope —
|
|
13
|
+
* {
|
|
14
|
+
* query, scope, scope_label,
|
|
15
|
+
* results: [{ path, title, line, heading, snippet, scope, scope_label,
|
|
16
|
+
* category, category_label, score, retrieval: [...], excerpt }],
|
|
17
|
+
* indexed, engine (lightrag/literal-fallback/none),
|
|
18
|
+
* warning, warning_code, retrieval_stats, index_updates, embedding,
|
|
19
|
+
* }
|
|
20
|
+
* GET /api/document?path=<p> answers WITHOUT an envelope —
|
|
21
|
+
* { path, title, content, version, revision, ... } (any project document:
|
|
22
|
+
* outline / manuscript chapters / character & world sources).
|
|
23
|
+
* Canonical scopes (library_catalog.py CANONICAL_SEARCH_SCOPES): all /
|
|
24
|
+
* outline / core / characters / settings / continuity / chapters / sources.
|
|
25
|
+
* The payload carries no match offsets, so highlighting re-matches the
|
|
26
|
+
* (server-normalized) query inside the snippet client-side.
|
|
27
|
+
*/
|
|
28
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
29
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
30
|
+
import { type StudioApiInjected } from './api.ts';
|
|
31
|
+
/** Full search-view props: conversation-view runtime share & injected fetch & locale seat. */
|
|
32
|
+
export type SearchViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'>;
|
|
33
|
+
export declare function SearchView({ fetchStudioApi, postStudioApi, t }: SearchViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { StudioApiInjected } from './api.ts';
|
|
4
|
+
export interface NavigationRequest {
|
|
5
|
+
view: 'benchmark' | 'research';
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export type TasksViewProps = ConvViewProps & InjectFace<StudioApiInjected> & PropsLocale<'studio-panel'> & {
|
|
9
|
+
onNavigate?: (target: NavigationRequest) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function TasksView({ fetchStudioApi, postStudioApi, t, onNavigate }: TasksViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
|
+
import type { OperationsViewProps } from './OperationsView.tsx';
|
|
3
|
+
import type { StudioPanelInjected } from './workspace-context.ts';
|
|
4
|
+
type TransferT = OperationsViewProps['t'];
|
|
5
|
+
type Note = (message: string, bad?: boolean) => void;
|
|
6
|
+
interface WorkspaceProps extends Pick<StudioPanelInjected, 'fetchStudioApi' | 'postStudioApi'> {
|
|
7
|
+
t: TransferT;
|
|
8
|
+
busy: string;
|
|
9
|
+
setBusy: Dispatch<SetStateAction<string>>;
|
|
10
|
+
say: Note;
|
|
11
|
+
workspaceReady: boolean;
|
|
12
|
+
tasksEpoch: number;
|
|
13
|
+
workspaceEpoch: number;
|
|
14
|
+
}
|
|
15
|
+
interface ArchiveWorkspaceProps extends WorkspaceProps, Pick<StudioPanelInjected, 'workspaces'> {
|
|
16
|
+
}
|
|
17
|
+
export declare function ManuscriptImportWorkspace(props: WorkspaceProps): import("react").JSX.Element;
|
|
18
|
+
export declare function ProjectArchiveWorkspace(props: ArchiveWorkspaceProps): import("react").JSX.Element;
|
|
19
|
+
export {};
|