dialog-ide 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/LICENSE +201 -0
- package/README.md +211 -0
- package/THIRD_PARTY_LICENSES.md +157 -0
- package/bin/darwin-arm64/aambundle +0 -0
- package/bin/darwin-arm64/dgdebug +0 -0
- package/bin/darwin-arm64/dialogc +0 -0
- package/bin/dialog-lib/stddebug.dg +112 -0
- package/bin/dialog-lib/stdlib.dg +6730 -0
- package/bin/dialog-lib/unit.dg +187 -0
- package/dist/cli/commands/run-skein.d.ts +17 -0
- package/dist/cli/commands/run-skein.d.ts.map +1 -0
- package/dist/cli/commands/run-skein.js +105 -0
- package/dist/cli/commands/run-skein.js.map +1 -0
- package/dist/cli/commands/sources.d.ts +12 -0
- package/dist/cli/commands/sources.d.ts.map +1 -0
- package/dist/cli/commands/sources.js +42 -0
- package/dist/cli/commands/sources.js.map +1 -0
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js +41 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/context.d.ts +9 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +78 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +32 -0
- package/dist/cli.js.map +1 -0
- package/dist/dialog-cover-resize.d.ts +2 -0
- package/dist/dialog-cover-resize.d.ts.map +1 -0
- package/dist/dialog-cover-resize.js +46 -0
- package/dist/dialog-cover-resize.js.map +1 -0
- package/dist/dialog-export.d.ts +23 -0
- package/dist/dialog-export.d.ts.map +1 -0
- package/dist/dialog-export.js +133 -0
- package/dist/dialog-export.js.map +1 -0
- package/dist/dialog-feelies.d.ts +4 -0
- package/dist/dialog-feelies.d.ts.map +1 -0
- package/dist/dialog-feelies.js +62 -0
- package/dist/dialog-feelies.js.map +1 -0
- package/dist/dialog-outline.d.ts +19 -0
- package/dist/dialog-outline.d.ts.map +1 -0
- package/dist/dialog-outline.js +122 -0
- package/dist/dialog-outline.js.map +1 -0
- package/dist/dialog-project-init.d.ts +5 -0
- package/dist/dialog-project-init.d.ts.map +1 -0
- package/dist/dialog-project-init.js +107 -0
- package/dist/dialog-project-init.js.map +1 -0
- package/dist/dialog-source-coverage.d.ts +9 -0
- package/dist/dialog-source-coverage.d.ts.map +1 -0
- package/dist/dialog-source-coverage.js +61 -0
- package/dist/dialog-source-coverage.js.map +1 -0
- package/dist/dialog-source-decoration-provider.d.ts +11 -0
- package/dist/dialog-source-decoration-provider.d.ts.map +1 -0
- package/dist/dialog-source-decoration-provider.js +79 -0
- package/dist/dialog-source-decoration-provider.js.map +1 -0
- package/dist/dialog-symbol-index.d.ts +19 -0
- package/dist/dialog-symbol-index.d.ts.map +1 -0
- package/dist/dialog-symbol-index.js +107 -0
- package/dist/dialog-symbol-index.js.map +1 -0
- package/dist/dialog-symbol-provider.d.ts +5 -0
- package/dist/dialog-symbol-provider.d.ts.map +1 -0
- package/dist/dialog-symbol-provider.js +56 -0
- package/dist/dialog-symbol-provider.js.map +1 -0
- package/dist/dialog-web-export.d.ts +25 -0
- package/dist/dialog-web-export.d.ts.map +1 -0
- package/dist/dialog-web-export.js +283 -0
- package/dist/dialog-web-export.js.map +1 -0
- package/dist/dialog-workspace-symbol-provider.d.ts +16 -0
- package/dist/dialog-workspace-symbol-provider.d.ts.map +1 -0
- package/dist/dialog-workspace-symbol-provider.js +107 -0
- package/dist/dialog-workspace-symbol-provider.js.map +1 -0
- package/dist/dialog-workspace-watcher.d.ts +22 -0
- package/dist/dialog-workspace-watcher.d.ts.map +1 -0
- package/dist/dialog-workspace-watcher.js +102 -0
- package/dist/dialog-workspace-watcher.js.map +1 -0
- package/dist/dialoged/skein/compile-error.d.ts +10 -0
- package/dist/dialoged/skein/compile-error.d.ts.map +1 -0
- package/dist/dialoged/skein/compile-error.js +28 -0
- package/dist/dialoged/skein/compile-error.js.map +1 -0
- package/dist/dialoged/skein/dynamic.d.ts +14 -0
- package/dist/dialoged/skein/dynamic.d.ts.map +1 -0
- package/dist/dialoged/skein/dynamic.js +176 -0
- package/dist/dialoged/skein/dynamic.js.map +1 -0
- package/dist/dialoged/skein/frotz-build.d.ts +10 -0
- package/dist/dialoged/skein/frotz-build.d.ts.map +1 -0
- package/dist/dialoged/skein/frotz-build.js +70 -0
- package/dist/dialoged/skein/frotz-build.js.map +1 -0
- package/dist/dialoged/skein/index.d.ts +15 -0
- package/dist/dialoged/skein/index.d.ts.map +1 -0
- package/dist/dialoged/skein/index.js +31 -0
- package/dist/dialoged/skein/index.js.map +1 -0
- package/dist/dialoged/skein/io.d.ts +15 -0
- package/dist/dialoged/skein/io.d.ts.map +1 -0
- package/dist/dialoged/skein/io.js +53 -0
- package/dist/dialoged/skein/io.js.map +1 -0
- package/dist/dialoged/skein/persistence.d.ts +13 -0
- package/dist/dialoged/skein/persistence.d.ts.map +1 -0
- package/dist/dialoged/skein/persistence.js +228 -0
- package/dist/dialoged/skein/persistence.js.map +1 -0
- package/dist/dialoged/skein/process.d.ts +38 -0
- package/dist/dialoged/skein/process.d.ts.map +1 -0
- package/dist/dialoged/skein/process.js +189 -0
- package/dist/dialoged/skein/process.js.map +1 -0
- package/dist/dialoged/skein/progress.d.ts +17 -0
- package/dist/dialoged/skein/progress.d.ts.map +1 -0
- package/dist/dialoged/skein/progress.js +9 -0
- package/dist/dialoged/skein/progress.js.map +1 -0
- package/dist/dialoged/skein/project.d.ts +44 -0
- package/dist/dialoged/skein/project.d.ts.map +1 -0
- package/dist/dialoged/skein/project.js +223 -0
- package/dist/dialoged/skein/project.js.map +1 -0
- package/dist/dialoged/skein/search.d.ts +15 -0
- package/dist/dialoged/skein/search.d.ts.map +1 -0
- package/dist/dialoged/skein/search.js +99 -0
- package/dist/dialoged/skein/search.js.map +1 -0
- package/dist/dialoged/skein/service.d.ts +91 -0
- package/dist/dialoged/skein/service.d.ts.map +1 -0
- package/dist/dialoged/skein/service.js +1097 -0
- package/dist/dialoged/skein/service.js.map +1 -0
- package/dist/dialoged/skein/session.d.ts +96 -0
- package/dist/dialoged/skein/session.d.ts.map +1 -0
- package/dist/dialoged/skein/session.js +690 -0
- package/dist/dialoged/skein/session.js.map +1 -0
- package/dist/dialoged/skein/syntax.d.ts +5 -0
- package/dist/dialoged/skein/syntax.d.ts.map +1 -0
- package/dist/dialoged/skein/syntax.js +150 -0
- package/dist/dialoged/skein/syntax.js.map +1 -0
- package/dist/dialoged/skein/trace.d.ts +31 -0
- package/dist/dialoged/skein/trace.d.ts.map +1 -0
- package/dist/dialoged/skein/trace.js +172 -0
- package/dist/dialoged/skein/trace.js.map +1 -0
- package/dist/dialoged/skein/tree.d.ts +114 -0
- package/dist/dialoged/skein/tree.d.ts.map +1 -0
- package/dist/dialoged/skein/tree.js +701 -0
- package/dist/dialoged/skein/tree.js.map +1 -0
- package/dist/dialoged/skein/ui/ansi.d.ts +4 -0
- package/dist/dialoged/skein/ui/ansi.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/ansi.js +215 -0
- package/dist/dialoged/skein/ui/ansi.js.map +1 -0
- package/dist/dialoged/skein/ui/diff.d.ts +7 -0
- package/dist/dialoged/skein/ui/diff.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/diff.js +17 -0
- package/dist/dialoged/skein/ui/diff.js.map +1 -0
- package/dist/dialoged/skein/ui/knot-menu.d.ts +5 -0
- package/dist/dialoged/skein/ui/knot-menu.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/knot-menu.js +89 -0
- package/dist/dialoged/skein/ui/knot-menu.js.map +1 -0
- package/dist/dialoged/skein/ui/marker-colors.d.ts +5 -0
- package/dist/dialoged/skein/ui/marker-colors.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/marker-colors.js +18 -0
- package/dist/dialoged/skein/ui/marker-colors.js.map +1 -0
- package/dist/dialoged/skein/ui/render.d.ts +13 -0
- package/dist/dialoged/skein/ui/render.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/render.js +332 -0
- package/dist/dialoged/skein/ui/render.js.map +1 -0
- package/dist/dialoged/skein/ui/traceRender.d.ts +11 -0
- package/dist/dialoged/skein/ui/traceRender.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/traceRender.js +139 -0
- package/dist/dialoged/skein/ui/traceRender.js.map +1 -0
- package/dist/dialoged/skein/ui/tree-pane.d.ts +3 -0
- package/dist/dialoged/skein/ui/tree-pane.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/tree-pane.js +135 -0
- package/dist/dialoged/skein/ui/tree-pane.js.map +1 -0
- package/dist/dialoged/skein/ui/webExportPage.d.ts +29 -0
- package/dist/dialoged/skein/ui/webExportPage.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/webExportPage.js +72 -0
- package/dist/dialoged/skein/ui/webExportPage.js.map +1 -0
- package/dist/extension.d.ts +4 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/extension.js +885 -0
- package/dist/extension.js.map +1 -0
- package/dist/session-runner.d.ts +23 -0
- package/dist/session-runner.d.ts.map +1 -0
- package/dist/session-runner.js +92 -0
- package/dist/session-runner.js.map +1 -0
- package/language-configuration.json +43 -0
- package/media/icon.png +0 -0
- package/media/icons/arrow-down-circle-solid.svg +3 -0
- package/media/icons/arrow-down-solid.svg +3 -0
- package/media/icons/arrow-path-solid.svg +3 -0
- package/media/icons/arrow-right-solid.svg +3 -0
- package/media/icons/arrow-up-on-square-stack-solid.svg +5 -0
- package/media/icons/arrow-up-solid.svg +3 -0
- package/media/icons/arrow-uturn-left.svg +3 -0
- package/media/icons/arrow-uturn-right.svg +3 -0
- package/media/icons/bookmark-solid.svg +3 -0
- package/media/icons/bug-ant-solid.svg +3 -0
- package/media/icons/check-badge-solid.svg +3 -0
- package/media/icons/check-circle-solid.svg +3 -0
- package/media/icons/chevron-double-down-solid.svg +4 -0
- package/media/icons/chevron-double-up-solid.svg +4 -0
- package/media/icons/command-line-solid.svg +3 -0
- package/media/icons/cpu-chip-solid.svg +4 -0
- package/media/icons/dg-file-dark.svg +6 -0
- package/media/icons/dg-file-light.svg +6 -0
- package/media/icons/ellipsis-vertical-solid.svg +3 -0
- package/media/icons/exclamation-triangle.svg +3 -0
- package/media/icons/folder-arrow-down-solid.svg +3 -0
- package/media/icons/globe-alt.svg +3 -0
- package/media/icons/lock-closed-solid.svg +3 -0
- package/media/icons/magnifying-glass-solid.svg +3 -0
- package/media/icons/pencil-solid.svg +4 -0
- package/media/icons/play-solid.svg +3 -0
- package/media/icons/plus-circle-solid.svg +3 -0
- package/media/icons/scissors-solid.svg +5 -0
- package/media/icons/tag-solid.svg +3 -0
- package/media/icons/trash-solid.svg +3 -0
- package/media/icons/x-circle-solid.svg +3 -0
- package/media/js/datastar.js +9 -0
- package/media/js/main.js +1109 -0
- package/media/js/skein-loader.js +10 -0
- package/media/js/trace-loader.js +4 -0
- package/media/js/trace.js +147 -0
- package/media/style.css +5783 -0
- package/package.json +231 -0
- package/resources/bundle/default-cover.png +0 -0
- package/resources/bundle/introduction-to-if.pdf +0 -0
- package/resources/bundle/play-if-card.pdf +1990 -1
- package/resources/bundle/play.css +432 -0
- package/resources/bundle/style.css +450 -0
- package/resources/dfrotz-skein-patch.dg +4 -0
- package/syntaxes/dialog.tmLanguage.json +490 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0 - 25 Aug 2026
|
|
4
|
+
|
|
5
|
+
- Add `dgbuild`, a headless CLI (`test`, `run-skein`, `sources`) for running project checks from scripts/CI without the VS Code extension host
|
|
6
|
+
|
|
7
|
+
## 0.4.1 - 22 Aug 2026
|
|
8
|
+
|
|
9
|
+
- Fix `dialog.json`'s `binDir` being ignored when set to a relative path (e.g. `"bin"`) - it's now resolved against the project root like source entries, instead of the extension host's own working directory
|
|
10
|
+
- Fix a script-load race that could break the Skein/Trace webview on startup ("sk is not defined") - each page now loads a single `skein-loader.js`/`trace-loader.js` entry point whose static imports guarantee `main.js`/`trace.js` finish before `datastar.js` runs, instead of relying on `<script>` tag order
|
|
11
|
+
|
|
12
|
+
## 0.4.0 - 21 Aug 2026
|
|
13
|
+
|
|
14
|
+
- Nav graph: zoom in/out via mouse wheel (centered on the cursor) or new bottom-right +/- buttons
|
|
15
|
+
- Knots can carry one of four color markers (actions menu), shown next to the label chip and persisted in the .skein file; navbar filter buttons show only knots with a chosen marker (or a marked descendant)
|
|
16
|
+
- Prompt to reload the active session's .skein file when it changes on disk outside Dialog IDE
|
|
17
|
+
- "Export Web Page..."'s story-metadata query (title/author/IFID/etc.) now also respects `<name>.dgdebug.dg`/`<name>.<format>.dg` source-suffix filtering, matching every other dgdebug launch - a source meant only for a specific export format could previously leak into it
|
|
18
|
+
|
|
19
|
+
## 0.3.0 - 19 Aug 2026
|
|
20
|
+
|
|
21
|
+
- "Export Web Page..."'s attachments ("feelies", e.g. the "how to play IF" PDFs) are now configurable via `dialog.json`'s `feelies` array, instead of a hardcoded pair of filenames; "Add Feelie..." (also available via right-click in the Explorer) and "Remove Feelie..." commands manage them. A configured feelie whose file is missing is now an export error, not a silent omission
|
|
22
|
+
- Command input (new commands and "Edit Command...") now lowercases and collapses consecutive whitespace, not just trims
|
|
23
|
+
- "Edit Command..." and "Insert Parent..." no longer reject a command that collides with an existing sibling - the two knots merge instead (recursively, through matching descendants), keeping the merged knot locked/labeled if either side was
|
|
24
|
+
- Warn when `dialog.json` declares the same source file in more than one category (or twice in one), since Dialog would compile it twice - new `dialog-ide.warnOnDuplicateSource` setting
|
|
25
|
+
|
|
26
|
+
## 0.2.0 - 16 Aug 2026
|
|
27
|
+
|
|
28
|
+
- Run the Skein using `frotz`/`frotz-release` (dfrotz) as the engine - requires `dfrotz` on `PATH` or `binDir` (not yet bundled)
|
|
29
|
+
- "Initialize Dialog Project" no longer asks for target format(s); removed `dialog.json`'s `target` field
|
|
30
|
+
- "Export Web Page..." now asks which export configuration builds the downloadable story file, instead of building every target
|
|
31
|
+
- ⌘⇧A / Ctrl+Shift+A now opens the Command Palette while the Skein or Trace panel has focus
|
|
32
|
+
- A labeled knot is now treated as locked (can't be deleted) even if never explicitly locked
|
|
33
|
+
- Export commands' post-export notification now says "Reveal in Finder" on macOS instead of "Reveal in Explorer"
|
|
34
|
+
- Fixed the nav graph's expand/collapse icon drifting off its connector line for a small/narrow skein
|
|
35
|
+
|
|
36
|
+
## 0.1.0 - 15 Aug 2026
|
|
37
|
+
|
|
38
|
+
- Bundle the Dialog toolchain (`dgdebug`/`dialogc`) and AAmachine (`aambundle`) with the extension on Windows, Apple Silicon Macs, and Linux (x64), so most users no longer need to install either separately; other platforms still resolve via `PATH` or `dialog.json`'s `binDir`, which always takes priority
|
|
39
|
+
- "Initialize Dialog Project" command: scaffolds `dialog.json`, `main`/`lib`/`debug`/`test` directories, a starter `main/main.dg`, bundled copies of the standard libraries (`stdlib.dg`/`stddebug.dg`/`unit.dg`), a placeholder `cover.png`, and the two "how to play IF" PDFs used by "Export Web Page..." into an open, empty workspace folder
|
|
40
|
+
- "Configure Exports..." and "Export Dialog Project..." commands: define named export configurations (output format, whether to include debug sources, output path, extra `dialogc` options such as `--heap`/`--aux`) in `dialog.json`, then compile a `.zblorb`/`.z8`/`.aa` game file via `dialogc`; a `zblorb` export bakes in the project's `cover.png`, if present. "Configure Exports..." also sets a project-wide default set of `dialogc` options, used by any export configuration that doesn't specify its own, and by "Export Web Page..."
|
|
41
|
+
- "Export Web Page..." command: builds every one of the project's targets plus an AAmachine in-browser player, and assembles a downloadable web page (cover thumbnail, story file downloads, "how to play IF" PDFs, an optional walkthrough from `default.skein`) into `out/web/` plus a zip; deleting a PDF (or `cover.png`) from the project root simply omits it from the exported page rather than erroring
|
|
42
|
+
- "Run Tests" command: runs `dgdebug` in a terminal with the `main`/`debug`/`test` source categories all active, so `test`'s own `lib/unit.dg` overrides `(program entry point)` and runs the project's `(test *)`-trait objects; dgdebug drops into its own debug prompt once the tests finish (rather than quitting immediately), so the pass/fail output stays visible; re-running the command replaces the previous run's terminal instead of opening a new tab each time
|
|
43
|
+
|
|
44
|
+
## 0.0.2 - 13 Aug 2026
|
|
45
|
+
|
|
46
|
+
- Rewrote `README.md` for end users (Dialog authors), covering the Skein workflow, keyboard shortcuts, and project setup
|
|
47
|
+
- Moved developer-facing content (source layout, build/test/package workflow) into `technical-design.md`
|
|
48
|
+
- Nav graph connectors now use an orthogonal elbow (vertical, then a sharp turn to horizontal, then a slightly curved turn back to vertical) instead of a bezier curve
|
|
49
|
+
- Nav graph's expand/collapse control is now a larger boxed +/- icon instead of a small chevron, with an opaque interior so the connector line no longer bleeds through it
|
|
50
|
+
- Outline view (and breadcrumbs, Ctrl+Shift+O) for `.dg` source files: topics as collapsible nodes, rule definitions nested underneath
|
|
51
|
+
- Workspace-wide "Go to Symbol" (Ctrl+T/Cmd+T) across all `.dg` source files in a project, kept current via a file watcher as sources are edited/added/removed
|
|
52
|
+
- Editing, adding, or deleting a project's `.dg` source files, or its `dialog.json`, now restarts the `dgdebug` process on the next command so changes take effect immediately
|
|
53
|
+
- Warn when a newly created `.dg` file isn't covered by any `dialog.json` source: a dismissible notification plus a persistent Explorer badge, both with a one-click "Add to dialog.json" fix; configurable via `dialog-ide.warnOnUncoveredSource`
|
|
54
|
+
- Vendored `.dg` syntax highlighting, folding, and bracket/indentation support directly into the extension (previously provided by the separate `sideburns3000.dialog-language-support` extension via `extensionDependencies`, which also brought along conflicting "Compile to Z8/etc." commands); that dependency has been dropped. If it's still separately installed, a one-time startup notice suggests disabling/uninstalling it
|
|
55
|
+
- A custom `.dg` file icon (two overlapping speech bubbles) for icon themes that don't already provide one of their own
|
|
56
|
+
|
|
57
|
+
## 0.0.1 - 11 Aug 2026
|
|
58
|
+
|
|
59
|
+
Initial release.
|
|
60
|
+
|
|
61
|
+
- Skein engine for the `dgdebug` interpreter: process management, session orchestration, tag-line prompt detection
|
|
62
|
+
- Transcript and nav-graph webview UI, with full keyboard-first navigation
|
|
63
|
+
- Bless/undo/redo, Replay and Replay All, time travel, Insert Parent, Splice Out, knot labels and locking
|
|
64
|
+
- Dynamic state capture and diffing (`@dynamic`)
|
|
65
|
+
- Trace panel with click-through to source
|
|
66
|
+
- Full-text search over knot labels and responses
|
|
67
|
+
- `.skein` file persistence, compatible with dialog-tool's flat-file format
|
|
68
|
+
- `dialog.json` project support (source discovery/ordering)
|
|
69
|
+
- VS Code extension packaging (`.vsix`), icon, and Apache-2.0 license
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the
|
|
44
|
+
purposes of this License, Derivative Works shall not include works
|
|
45
|
+
that remain separable from, or merely link (or bind by name) to the
|
|
46
|
+
interfaces of, the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including the
|
|
49
|
+
original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Howard Lewis Ship
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Dialog IDE
|
|
2
|
+
|
|
3
|
+
Dialog IDE is a VS Code extension for developing interactive fiction in the [Dialog](https://github.com/dialog-if/dialog) programming language. Its centerpiece is the **Skein**: an interactive, web-style panel for running, testing, and debugging your project without leaving the editor.
|
|
4
|
+
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> Not every work of IF is a "game", so the Dialog tooling generally says "project" instead.
|
|
7
|
+
|
|
8
|
+
## What the Skein does
|
|
9
|
+
|
|
10
|
+
At its simplest, the Skein is a live wrapper around Dialog's own debugger (`dgdebug`): you type player commands, and the project's responses come back into the panel. What makes it powerful is that it *remembers*. Every command and response you've ever tried is kept in an ever-growing tree, so you can:
|
|
11
|
+
|
|
12
|
+
- **Time travel** back to any earlier point and try a different command, without losing the path you already explored
|
|
13
|
+
- **Bless** a response as correct, so you'll be warned if a later code change ever produces a different response
|
|
14
|
+
- **Replay All** every path through your project in seconds, to confirm a change didn't break anything
|
|
15
|
+
- **Trace** exactly which predicates fired for a given command, with clickable links to the source
|
|
16
|
+
- Inspect the **dynamic state** (flags, relations, attributes) that changed as a result of a command
|
|
17
|
+
|
|
18
|
+
Each command/response pair is called a **knot**. Knots form a tree - the same command can appear at multiple points in the tree, each with its own knot, because the same input can mean something different depending on what came before.
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
- On Windows, Apple Silicon Macs, and Linux (x64): nothing extra - the Dialog toolchain (`dgdebug`, `dialogc`) and [AAmachine](https://github.com/dialog-if/aamachine) (`aambundle`) are bundled with the extension and just work.
|
|
23
|
+
- On other platforms (Intel Macs, Linux ARM, etc.): install the [Dialog toolchain](https://github.com/dialog-if/dialog) yourself, with `dgdebug`/`dialogc` on your `PATH`, or point `dialog.json`'s `binDir` at it (see [Project Setup](#project-setup)). **Export Web Page...** additionally needs `aambundle` from [AAmachine](https://github.com/dialog-if/aamachine) on your `PATH`/`binDir` - the other commands don't need it.
|
|
24
|
+
- Running a skein with the `frotz`/`frotz-release` engine additionally needs `dfrotz` (from [frotz](https://gitlab.com/DavidGriffith/frotz)) on your `PATH`/`binDir`, on every platform - it isn't bundled yet.
|
|
25
|
+
- A project folder containing a `dialog.json` file (see [Project Setup](#project-setup)) - or use **Dialog IDE: Initialize Dialog Project** to create one from scratch
|
|
26
|
+
|
|
27
|
+
`.dg` syntax highlighting, folding, and bracket/indentation support are built in, along with an Outline view (and breadcrumbs, ⌘⇧O / Ctrl+Shift+O) and workspace-wide "Go to Symbol" (⌘T / Ctrl+T) across every `.dg` file in the project. Dialog IDE itself doesn't otherwise touch source editing; it's all about running the project through the Skein.
|
|
28
|
+
|
|
29
|
+
> [!NOTE]
|
|
30
|
+
> If you previously had the separate [`dialog-language-support`](https://marketplace.visualstudio.com/items?itemName=sideburns3000.dialog-language-support) extension installed, Dialog IDE will warn you once at startup and suggest disabling or uninstalling it - having both installed can cause inconsistent `.dg` highlighting and a duplicate "Compile to..." context menu.
|
|
31
|
+
|
|
32
|
+
## Installing
|
|
33
|
+
|
|
34
|
+
Search for **Dialog IDE** in the VS Code Extensions view and install it, or install from the command line:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
code --install-extension hlship.dialog-ide
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Project Setup
|
|
41
|
+
|
|
42
|
+
Dialog IDE reads a `dialog.json` file at the root of your project (opened as a VS Code workspace folder). This is what **Dialog IDE: Initialize Dialog Project** scaffolds:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"name": "my-project",
|
|
47
|
+
"sources": {
|
|
48
|
+
"main": ["main"],
|
|
49
|
+
"test": ["test", "lib/unit.dg"],
|
|
50
|
+
"debug": ["debug", "lib/stddebug.dg"],
|
|
51
|
+
"library": ["lib/stdlib.dg"]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- Each entry under `sources` is a list of directories (all `.dg` files in the directory) or individual file paths
|
|
57
|
+
- `main` is always included; `debug` is pulled in for Skein/debug sessions; `library` (including the Dialog standard library) is always included; `test` is loaded by **Dialog IDE: Run Tests** (see [Getting Started](#getting-started)), but not by a running Skein session
|
|
58
|
+
- Order is very important: main comes before test, which comes before debug, which comes before library.
|
|
59
|
+
|
|
60
|
+
The order of sources in a single directory is not guaranteed; if order counts, you should list the files in the directory
|
|
61
|
+
in the order you need them to be. Remember that Dialog searches for rules top to bottom, so you should have
|
|
62
|
+
exceptions first, before default rules.
|
|
63
|
+
|
|
64
|
+
A source file named `<name>.<format>.dg` is only included when building for that format - e.g. `colors.zblorb.dg` is
|
|
65
|
+
included in a `zblorb` export but skipped everywhere else, and `layout.dgdebug.dg` is included only when running a
|
|
66
|
+
Skein session, **Debug in Terminal**, or **Run Tests** (all of which run against `dgdebug`). This lets you fine-tune
|
|
67
|
+
things like colors or layout per format without those tweaks leaking into other builds. A file with no such suffix
|
|
68
|
+
(or one that doesn't match any format Dialog IDE builds for) is always included.
|
|
69
|
+
|
|
70
|
+
If you create a `.dg` file that isn't covered by any of the categories above, Dialog IDE flags it - a dismissible notification plus a persistent Explorer badge, both with a one-click "Add to dialog.json" fix. Turn this off via the `dialog-ide.warnOnUncoveredSource` setting.
|
|
71
|
+
|
|
72
|
+
Dialog IDE also flags a source file declared in more than one category (or twice in the same one) - since order matters, a duplicate isn't harmless, it's compiled twice. Turn this off via the `dialog-ide.warnOnDuplicateSource` setting.
|
|
73
|
+
|
|
74
|
+
If you need a specific `dgdebug` (e.g. a locally built one, or a platform Dialog IDE doesn't bundle a toolchain for - see [Requirements](#requirements)), add a `binDir` field pointing at the directory containing it:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"name": "my-project",
|
|
79
|
+
"binDir": "/opt/dialog/bin",
|
|
80
|
+
"sources": { "main": ["src"] }
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`binDir` always takes priority, overriding both Dialog IDE's bundled toolchain and anything found on `PATH`.
|
|
85
|
+
|
|
86
|
+
## Getting Started
|
|
87
|
+
|
|
88
|
+
Open your project folder in VS Code, then use the Command Palette (⌘⇧P / Ctrl+Shift+P) for:
|
|
89
|
+
|
|
90
|
+
| Command | Effect |
|
|
91
|
+
|---|---|
|
|
92
|
+
| **Dialog IDE: Initialize Dialog Project** | Scaffold a new project into an empty folder: `dialog.json`, `main`/`lib`/`debug`/`test` directories, starter source, a placeholder `cover.png`, and the two "how to play IF" PDFs used by **Export Web Page...** |
|
|
93
|
+
| **Dialog IDE: New Skein...** | Create a new `.skein` file (prompts for a random seed and file name) |
|
|
94
|
+
| **Dialog IDE: Run Default Skein** | Run `default.skein` if one already exists |
|
|
95
|
+
| **Dialog IDE: Run Skein...** | Pick from any existing `.skein` file in the project |
|
|
96
|
+
| **Dialog IDE: Open Skein** | Reveal the Skein panel for whatever session is currently running |
|
|
97
|
+
| **Dialog IDE: Save Skein** | Save the current session's tree back to its `.skein` file |
|
|
98
|
+
| **Dialog IDE: Stop Skein** | Stop the running session |
|
|
99
|
+
| **Dialog IDE: Debug in Terminal** | Open a plain, unmanaged `dgdebug` session in a VS Code terminal |
|
|
100
|
+
| **Dialog IDE: Run Tests** | Run the project's unit tests (the `test` source category) in a VS Code terminal |
|
|
101
|
+
| **Dialog IDE: Add File to dialog.json...** | Add the current (or a picked) `.dg` file to one of dialog.json's source categories |
|
|
102
|
+
| **Dialog IDE: Configure Exports...** | Define named export configurations, and the project's default `dialogc` options (see [Building & Exporting](#building--exporting)) |
|
|
103
|
+
| **Dialog IDE: Export Dialog Project...** | Compile one of those export configurations |
|
|
104
|
+
| **Dialog IDE: Export Web Page...** | Build a downloadable web page for the project, with an in-browser player |
|
|
105
|
+
| **Dialog IDE: Add Feelie...** | Add an attachment (e.g. a PDF) that **Export Web Page...** links from the page |
|
|
106
|
+
| **Dialog IDE: Remove Feelie...** | Remove a previously added feelie |
|
|
107
|
+
|
|
108
|
+
A status bar item on the left also shows the current session (or lets you start the default one with a click).
|
|
109
|
+
|
|
110
|
+
**Dialog IDE: Run Tests** compiles with the `main`, `debug`, and `test` categories all active and runs `dgdebug` in a terminal - `test`'s own `lib/unit.dg` (see [Project Setup](#project-setup)) overrides `(program entry point)` to run every object with the `(test *)` trait instead of starting the game. Once the tests finish, dgdebug drops into its own `suspended>` debug prompt rather than quitting automatically, so the pass/fail output stays on screen - exit it yourself (`@quit` or Ctrl+D) once you've read the results. See the "Testing and Debugging" chapter of the Dialog manual (bundled with the [Dialog toolchain](https://github.com/dialog-if/dialog)'s own docs) for how to write `(test *)`/`(assert ...)` objects.
|
|
111
|
+
|
|
112
|
+
`.skein` files are plain text, designed to diff cleanly under version control - commit them alongside your source.
|
|
113
|
+
|
|
114
|
+
## Building & Exporting
|
|
115
|
+
|
|
116
|
+
**Dialog IDE: Configure Exports...** defines named export configurations, stored in `dialog.json`'s `exports` array: an output format (`zblorb`, `z8`, or `aa`), whether to include debug sources, an output path, and (optionally) extra `dialogc` options for that export specifically (e.g. `--heap 2000 --aux 1000`, for a project that needs a bigger heap). The same menu also sets a project-wide *default* set of `dialogc` options, used by any export configuration that doesn't specify its own, and by **Export Web Page...** (below).
|
|
117
|
+
|
|
118
|
+
**Dialog IDE: Export Dialog Project...** picks one of those configurations and compiles it with `dialogc`.
|
|
119
|
+
|
|
120
|
+
**Cover image.** If a `cover.png` exists at your project root (seeded automatically by **Initialize Dialog Project**, or add your own), a `zblorb` export bakes it in automatically via `dialogc`'s `--cover`/`--cover-alt` flags - no configuration needed.
|
|
121
|
+
|
|
122
|
+
**Dialog IDE: Export Web Page...** asks which of `dialog.json`'s named export configurations should build the downloadable story file (same picker as **Export Dialog Project...**), then builds a complete web page into `out/web/` (plus a zip at `out/<name>-<release>.zip`): that configuration's story file, compiled fresh with its own format/debug/`dialogc`-options settings; an in-browser player powered by [AAmachine](https://github.com/dialog-if/aamachine) (built separately as `aa`, unless the picked configuration is itself `aa`, in which case that same build drives both); the cover image, resized to a thumbnail; the project's configured feelies (below); and, if `default.skein` has a knot labeled `WALKTHROUGH`, a walkthrough transcript (everything from the root to that knot, skipping any command starting with `*`). Story title/author/blurb/release/IFID on the page come from the project's own `(story ...)` directives, queried live via `dgdebug`. Directs to **Configure Exports...** first if no export configurations are defined yet.
|
|
123
|
+
|
|
124
|
+
**Feelies.** A feelie is any attachment linked from the exported page - traditionally a "how to play interactive fiction" PDF for newcomers, but any file works. **Initialize Dialog Project** seeds two starter PDFs (`introduction-to-if.pdf`, `play-if-card.pdf`) and wires them into `dialog.json`'s `feelies` array automatically. Right-click a file in the Explorer and choose **Add Feelie** to attach it directly (or run **Dialog IDE: Add Feelie...** from the Command Palette, which prompts you to pick a file instead), then give it a display name; **Dialog IDE: Remove Feelie...** takes one out again. Unlike the cover image, a configured feelie whose file has gone missing is an error at export time, not a silent omission - fix the path in `dialog.json` or remove the feelie.
|
|
125
|
+
|
|
126
|
+
## Command-Line Interface
|
|
127
|
+
|
|
128
|
+
`dgbuild` runs project checks headlessly - no VS Code, no extension host - for scripts and CI (e.g. gating a release on a GitHub Action). Install it with `npm install -g dgbuild` (or use `npx dgbuild ...` without installing), then run it from your project root or pass `--project <dir>`:
|
|
129
|
+
|
|
130
|
+
- **`dgbuild test`** - runs the project's unit tests (`dgdebug --unit-test`) and exits non-zero on any failure, *or if `dialog.json` declares no `test` sources at all* (nothing to run is treated as a failure, not a silent pass). `--no-debug` excludes debug sources (included by default, matching **Dialog IDE: Run Tests**); extra arguments after the options are passed through to `dgdebug`.
|
|
131
|
+
- **`dgbuild run-skein [names...]`** - replays one or more saved skeins (default: `default`, matching `default.skein`) against a fresh `dgdebug` process each, exits non-zero if any knot's live response no longer matches its blessed response across any of them, and prints a `valid/new/error` count summary per skein plus a `total` line when running more than one, e.g. `default: 200/0/1 (valid/new/error)`. Errored knots are printed above the summary. Add `-v/--verbose` to see the underlying `dgdebug` process commands/lifecycle logging (suppressed by default - busy otherwise, especially with multiple skeins).
|
|
132
|
+
- **`dgbuild sources`** - prints the project's expanded source file list (`-d/--debug`, `-t/--test` to include those categories, `-T/--target <suffix>` to filter by target suffix, `-1/--single-line` for a colon-joined line instead of one path per line).
|
|
133
|
+
|
|
134
|
+
A minimal release-gating step in a GitHub Action:
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
- run: npx dgbuild test && npx dgbuild run-skein
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Using the Skein
|
|
141
|
+
|
|
142
|
+
The Skein panel opens beside your editor, split into a **nav graph** (left) and a **transcript** (right), with a command field at the bottom.
|
|
143
|
+
|
|
144
|
+
**Transcript.** Each knot shows a command and its response. The active knot (the one you're positioned at) has a blue left border. Others are colored by status:
|
|
145
|
+
|
|
146
|
+
| Color | Meaning |
|
|
147
|
+
|---|---|
|
|
148
|
+
| Grey | Valid - matches the blessed response |
|
|
149
|
+
| Yellow | New - no blessed response yet |
|
|
150
|
+
| Red | In error - the latest response doesn't match what's blessed |
|
|
151
|
+
|
|
152
|
+
New or errored knots are shown in a fixed-width font with visible whitespace, and word-level diffs (red for removed, blue for added) when a response has changed.
|
|
153
|
+
|
|
154
|
+
**Nav graph.** The full tree of every knot you've ever explored, color-coded the same way (with faded tinting on ancestors that have a new/errored descendant, so you can spot trouble without expanding every branch). Click any knot to make it active; the transcript updates to show the path down to it. Clicking through a chain with only one child at each step auto-expands down to the next branch or leaf.
|
|
155
|
+
|
|
156
|
+
**Blessing.** *Bless Knot* accepts that the active knot's response is correct; *Bless Transcript* blesses every knot visible in the transcript. Once blessed, a knot turns from new/error to valid.
|
|
157
|
+
|
|
158
|
+
**Replaying.** *Replay* re-runs the project from the root through the active knot and checks each response against what's blessed - the fast way to confirm a source change did what you intended. *Replay All* does this for every leaf in the tree at once, so you know the *entire* skein still holds together, not just the path you happen to be looking at.
|
|
159
|
+
|
|
160
|
+
**Time travel.** Click any earlier knot, then *New Child* to branch off with a different command from that point - nothing you already recorded is lost, it's just no longer on the displayed path.
|
|
161
|
+
|
|
162
|
+
**Trace and Dynamic State** (dgdebug only). From a knot's action menu, *Trace...* (also ⌥T) shows which predicates were tried, in what order, and why, with clickable links into your source; *Dynamic State...* shows exactly what changed in the game world as a result of that command. A navbar toggle can also switch on an always-visible summary of dynamic state changes, which are displayed inline in the transcript (after each knot).
|
|
163
|
+
|
|
164
|
+
## Keyboard shortcuts
|
|
165
|
+
|
|
166
|
+
The Skein is designed to be fully usable without a mouse (all shortcuts below are Option/⌥ on Mac, Alt on Windows/Linux):
|
|
167
|
+
|
|
168
|
+
| Shortcut | Action |
|
|
169
|
+
|---|---|
|
|
170
|
+
| ⌥↑ / ⌥↓ | Parent / child knot |
|
|
171
|
+
| ⌥← / ⌥→ | Previous / next sibling |
|
|
172
|
+
| ⌥⇧↑ / ⌥⇧↓ | First knot (root) / last knot (leaf) |
|
|
173
|
+
| ⌥B / ⌥⇧B | Bless Knot / Bless Transcript |
|
|
174
|
+
| ⌥R / ⌥⇧R | Replay to active knot / Replay All |
|
|
175
|
+
| ⌥A | New Child (time travel) |
|
|
176
|
+
| ⌥E | Edit Command |
|
|
177
|
+
| ⌥L | Edit Label |
|
|
178
|
+
| ⌥K | Toggle Lock |
|
|
179
|
+
| ⌥D | Delete |
|
|
180
|
+
| ⌥X | Toggle Expand (nav graph) |
|
|
181
|
+
| ⌥T | Trace... |
|
|
182
|
+
| ⌥F | Focus search |
|
|
183
|
+
| ⌘S / ⌘Z / ⌘⇧Z | Save / Undo / Redo |
|
|
184
|
+
|
|
185
|
+
Insert Parent and Splice Out are available from a knot's action menu but have no keyboard accelerator.
|
|
186
|
+
|
|
187
|
+
Undo/redo is unlimited and covers structural edits (bless, delete, splice, running a new command); it doesn't re-run anything, so it's always instant.
|
|
188
|
+
|
|
189
|
+
VS Code normally can't forward other keybindings through a webview at all (a platform limitation, not something extensions can fix generically), so Dialog IDE explicitly punches through ⌘⇧A / Ctrl+Shift+A to open the Command Palette while the Skein or Trace panel has focus - handy if you've remapped it there instead of the default ⌘⇧P / Ctrl+Shift+P.
|
|
190
|
+
|
|
191
|
+
## Known limitations
|
|
192
|
+
|
|
193
|
+
- `frotz`/`frotz-release` need `dfrotz` on `PATH` (or set as `binDir` in `dialog.json`) - unlike `dgdebug`/`dialogc`, it isn't bundled with the extension yet
|
|
194
|
+
- No "Reload from disk" action yet for picking up external changes to a `.skein` file
|
|
195
|
+
- Dynamic state and tracing require `dgdebug`, and are unavailable for a command that ends on a single-keystroke prompt (the debugger can't be interrupted mid-keystroke to ask for either)
|
|
196
|
+
- **Export Web Page...** needs `aambundle` (from [AAmachine](https://github.com/dialog-if/aamachine)) in addition to `dgdebug`/`dialogc` - see [Requirements](#requirements)
|
|
197
|
+
- An existing export configuration can't be edited in place yet - remove it and add it again with the new settings
|
|
198
|
+
|
|
199
|
+
## Future Improvements
|
|
200
|
+
|
|
201
|
+
This is an early release of the extension; we have many more features planned, including:
|
|
202
|
+
|
|
203
|
+
- Bundle `dfrotz` per platform, like `dgdebug`/`dialogc` already are
|
|
204
|
+
- Upload projects to the Interactive Fiction Archive
|
|
205
|
+
- Provide binaries for OS X on Intel hardware
|
|
206
|
+
|
|
207
|
+
Get involved at [Interactive Fiction Community Forum](https://intfiction.org/t/dialog-ide-0-0-1/81465/7) to provide feedback and ideas!
|
|
208
|
+
|
|
209
|
+
## License
|
|
210
|
+
|
|
211
|
+
[Apache License 2.0](LICENSE). The vendored `.dg` TextMate grammar and language configuration are separately MIT-licensed - see [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md).
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Third-Party Licenses
|
|
2
|
+
|
|
3
|
+
## `syntaxes/dialog.tmLanguage.json` and `language-configuration.json`
|
|
4
|
+
|
|
5
|
+
These two files are vendored, essentially verbatim, from the
|
|
6
|
+
[`dialog-language-support`](https://github.com/sideburns3000/vscode-dialog-language) VS Code
|
|
7
|
+
extension (version 1.1.0), by Michael Lauenstein. They provide the TextMate grammar and editor
|
|
8
|
+
configuration (comments, brackets, folding, indentation, word pattern) for Dialog's `.dg` source
|
|
9
|
+
files.
|
|
10
|
+
|
|
11
|
+
Nothing else from that extension was carried over — in particular its `dialog.compileTo*`
|
|
12
|
+
commands, `dialog` task type, problem matcher, and `dialog.compiler`/`dialog.includeWhenCompiling`
|
|
13
|
+
settings were deliberately not reimplemented or derived from, since Dialog IDE has its own
|
|
14
|
+
project-level build/export tooling planned that will cover the same ground independently.
|
|
15
|
+
|
|
16
|
+
The original extension is MIT licensed:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
MIT License
|
|
20
|
+
|
|
21
|
+
Copyright (c) 2019 Michael Lauenstein
|
|
22
|
+
|
|
23
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
24
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
25
|
+
in the Software without restriction, including without limitation the rights
|
|
26
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
28
|
+
furnished to do so, subject to the following conditions:
|
|
29
|
+
|
|
30
|
+
The above copyright notice and this permission notice shall be included in all
|
|
31
|
+
copies or substantial portions of the Software.
|
|
32
|
+
|
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
36
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
37
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
38
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
|
+
SOFTWARE.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## `bin/` — bundled `dgdebug`/`dialogc` binaries
|
|
43
|
+
|
|
44
|
+
Platform-specific builds of this extension (`win32-x64`, `darwin-arm64`, `linux-x64`) bundle the
|
|
45
|
+
`dgdebug` and `dialogc` binaries under `bin/<target>/`. These are unmodified, prebuilt
|
|
46
|
+
redistributions from the [Dialog-IF/dialog](https://github.com/Dialog-IF/dialog) project — a
|
|
47
|
+
community-maintained fork of the Dialog interactive fiction language originally created by
|
|
48
|
+
Linus Åkesson — taken from the release pinned in `scripts/dialog-toolchain-version.json`
|
|
49
|
+
(currently `release-1c02-1.2.3`). They are staged at package time by
|
|
50
|
+
`scripts/fetch-dialog-binaries.js` and are not bundled in the universal (no-target) package,
|
|
51
|
+
which continues to rely on `PATH`/`dialog.json`'s `binDir` like every prior release of this
|
|
52
|
+
extension.
|
|
53
|
+
|
|
54
|
+
The upstream `license.txt` (2-clause-BSD-style, permitting binary redistribution with the
|
|
55
|
+
copyright notice retained), reproduced verbatim:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Copyright 2018-2026 Linus Åkesson and the Dialog Project contributors
|
|
59
|
+
|
|
60
|
+
Redistribution and use in source and binary forms, with or without
|
|
61
|
+
modification, are permitted provided that the following conditions are met:
|
|
62
|
+
|
|
63
|
+
1. Redistributions of source code must retain the above copyright
|
|
64
|
+
notice, this list of conditions and the following disclaimer.
|
|
65
|
+
|
|
66
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
67
|
+
notice, this list of conditions and the following disclaimer in the
|
|
68
|
+
documentation and/or other materials provided with the distribution.
|
|
69
|
+
|
|
70
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
71
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
72
|
+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
73
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
74
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
75
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
76
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
77
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
78
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
79
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
80
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
81
|
+
|
|
82
|
+
This license is intended to apply to the Dialog compiler and debugger and
|
|
83
|
+
the source code of the standard libraries. Any time those components are
|
|
84
|
+
distributed, this copyright notice should be attached. But it is not meant
|
|
85
|
+
to limit what the compiler's output can be used for, even for projects that
|
|
86
|
+
include the standard libraries. To make this explicit, the project is ALSO
|
|
87
|
+
released under a modified two-clause BSD license, which is exactly the same
|
|
88
|
+
as the above but adds this exception:
|
|
89
|
+
|
|
90
|
+
As an exception, if, as a result of you compiling your source code,
|
|
91
|
+
portions of this software are embedded into compiler output in binary
|
|
92
|
+
form, you may redistribute such embedded portions without complying
|
|
93
|
+
with condition 2 of the license.
|
|
94
|
+
|
|
95
|
+
In other words, you can distribute the Z-machine and Å-machine bytecode that
|
|
96
|
+
the compiler produces in any way you like, without needing to include this
|
|
97
|
+
license file or comply with the attribution requirements (for the library
|
|
98
|
+
or for the Z-machine runtime routines).
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
(The full upstream `license.txt` also covers the Windows GUI debugger's bundled Glk/WinGlk/libogg/
|
|
102
|
+
libvorbis components — this extension does not bundle `dgdebug_gui.exe` or `Glk.dll`, only the
|
|
103
|
+
console `dgdebug`/`dialogc` binaries covered by the BSD-style block above.)
|
|
104
|
+
|
|
105
|
+
## `bin/` — bundled `aambundle` binary
|
|
106
|
+
|
|
107
|
+
The same platform-specific builds also bundle `aambundle` under `bin/<target>/`, alongside
|
|
108
|
+
`dgdebug`/`dialogc`. This is an unmodified, prebuilt redistribution from the
|
|
109
|
+
[Dialog-IF/aamachine](https://github.com/Dialog-IF/aamachine) project (the Å-machine, used by
|
|
110
|
+
"Export Web Page..." to produce an in-browser player for the exported story), taken from the
|
|
111
|
+
release pinned in `scripts/dialog-toolchain-version.json` (currently `release-1.0.1`) and staged
|
|
112
|
+
by the same `scripts/fetch-dialog-binaries.js`. Only `aambundle` itself is bundled — not
|
|
113
|
+
`aamrun`/`aamshow`, which this extension doesn't use.
|
|
114
|
+
|
|
115
|
+
The upstream `license.txt` (2-clause-BSD-style, permitting binary redistribution with the
|
|
116
|
+
copyright notice retained), reproduced verbatim:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Copyright 2019-2026 Linus Åkesson and the Dialog Project
|
|
120
|
+
|
|
121
|
+
Redistribution and use in source and binary forms, with or without
|
|
122
|
+
modification, are permitted provided that the following conditions are met:
|
|
123
|
+
|
|
124
|
+
1. Redistributions of source code must retain the above copyright
|
|
125
|
+
notice, this list of conditions and the following disclaimer.
|
|
126
|
+
|
|
127
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
128
|
+
notice, this list of conditions and the following disclaimer in the
|
|
129
|
+
documentation and/or other materials provided with the distribution.
|
|
130
|
+
|
|
131
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
132
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
133
|
+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
134
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
135
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
136
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
137
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
138
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
139
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
140
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
141
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
142
|
+
|
|
143
|
+
Note that the aambundle tool will automatically insert a license file that
|
|
144
|
+
complies with these requirements.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
(The full upstream `license.txt` also covers jquery/minimist, redistributed by `aambundle`
|
|
148
|
+
itself inside the web-player output it generates at export time — not something this extension
|
|
149
|
+
vendors separately — and a public-domain 6502 emulator used only by `aambox6502`, which this
|
|
150
|
+
extension does not bundle.)
|
|
151
|
+
|
|
152
|
+
## `resources/bundle/` — vendored web-export assets
|
|
153
|
+
|
|
154
|
+
`default-cover.png`, `style.css`, `play.css`, `introduction-to-if.pdf`, and `play-if-card.pdf`
|
|
155
|
+
under `resources/bundle/` are copied from the
|
|
156
|
+
[dialog-tool](https://github.com/hlship/dialog-tool) project (the same author, also Apache-2.0
|
|
157
|
+
licensed) to keep "Export Web Page..." at feature parity with dialog-tool's own `dgt bundle`.
|