dsh-openwrite 0.2.28 → 0.2.33

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.
Files changed (125) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +49 -8
  3. package/THIRD_PARTY_NOTICES.md +4 -3
  4. package/companions.mjs +508 -0
  5. package/cordis.patch.yml +0 -2
  6. package/docs/CLOSED_ISSUE_FOLLOWUPS.md +1 -1
  7. package/docs/COMPANION_PLUGINS.md +142 -0
  8. package/docs/CONTEXT_SLOTS.md +1 -1
  9. package/docs/COST_MEASUREMENT.md +2 -2
  10. package/docs/DEVELOPMENT.md +6 -11
  11. package/docs/DSH_STORE.md +14 -2
  12. package/docs/EDITOR_SAFETY_REPAIRS.md +2 -2
  13. package/docs/INSTALL.md +112 -4
  14. package/docs/ISSUES_121_123.md +4 -4
  15. package/docs/ISSUES_140_142.md +58 -0
  16. package/docs/ISSUES_149_150_151.md +77 -0
  17. package/docs/ISSUE_123_FOLLOWUP.md +3 -2
  18. package/docs/ISSUE_146_REVIEW_EVIDENCE.md +53 -0
  19. package/docs/LEARNING.md +1 -1
  20. package/docs/MOBILE_READINESS.md +62 -0
  21. package/docs/PLUGIN_MAINTENANCE.md +1 -3
  22. package/docs/RELEASE_ACCEPTANCE.md +20 -3
  23. package/docs/REVIEW_ROUND_22.md +67 -0
  24. package/docs/REVIEW_ROUND_23.md +48 -0
  25. package/docs/REVIEW_ROUND_25.md +51 -0
  26. package/docs/SELECTION_UPGRADE_REPAIRS.md +2 -2
  27. package/docs/TOOLS.md +181 -604
  28. package/docs/WORKFLOWS.md +5 -5
  29. package/package.json +17 -21
  30. package/packages/openwrite-bridge/lib/client.d.ts +0 -1
  31. package/packages/openwrite-bridge/lib/client.js +90 -9
  32. package/packages/openwrite-bridge/lib/contracts-generated.js +2 -1
  33. package/packages/openwrite-bridge/lib/dog-delivery.d.ts +1 -0
  34. package/packages/openwrite-bridge/lib/dog-delivery.js +3 -1
  35. package/packages/openwrite-bridge/lib/dog-review.js +15 -3
  36. package/packages/openwrite-bridge/lib/domain.d.ts +27 -0
  37. package/packages/openwrite-bridge/lib/domain.js +250 -29
  38. package/packages/openwrite-bridge/lib/host-llm.d.ts +188 -0
  39. package/packages/openwrite-bridge/lib/host-llm.js +657 -0
  40. package/packages/openwrite-bridge/lib/host-web.d.ts +61 -0
  41. package/packages/openwrite-bridge/lib/host-web.js +166 -0
  42. package/packages/openwrite-bridge/lib/index.d.ts +4 -0
  43. package/packages/openwrite-bridge/lib/index.js +150 -6
  44. package/packages/openwrite-bridge/lib/managed-runtime.d.ts +47 -2
  45. package/packages/openwrite-bridge/lib/managed-runtime.js +176 -34
  46. package/packages/openwrite-bridge/lib/tool-policy.js +37 -12
  47. package/packages/openwrite-bridge/lib/tools.js +1223 -1227
  48. package/packages/openwrite-bridge/package.json +7 -5
  49. package/packages/studio-panel/lib/client.js +123207 -121534
  50. package/packages/studio-panel/lib/client.js.map +1 -1
  51. package/packages/studio-panel/lib/types/client/LaunchOpenWrite.d.ts +10 -0
  52. package/packages/studio-panel/lib/types/client/ModelView.d.ts +28 -4
  53. package/packages/studio-panel/lib/types/client/OpenWriteSettings.d.ts +64 -0
  54. package/packages/studio-panel/lib/types/client/SceneWorkbench.d.ts +2 -0
  55. package/packages/studio-panel/lib/types/client/SearchSettings.d.ts +2 -0
  56. package/packages/studio-panel/lib/types/client/SerialWritingView.d.ts +2 -1
  57. package/packages/studio-panel/lib/types/client/TurnMutationSummary.d.ts +2 -0
  58. package/packages/studio-panel/lib/types/client/VditorBody.d.ts +1 -1
  59. package/packages/studio-panel/lib/types/client/api.d.ts +41 -2
  60. package/packages/studio-panel/lib/types/client/browser-download.d.ts +4 -0
  61. package/packages/studio-panel/lib/types/client/companions.d.ts +46 -0
  62. package/packages/studio-panel/lib/types/client/dto.d.ts +22 -0
  63. package/packages/studio-panel/lib/types/client/locales.d.ts +1 -1
  64. package/packages/studio-panel/lib/types/client/workspace-chrome.d.ts +41 -0
  65. package/packages/studio-panel/package.json +5 -3
  66. package/plugin.mjs +159 -20
  67. package/preset-definition.mjs +144 -4
  68. package/presets/openwrite/agent.cordis.yml +7 -9
  69. package/presets/openwrite/ops-integration.mjs +28 -0
  70. package/presets/openwrite/preset.yml +2 -1
  71. package/presets/openwrite/skills/canon/SKILL.md +3 -3
  72. package/presets/openwrite/skills/delivery-artifact-query/SKILL.md +41 -0
  73. package/presets/openwrite/skills/dialoguequality/SKILL.md +16 -17
  74. package/presets/openwrite/skills/dog-delivery-verification/SKILL.md +113 -0
  75. package/presets/openwrite/skills/export-book/SKILL.md +3 -3
  76. package/presets/openwrite/skills/foreshadow/SKILL.md +1 -1
  77. package/presets/openwrite/skills/foreshadowing-system/SKILL.md +16 -25
  78. package/presets/openwrite/skills/import-artifact-query/SKILL.md +30 -0
  79. package/presets/openwrite/skills/learn/SKILL.md +3 -3
  80. package/presets/openwrite/skills/novel-creator/SKILL.md +10 -10
  81. package/presets/openwrite/skills/novel-reviewer/SKILL.md +11 -11
  82. package/presets/openwrite/skills/progress/SKILL.md +1 -1
  83. package/presets/openwrite/skills/review-artifact-query/SKILL.md +41 -0
  84. package/presets/openwrite/skills/review-chapter/SKILL.md +2 -2
  85. package/presets/openwrite/skills/revise-span/SKILL.md +5 -5
  86. package/presets/openwrite/skills/style-system/SKILL.md +13 -6
  87. package/presets/openwrite/skills/truth-validation/SKILL.md +9 -12
  88. package/presets/openwrite/skills/workflow-manager/SKILL.md +13 -13
  89. package/presets/openwrite/skills/world-query/SKILL.md +16 -11
  90. package/presets/openwrite/skills/write-next/SKILL.md +1 -1
  91. package/release/{openwrite-5.8.20-py3-none-any.whl → openwrite-5.8.30-py3-none-any.whl} +0 -0
  92. package/release/runtime-manifest.json +4 -13
  93. package/release/source.json +21 -21
  94. package/release/wheels/licenses/OPENSSL-3.6.3-LICENSE.txt +225 -0
  95. package/scripts/maintenance.mjs +67 -7
  96. package/scripts/plugin-doctor.mjs +179 -0
  97. package/scripts/prepare.mjs +11 -2
  98. package/scripts/safe-upgrade.mjs +38 -5
  99. package/dog-tools.mjs +0 -13
  100. package/presets/openwrite/skills/dog-delivery-query/SKILL.md +0 -42
  101. package/presets/openwrite/skills/dog-import-query/SKILL.md +0 -29
  102. package/presets/openwrite/skills/dog-review-query/SKILL.md +0 -42
  103. package/scripts/dog/delivery-stage.js +0 -32
  104. package/scripts/dog/import-chapter.js +0 -20
  105. package/scripts/dog/import-record.js +0 -35
  106. package/scripts/dog/review-dimension.js +0 -41
  107. package/scripts/dog/review-record.js +0 -42
  108. package/vendor/dsh-dog/LICENSE +0 -29
  109. package/vendor/dsh-dog/README.md +0 -114
  110. package/vendor/dsh-dog/UPSTREAM.md +0 -30
  111. package/vendor/dsh-dog/cordis.patch.yml +0 -14
  112. package/vendor/dsh-dog/lib/client.js +0 -2960
  113. package/vendor/dsh-dog/lib/client.js.map +0 -1
  114. package/vendor/dsh-dog/lib/core--byUPJL8.js +0 -2191
  115. package/vendor/dsh-dog/lib/core-BiEBMLz3.d.ts +0 -495
  116. package/vendor/dsh-dog/lib/core.d.ts +0 -2
  117. package/vendor/dsh-dog/lib/core.js +0 -2
  118. package/vendor/dsh-dog/lib/index.d.ts +0 -143
  119. package/vendor/dsh-dog/lib/index.js +0 -1230
  120. package/vendor/dsh-dog/package.json +0 -110
  121. package/vendor/dsh-dog/schemas/schema-0.2/graph.schema.json +0 -139
  122. package/vendor/dsh-dog/schemas/schema-0.2/report.schema.json +0 -87
  123. package/vendor/dsh-dog/schemas/schema-0.2/run.schema.json +0 -259
  124. package/vendor/dsh-dog/schemas/schema-0.2/runtime-event.schema.json +0 -105
  125. package/vendor/dsh-dog/schemas/schema-0.2/verification.schema.json +0 -40
@@ -1,114 +0,0 @@
1
- # @dsh-external/dsh-dog
2
-
3
- **DAG of Goals (DoG)** — turn a *non-formal* goal ("make a high-quality deck", "write a truly good article") into a DAG of independently verifiable subgoals, and let each subgoal be judged by its **own isolated verifier** before anything counts as done.
4
-
5
- > Protocol `schemaVersion` `0.9` · product **v1.2.0 stable** · [Changelog](docs/CHANGELOG.md) · [Spec](SPEC.md) · [Architecture 0.9](docs/architecture-0.9.md)
6
-
7
- > **v1.1**: capture roots follow the invoking session cwd (configured `workspaceRoot` is the fallback); verifier/programmatic timeouts 15 min; agentic concurrency reads live settings per-run (no restart); whole-object assertions record their verdict + evidence on the composite; verifier settlement text is preserved in `~/.dsh/dog/settlements/`.
8
-
9
- > **v1.2**: dependsOn is a completion gate with real-time wakeup (no dead `blocked` latches); composites run their whole-object assertions concurrently (watermark under the shared agentic budget) instead of a serial loop; `dog_cancel` truly aborts — run-level signal, in-flight verifiers settle `cancelled`, live subagents are interrupted, and a cancellation is never overwritten by a completion record; composite `running` state persists so the UI stays truthful; 41 tests.
10
-
11
- ---
12
-
13
- ## The core idea (why DoG)
14
-
15
- A goal like "write a genuinely good article" has **no single, formal pass/fail rule** — nobody can run a command that returns "good". Deciding it requires judgment. DoG makes that decidable by structure, not by pretending it is a formula:
16
-
17
- 1. **Decompose the non-formal goal into subgoals that can each be reviewed.** Each subgoal is still allowed to be *semantic* ("this paragraph has a claim and evidence") — the point is that it can be *reviewed separately*.
18
- 2. **Every subgoal gets its own verifier, and the verifier is not the author.**
19
- - **Agentic kernel** — an isolated subagent with the instruction as its only judgment standard: it reads the object, decides what evidence it needs, gathers it, and answers `{"verdict": "pass|fail|inconclusive", "evidence": …}`. It is context-isolated from the producer, so it cannot inherit the producer's blindspots.
20
- - **Programmatic kernel** — a host-registered script in the library (`~/.dsh/dog/scripts/`) for the few checks that genuinely are precise rules (file exists, phrase blacklist, count thresholds). Script name may omit the `.js` extension.
21
- - **A subtree must never be entirely programmatic** — if a whole branch can be decided by rules, it does not belong in a DAG-of-Goals; DoG exists for the judgment parts.
22
- 3. **Composition, failure propagation, and the human backstop.**
23
- - Composites combine children (`all` / `any` / `atLeast` / `not`) and may carry their **own whole-object assertion** — "each dimension passed, but as a whole article it still doesn't hold together" — judged after the subtree settles; the assertion can only *demote*, never promote.
24
- - Failures propagate upwards until a node that tolerates them (`fatal` / `tolerable` / `degrade`); a `fatal` reaches the root, and **the root is never allowed to fail silently** — it surfaces to a human with the exact failing subgoal and its evidence.
25
- - Anything the verifier cannot decide honestly settles `needs_human` (never guessed).
26
- 4. **Every verdict is evidence-bound; reproducibility is kernel-specific.**
27
- - `dog_create` captures immutable, content-addressed copies of the target (files; directories are packed into `.tar`), so verification runs against the exact bytes reviewed — not the later live file.
28
- - Each verdict records the judgment anchor (object digest + instruction hash / script identity), the `verdict`, and its evidence — so *what was decided, and on what basis* is always reconstructable.
29
- - **Programmatic kernels are deterministic** (same script + same bytes → same verdict). **Agentic kernels are independent judgments, not formulas**: the same instruction against the same object *may* differ across model versions/temperatures. For reproducibility-critical checks use the programmatic kernel, or treat the agentic verdict as advisory and (for high-stakes goals) keep `needs_human`/human review in the loop. DoG *anchors* the judgment — it does not promise model stability.
30
- - Re-running an unchanged graph (object + judgment anchor identical) reuses prior settlements (`inherited`), so iterations cost tokens only for what actually changed.
31
- 5. **True parallelism, real isolation.** Watermark scheduling (a finished verifier immediately frees its slot), programmatic leaves run unqueued, the agentic budget bounds only model-backed work, and each verifier works in its own isolated workspace that stays alive until the run settles.
32
-
33
- **What DoG is not**: a todo list, a CI runner, or a checklist of scripted rules. It is the *judgment* layer — the part of "is this done?" that previously had no structure and therefore got done (or skipped) by vibes.
34
-
35
- ### Known limits (v1.0)
36
-
37
- - **Agentic judgments are single-shot** — one isolated verifier subagent per leaf, no re-check, no voting. The evidence schema was deliberately removed in favor of "any JSON", which also removed the basis for structural comparison; the v0.2-deferred "re-check/voting against single-judge blind spots" is **not implemented**.
38
- - **Inheritance anchors, it does not re-verify**: an unchanged agentic leaf reuses its previous verdict — drift in model behavior is invisible until the anchor changes.
39
- - **Where it lands**: anything that must be *deterministically* reproducible belongs in a programmatic script; anything *judgment-based* is best reviewed as evidence plus, for high-stakes goals, human confirmation.
40
-
41
- ---
42
-
43
- ## The graph (schemaVersion 0.9)
44
-
45
- ```jsonc
46
- {
47
- "schemaVersion": "0.9",
48
- "id": "article-quality",
49
- "root": "root",
50
- "nodes": {
51
- "root": { "kind": "composite", "constraint": "hard", "target": "article.md",
52
- "completion": { "op": "all", "items": [ { "op": "ref", "id": "no-slop" } ] },
53
- "verifier": { "mode": "agentic", "instruction": "Overall assertion…" } },
54
- "no-slop": { "kind": "leaf", "constraint": "hard", "target": "article.md",
55
- "verifier": { "mode": "agentic", "instruction": "Check for AI-slop…" } }
56
- },
57
- "contains": [ { "parent": "root", "child": "no-slop", "required": true, "failure": "fatal" } ],
58
- "dependsOn": [] // e.g. [ { "source": "b", "target": "a" } ] = b depends on a (a runs first)
59
- }
60
- ```
61
-
62
- - Two node kinds: **leaf** (one verifier) and **composite** (children combination + optional whole-object assertion).
63
- - Exact field reference and full examples: [`docs/skills/dog-v02-agentic-ci/SKILL.md`](docs/skills/dog-v02-agentic-ci/SKILL.md).
64
- - Ready-to-run demos: [`examples/`](examples/README.md) — `article-quality.graph.json` (four-dimension article gate) and `dog-smoke-multi.graph.json` (3-level tree + mixed agentic/programmatic + dependency edge).
65
-
66
- ## Quick start
67
-
68
- ```sh
69
- pnpm install
70
- pnpm run check
71
-
72
- # Install the plugin onto the profiles that should expose DoG:
73
- dsh plugin --profile web add "$PWD"
74
- dsh plugin --profile headless add "$PWD"
75
- ```
76
-
77
- Configure **once, user-level**, in `~/.dsh/settings.yaml` under `dog:` (shared by every profile; agents must never edit it):
78
-
79
- ```yaml
80
- dog:
81
- workspaceRoot: /absolute/path/to/your/workspace # capture source root
82
- scriptsDirectory: dog/scripts # relative to $DSH_HOME, or absolute
83
- storageDirectory: dog # ~/.dsh/dog (graphs, runs, artifacts)
84
- ```
85
-
86
- > Orphan runs left by a host restart are cancelled automatically at boot; their settled leaves stay inheritable by the next run.
87
-
88
- Start the harness and use the model-facing tools — `dog_validate` → `dog_create` → `dog_run` → `dog_wait`/`dog_status`:
89
-
90
- ```sh
91
- dsh web # web UI: graph debugger panel + tools
92
- dsh --profile headless "Create a DoG for article.md, run it, then read its status."
93
- ```
94
-
95
- The **DoG debugger** panel shows immutable graph revisions, run history, containment/dependency edges (arrow = execution order), failure propagation, per-goal runtime traces, and verifier evidence — read-only, never exposing artifact bytes.
96
-
97
- ## Agentic CI skill
98
-
99
- The end-user skill (how-to for agents writing and running graphs) is [`docs/skills/dog-v02-agentic-ci/SKILL.md`](docs/skills/dog-v02-agentic-ci/SKILL.md) — the single source of truth. The per-user copy must be re-synced after every change:
100
-
101
- ```sh
102
- cp docs/skills/dog-v02-agentic-ci/SKILL.md ~/.dsh/skills/dog-v02-agentic-ci/SKILL.md
103
- ```
104
-
105
- ## Repository layout
106
-
107
- - [`src/`](src) — plugin: `graph.ts` (schema/validation), `core.ts` (engine: capture, scheduling, propagation, inheritance), `verifiers.ts` (two kernels), `storage.ts` (content-addressed store), `debug.ts` + `client/` (debugger UI), `tools.ts` (model-facing tools).
108
- - [`schemas/`](schemas/schema-0.2) — JSON schemas (graph/run/verification/runtime-event/report).
109
- - [`docs/`](docs) — `architecture-0.9.md` (normative 0.9 design), `CHANGELOG.md`, `skills/`.
110
- - [`examples/`](examples/README.md) — copy-paste demo graphs.
111
-
112
- ## License
113
-
114
- BSD-3-Clause.
@@ -1,30 +0,0 @@
1
- # DoG provenance
2
-
3
- Source: https://github.com/Fun10165/dsh-dog/tree/v1.2.0 (BSD-3-Clause).
4
- The upstream license and copyright notices are retained in LICENSE.
5
-
6
- OpenWrite compatibility changes:
7
-
8
- - dsh 0.1.2-rc.1 public session, settings and RPC interfaces; Cordis 4.0.2.
9
- - Host SDK modules remain external to the bundle.
10
- - Host engine and debug transport are singletons; tools are registered by the
11
- OpenWrite preset through the `openwriteDog` service.
12
- - The debugger opens from OpenWrite tasks on `openwrite:dog-open`. No default
13
- dock, host margin mutation, or idle polling is enabled in this integration.
14
- - Upstream browser capture directories are excluded from the vendored source.
15
- - Browser and host type checking are separate; shared RPC records live in a
16
- browser-safe contract module. Pending interaction state uses uiSession.
17
- - Programmatic verifier scripts run asynchronously with owned process cleanup
18
- on cancellation or unload, including Windows process trees. Artifact archiving
19
- uses the portable tar library instead of a required system tar executable.
20
-
21
- - The debugger starts without a global tool catalog. Its authenticated RPC
22
- channel declares the Web carrier dependency on its own plugin injection; the
23
- shared connection row is no longer patched, so other bundles can extend it.
24
- - DSH 0.2 entry-local SettingsForms replace the old standalone settings section;
25
- volatile concurrency values are read through their live references.
26
- - Invocation navigation uses uiWorkspace and confirms main-view retention on 0.2;
27
- the 0.1 selection and parent-catalog APIs remain supported.
28
-
29
- The verification engine, graph schema, evidence records and storage keys remain
30
- upstream-compatible. This is a maintained integration, not an upstream release.
@@ -1,14 +0,0 @@
1
- # Mount DoG in a DSH profile. Artifact bindings are intentionally supplied
2
- # by the profile owner, never by a model-authored graph.
3
- - insert:
4
- - id: dsh-dog
5
- name: '@dsh-external/dsh-dog'
6
- config:
7
- artifactRoots: []
8
- artifactBindings: []
9
- storageDirectory: dog
10
- maxGraphNodes: 256
11
- maxExpressionNodes: 512
12
- maxExpressionDepth: 64
13
- maxSnapshotBytes: 67108864
14
- allowPartialRoot: false