Skip to content

fix(pstack): packaged desktop builds load pstack, and T3 hides native pstack plugins - #46

Merged
ScriptedAlchemy merged 5 commits into
mainfrom
fix/pstack-packaged-runtime-files
Nov 3, 2026
Merged

ScriptedAlchemy merged 5 commits into
mainfrom
fix/pstack-packaged-runtime-files

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Problem

With pstack turned on, the packaged desktop app never showed pstack: skills in any provider, OpenCode included. Desktop builds prune skills/statechart/scripts/test from the bundled pack (prunePackagedPstackTestFixtures), but the server still copied every file in UPSTREAM.json. Materializing the pack failed with ENOENT … ConfigOracle.java, and the catalog came back empty.

Separately, Codex and Claude sessions that had their own pstack plugin installed (for example pstack@pstack-codex) registered a second, single-provider copy beside T3's pack.

Fix

  • pstackPackEntries skips the same directory the desktop build prunes. Against the installed Nightly bundle, all 204 runtime entries now resolve; before the fix, 376 were missing.
  • While pstackEnabled is on, T3 switches off native pstack@* plugins in the sessions it launches. The user's own config files are not changed, so sessions outside T3 keep their plugins.
    • Codex: -c plugins.<key>.enabled=false for each pstack plugin declared in the Codex home's config.toml. The quoted form plugins."pstack@x".enabled is silently ignored because Codex splits -c keys on dots and keeps the quotes. Verified with codex-cli 0.166.0 skills/list: 141 → 87 skills, all 54 pstack: skills removed.
    • Claude: enabledPlugins: { "pstack@x": false } in the SDK flag settings, which take precedence over the user and project settings files. Not tested against a live Claude session, because no Claude pstack plugin was installed on the test machine.
  • Parse Codex plugin settings as TOML so single-quoted tables, dotted assignments, and inline tables are handled correctly, without treating text inside multiline strings as configuration.
  • Include Claude inline and file-based --settings plugin values in the suppression decision, including version-constraint arrays and objects supported by the installed SDK. Preserve file/launch precedence, unrelated plugins, and native pstack when T3's pstack setting is off.
  • User doc updated. Cursor installs are still only replaced in the composer.

Tests

  • packages/pstack/src/check.test.ts: delivery omits the pruned fixture directory.
  • apps/server/src/pstack/nativePlugins.test.ts: Codex config parsing and the Claude override map.
  • Three CodexAdapterV2 "post-settle continuation" tests fail on unmodified main as well. They are unrelated to this change.

🤖 Generated with Claude Code

Follow-up repairs and validation

Latest repair: 362e874.

This merges #51 into this branch, resolves their overlapping pack filter, and retains #51's shared prune constant and packaging regressions alongside the native-plugin fixes. Both branch histories are preserved, so the packaging repair no longer conflicts with this PR.

The additional Claude defect was reproduced before repair: array/object plugin values in launch settings stayed enabled, and file-derived extended values were discarded before suppression. T3 now preserves those raw settings and disables effective pstack entries unless explicitly false. Existing native skill-discovery selection behavior is unchanged.

  • 13 focused behavior and packaging tests passed across five files: five Claude adapter/native-helper/discovery tests and eight pack-interface/Windows payload tests.
  • Both expanded Claude outgoing SDK-setting regressions failed before the fix and passed afterward. Coverage includes inline/file launch settings, extended file values, precedence, unrelated plugins, and pstack enabled/disabled.
  • Direct server and scripts typechecks passed.
  • Frozen dependency installation and supply-chain verification passed. Unused-patch validation, formatting, lint, both knip passes, GraphQL checks, and Git whitespace checks passed.
  • The required check:changed --concurrency 1 --timeout 300 was attempted. Its native addon prerequisite timed out after 300 seconds, and its cached typecheck supervisor was denied seccomp_unotify. After the useful fast checks completed, the remaining wrapper waiting on the native prerequisite was interrupted. The aggregate did not complete or pass. The focused tests and direct typechecks above passed independently; hosted CI remains a separate gate.
  • The published tree exactly matches the reviewed local merge tree.

Follow-up review and repairs: GPT-6 Astra Pro through ChatGPT coding tools.

… pstack plugins

Desktop builds prune the statechart skill's test corpus, but the server still
copied every manifest file, so the pack never materialized and no provider saw
pstack. Delivery now skips the pruned directory.

While pstack is on, T3 also switches off native `pstack@<marketplace>` plugins
in the Codex and Claude sessions it launches, so agents see one copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 362e874

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ScriptedAlchemy and others added 4 commits November 2, 2026 21:35
Packaged desktop builds delete the statechart test corpus from the bundled
pstack resources, but the server still copied every file in UPSTREAM.json,
so materializing the pack failed with ENOENT and no /pstack:* skills loaded.

The pruned directory is now one exported constant in @t3tools/pstack.
pstackPackEntries excludes it from the runtime pack and the desktop build
prunes exactly that directory, so a packaged source root is complete by
construction. checkPack still verifies the full upstream source.

Claude Opus 5.5 via T3 Code

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The unit test hardcoded the pruned directory, so a typo in
PSTACK_PACKAGED_PRUNED_DIR would still pass it. It now derives the
fixture paths from the constant, and a new case checks the shipped
UPSTREAM.json actually carries files under that prefix so an upstream
re-sync that renames the corpus cannot turn the filter into a no-op.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Parse Codex plugin configuration as TOML and include Claude launch settings when suppressing duplicate native pstack plugins. Cover quoted/dotted/inline TOML and inline/file --settings, preserving unrelated plugins and pstack-disabled sessions.

Reviewed and repaired with GPT-6 Astra Pro through ChatGPT coding tools.
Keep the shared packaged-file pruning implementation from PR #51 alongside native plugin suppression. Preserve Claude's version-constrained plugin settings while suppressing native pstack whenever T3's pack is enabled.
@ScriptedAlchemy
ScriptedAlchemy merged commit 94e1eca into main Nov 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant