Files
plugins/packages/output-strategy/package.json
T
Mañjūṣaka 006e96ef03 output-strategy 0.2.1: finish #814's review follow-ups (#815)
Follow-up to #814 (081c67ac). The core request injection is unchanged.

- Page: static text goes back to English when magpie.theme.lang changes
  from zh to en. Unsaved style picks survive a language change, and the
  title follows the language. zh / zh-CN / zh-Hans use the Simplified
  strings. zh-TW and other languages fall back to English on purpose,
  with <html lang> kept as zh-TW. With no host theme, the page loads in
  English without throwing.
- apply.js: an empty system message gets the style block with no
  leading blank lines. The unused media detector and addedBytes are
  removed.
- style.css: obsolete stats/lang/workspace rules are removed, and the
  720px media block is closed again (52 { / 52 }).
- Tests: lowercase "delete" in the cross-turn cache case;
  empty/null/object system; zh -> en restore; unsaved picks kept;
  zh-TW; a missing theme; style.css brace balance and the version.
- PROVENANCE names ANTISLOP_BOUNDARIES (OmniRoute v3.8.52), checked
  byte for byte against the tag. The page/stats.js ignore is gone.
- Version 0.2.1. dist had only 0.2.0, and npm has no version yet.

Run at 2f971ab9 (mote, Bun 1.4.2, fresh HOME):
- package bun test: 55 pass, 0 fail;
- repo bun test: 6561 pass, 20 skip, 0 fail;
- scripts/check.mjs output-strategy: ok;
- CI run 42320776930 at this head, attempt 1: test and on-npm green;
- page render, main vs head, in Chromium and WebKit at 400/700/1000px:
  identical.
Broken by hand, each turning exactly one test red: the dropped }, the
version at 0.2.0, an unguarded theme.lang, the old conditional
applyTheme, a case-sensitive delete skip, the old appendInstruction,
one-way translate, unkept checkbox state, the old zh* normalize, and
addedBytes put back.
Not tried: a live theme switch in the real magpie window, and real
Claude Code/Codex sessions.
2026-11-07 09:10:31 +08:00

50 lines
1.2 KiB
JSON

{
"name": "@magpie-community/middleware-output-strategy",
"version": "0.2.1",
"description": "Composable output-style instructions injected before the model call, with a small selection panel",
"type": "module",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/output-strategy"
},
"files": [
"output-strategy.middleware.js",
"apply.js",
"catalog.js",
"scripts/gen-page-catalog.mjs",
"page/*.html",
"page/*.js",
"page/*.css",
"README.md",
"LICENSE",
"PROVENANCE.json",
"LICENSES/"
],
"keywords": ["magpie", "magpie-middleware", "output-styles", "prompt"],
"magpie": {
"middleware": "./output-strategy.middleware.js",
"page": {
"title": "Output Strategy",
"titles": { "zh": "输出策略" },
"file": "page/index.html"
},
"options": {
"styles": {
"terse-prose": false,
"less-code": false,
"ponytail": false,
"i-have-adhd": false,
"terse-cjk": false,
"antislop-ui": false,
"antislop-copy": false
}
}
},
"scripts": {
"build:catalog": "node scripts/gen-page-catalog.mjs",
"test": "bun test"
}
}