Commit Graph
8 Commits
Author SHA1 Message Date
Yichen Jiang 35953a75de fix(forge): classify the panel's Host imports under the published dependency policy
verify-package-dependencies now covers experimental Client packages, and the
forge panel's Host face imported four workspace values that no policy entry
classified. appendPluginRecord writes through the Session class's private log,
and readers recognize a deadline's TimeoutReason only by instanceof, so both
need the provider's shared instance. pluginRecordOf and generatedWorktreeName
keep no state; classifying them as peer-required keeps the panel's existing
Session and worktree peer edges.

With the exports classified, the fixer keeps worktree, Session, and timeout as
the panel's only workspace peers, moves its type-only relationships to
devDependencies and dsh-typert-protocol to dependencies, and regenerates the
lockfile and the module graph.

verify-plugin-record-callers counts a string literal that spells
appendPluginRecord as a caller, so it now admits the dependency policy file,
which names the export to classify it and never calls it.
2026-10-20 12:02:57 +08:00
Tianyi Cui c954a07535 docs(session): separate experimental persistence catalogue 2026-10-05 18:09:01 +08:00
Tianyi Cui bb405d51fa fix(scripts): normalize plugin record compiler paths 2026-10-05 17:43:56 +08:00
Tianyi Cui dd302f718b feat(session): catalogue experimental plugin records 2026-10-05 17:20:26 +08:00
Tianyi Cui 3a221c87e3 fix(scripts): find plugin record calls spelled with legacy octal escapes
A sloppy-mode .cjs or .js file can spell the name as '\141ppendPluginRecord',
which TypeScript decodes to appendPluginRecord, but the prefilter only
removed the backslash and skipped the file. The prefilter now decodes a
legacy octal escape as TypeScript does, taking three digits only after
0 to 3, so the value stays within 0o377. The spec rejects two spellings
that use three-digit octal escapes, and tests the decoder itself for
the digit limit, which no spelling of the name, whose letters are all
0o1xx, can exercise.
2026-10-05 09:55:14 +08:00
Tianyi Cui 8c6d23c128 fix(scripts): find plugin record calls spelled with any escape
The caller gate parsed only files whose text held appendPluginRecord or a
\u escape, so a release package could reach the function through
S['\x61ppendPluginRecord'], a \u{61} code point escape, a needless
character escape, or a line continuation, which TypeScript reads as the
same string. The gate now also parses a file when its text with every
escape unescaped holds the name, and its spec rejects each spelling.
2026-10-05 08:57:58 +08:00
Tianyi Cui 1678f0f5f5 fix(session): address review of plugin records
- Make the record commit an ES private method, so appendPluginRecord()
  is its only runtime entry.
- Document PluginRecordType and PluginRecord on the session subsystem
  page, and state in the README and JSDoc that the V3-to-V4 edge renames
  unknown ignorable V3 events into the plugin: namespace and that plugins
  outside this repository must not call the writer.
- The caller gate parses only files that contain the name or a \u
  escape, documents that wildcard re-exports are not reported, and its
  spec reads a temporary repository instead of this checkout.
- Cover Session.fromRestore in the record test and name SessionEventMap
  in the catalog generator's diagnostic.
2026-10-05 08:57:58 +08:00
Tianyi Cui 75542dd10a feat(session): let experimental packages append plugin records
Add appendPluginRecord(), which appends one ignorable event whose type is
`plugin:` followed by lowercase slash-separated segments, and
pluginRecordOf(), which reads such an event back. Records are not
SessionEventMap members, so the persistence catalog is unchanged; a build
that does not recognize one retains and skips it, and records never enter
the model-visible surface. Resume and fork carry them with the log, and a
format migration keeps them on a best-effort basis.

Only production source under packages/experimental/ may call the writer.
The verify-plugin-record-callers hygiene gate checks every reference in
repository sources, and the persistence catalog generator rejects a
SessionEventMap member in the plugin: namespace.

Session.append() and the record writer share one commit path, so a record
follows the same reentrancy, detach, and observer-containment rules. The
ignorable-events decision, the session README, the format-version
cookbook, and the plugin-author practices describe the records.
2026-10-05 08:57:58 +08:00