Skip to content

[feat] plugins: add optional creative skills for each harness - #371

Open
wuli666 wants to merge 3 commits into
ThinkFlowLab:mainfrom
wuli666:feat/issue-114-optional-plugins
Open

wuli666 wants to merge 3 commits into
ThinkFlowLab:mainfrom
wuli666:feat/issue-114-optional-plugins

Conversation

@wuli666

@wuli666 wuli666 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Users can install optional creative Skill packages from Settings → Plugins and enable them independently for Default, OpenCode, Codex, Claude Code, JiuwenSwarm and DeepSeek Harness. Packages start disabled and stay out of each harness's Skill catalog until enabled.

  • Accept local directories/ZIPs inside the backend workspace, uploaded ZIPs and public HTTPS ZIP URLs. Keep source strings and uploaded bytes in separate validated entry points so direct Path inputs cannot bypass authorization. Exclude the workspace root and project/internal storage from local sources; use pinned file handles to reject link replacement and hard links. Validate manifests, exact dependency versions, package digests and download destinations before registration; installation never executes package hooks.
  • Reuse native Skill discovery and per-turn snapshots. Plugin changes invalidate native-session reuse while preserving saved conversation history; disabling or uninstalling preserves editable project assets and accepted turns.
  • Ship bilingual settings/errors/docs, an explicitly installed Creative brief example and a custom package scaffold. Wheels include the discovery catalog, not optional Skill payloads.

Linked issue

Refs #114. Builds on the harness/Skill foundation in #113.

  • Linked issue included

Labels

  • Requested: type:feat, area:agent, area:harness, area:i18n. GitHub rejected manual label assignment for the fork author; repository automation or a maintainer must apply them.

Test plan

Validation for the feature and follow-up commits, based on 526ece2a; current head is 34624ad5:

  • python -m pre_commit run --from-ref origin/main --to-ref HEAD
  • Current entry-point fix (34624ad5): plugin and localization suites 90 passed, independently reproduced by Antigravity. Six wrong-type regression cases reject path objects, raw archives on the source entry, and unsupported values before package registration; URL redaction and upload provenance are also checked.
  • Filesystem-boundary fix (de7fd6b2): 208 passed, 15 Windows-only skipped across plugin, execution-file, artifact, timeline-package, native-session, Skill-snapshot, conversation and localization tests. The final plugin suite now contains 83 tests.
  • npm test: 820 passed before the path-boundary follow-up; that follow-up changes backend behavior, locale copy and browser coverage. npm run build passed again on the filesystem-boundary patch; the current-head frontend CI also passed.
  • npm run check:i18n: 3041 keys, 0 problems; browser manifest/locale checks and generated creation contracts passed.
  • tests/browser/plugins.mjs passed again against the production preview and an isolated real backend: installation, default-disabled state, per-harness native discovery, disabling, ZIP replay, reload, bilingual path-boundary and stale-Skill rejection, and uninstall.
  • Wheel inspection verified the metadata-only discovery catalog and exclusion of optional Skill payloads.

Remote CI on 34624ad5: all 12 checks passed. Release checks passed Python, frontend, all three browser suites and packaging checks on Ubuntu. CodeQL completed both language analyses, and the alert gate passed with no new findings in changed code. The current PR workflow has no native Windows job; native Windows remains unverified.

Security follow-up: Local package reads enforce workspace scope, use pinned handles, reject hard links and validate malformed paths. Full SARIF evidence identified a remaining fallthrough in the mixed source/archive installer. 34624ad5 separates source strings from archive bytes, rejects unexpected input types and reuses the unchanged atomic registration logic. Antigravity approved the exact patch. CodeQL on 34624ad5 passed with no new alerts in changed code and zero annotations; both Python and JavaScript/TypeScript analyses completed successfully.

Evidence that it works

The browser scenario uses real plugin storage and the bundled native Skill loader. It verifies that enabling DeepSeek Harness does not enable Default, disabling removes the Skill from discovery, stale selections return localized 409 errors, and replaying the same ZIP preserves activation. A publication regression confirms that the resulting text asset remains editable after uninstall.

  • Bilingual browser screenshots attached. The reproducible browser script generates the screenshots; no real model calls are required.

Independent Antigravity review passed after fixing the original five findings (nested Skill injection, local-path normalization, Windows filename validation, damaged-cache recovery and localized stale-Skill errors). Its additional path-boundary review caught and verified fixes for incomplete validation flow, link-replacement/hard-link reads and NUL-input errors. The filesystem review independently passed 119 targeted tests, confirmed existing empty-artifact rejection, and ran 250 concurrent link-replacement attempts inside an allowed package directory with zero outside-file disclosure. The entry-point follow-up review also passed with 90 tests and verified all 21 code flows behind the seven remaining alerts against the actual SARIF. No accepted review blockers remain, and the remote CodeQL gate passed. Native Windows remains unverified.

Provider verification

  • No real paid-provider calls were made. HTTP downloads and assistant execution use doubles where relevant; package storage, native Skill discovery, snapshots, project asset publication/editing and browser interactions use actual local implementations.
  • Native Windows filesystem/handle behavior and live conversations with all external harness CLIs remain unverified. Local checks ran on macOS; remote PR tests run on Ubuntu.
  • The official example's GitHub main ZIP URL becomes available after merge. Source-checkout installation and ZIP upload work now; the wheel download path is tested with an HTTP double.

Bilingual UI

  • zh-CN and en-US strings and user guides ship together. Both languages were inspected in the production browser flow.

## summary

- Install validated local or public HTTPS Skill packages into a locked
  workspace registry, with explicit activation and exact dependencies.
- Filter native Skill discovery per harness and preserve accepted turn
  snapshots, conversation history and editable project outputs.
- Add bilingual plugin settings, an optional creative brief example,
  a custom package scaffold and installation and authoring guides.
- Cover archive and download boundaries, damaged-cache recovery,
  session invalidation and the bilingual browser workflow.

## validation

- Related Python regressions: 105 passed; final plugin suite: 59 passed.
- Frontend tests: 818 passed; production build and wheel inspection passed.
- Bilingual plugin browser flow, i18n, contracts and import checks passed.
- Antigravity independently closed all five initial review findings.
- No real paid-model calls or native Windows filesystem validation.

Refs: ThinkFlowLab#114
## summary

- Limit local sources to package folders inside the backend workspace,
  excluding project and internal storage; retain ZIP upload elsewhere.
- Read package files through pinned handles to reject link replacement
  and hard links, and validate control characters before path handling.
- Preserve empty plugin resources without relaxing execution-artifact
  defaults, with bilingual guidance and boundary regression coverage.

## validation

- Related Python checks: 208 passed; 15 Windows-only cases skipped.
- Production browser plugin flow, build, i18n and static checks passed.
- Antigravity independently rechecked 119 tests and 250 concurrent
  link-replacement attempts with no outside-file disclosure.
- CodeQL and native Windows verification remain for remote CI.

Refs: ThinkFlowLab#114
## summary

- Require source strings to pass source resolution and authorization;
  reject direct Path and other unexpected input types.
- Route uploaded ZIP bytes through a separate archive entry while
  sharing the existing atomic, idempotent package registration.
- Cover wrong input types, upload provenance and URL parameter redaction,
  and record the mixed-entry boundary lesson.

## validation

- Plugin and localization tests: 90 passed.
- File-scoped pre-commit checks passed.
- Antigravity independently reviewed this exact patch and passed it.

Refs: ThinkFlowLab#114
@wuli666
wuli666 marked this pull request as ready for review November 17, 2026 01:52
@github-actions github-actions Bot added area:agent Agent runtime, assistant chat and tools area:harness Harness and skill integration (Default, OpenCode, Codex, Claude Code, Jiuwen, DSH) area:i18n Localisation and bilingual UI type:feat New capability or behaviour labels Nov 17, 2026
@github-actions
github-actions Bot requested review from FayeSpica and wuzhf9 November 17, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent runtime, assistant chat and tools area:harness Harness and skill integration (Default, OpenCode, Codex, Claude Code, Jiuwen, DSH) area:i18n Localisation and bilingual UI type:feat New capability or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants