Repository navigation
feat(zcode-context-insight): add full featured orginal context insight plugin - #112
Open
bowenliang123 wants to merge 1 commit into
Open
bowenliang123 wants to merge 1 commit into
bowenliang123 wants to merge 1 commit into
Conversation
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
Author
|
补充一个请求:如果维护者认为合适,我希望用本仓库的实现直接替换市场里现有的 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source repository: bowenliang123/zcode-context-insight — the implementation submitted in this PR.
Provenance, authorship and licensing (please read first)
This PR is not another context-insight project. I am the author of dsh-context, the original context insight and management plugin (Apache-2.0; 2,360 stars, 73 forks, and 164,775 npm package downloads in the 30 days ending 2026-10-18). This PR is my ZCode adaptation of that work.
I am submitting it because the marketplace already lists a separate
zcode-contextplugin by Kevinzzz6 (repository). That project claims to be a copycat “reimplementation” ofdsh-context, but its own public documentation is a feature-by-feature map of what it took fromdsh-contextand what it still intended to take; it then ships the result under its own name and a more permissive license. In plain terms, this is not inspiration—it is appropriation of the original product's core experience:docs/dsh-comparison.mdis a feature-by-feature gap analysis againstdsh-context0.69.1. It lists dsh's views and capabilities as the target, includes a section named “还没有借鉴的功能” (“features not yet borrowed”), and states that most gaps were implemented in 0.3.x. That is more than a passing reference to interaction flow.I am not asking this PR to remove or replace
zcode-context; this PR only adds a separate plugin. I am asking the maintainers to review the existing entry's provenance and licensing:dsh-contextas its design source, and its comparison document tracks dsh's views and features as the target. If that extends to Apache-2.0 code or derived material, Kevinzzz6 cannot relicense it under MIT: MIT drops Apache-2.0's attribution, NOTICE and patent terms, and cannot wash the upstream license off copied code. I consider this license substitution unreasonable and legally invalid for any Apache-2.0-derived material. The marketplace should treat it as a compliance violation unless the author can demonstrate a clean-room implementation.dsh-contextis licensed under Apache-2.0.zcode-contextpackage is distributed as MIT and contains only an MITLICENSE; it does not include the Apache-2.0 license or aNOTICEfordsh-context.On user value, the existing 0.3.10 entry is functionally incomplete and does not represent the complete product vision: it exposes only 2 app-only tools and 4 views, and omits the full request browser, file activity, fleet, cross-session insights, preferences and the model-visible
/contextreport. It gives ZCode users a fragment of the intended experience, not the full product. This submission is the fuller implementation: it includes the context dashboard and metrics strip, composition and current-context detail with donut charts, trend/DNA, request browser, events, file activity, fleet and cross-session insights, preferences, the/contextcommand and a skill. It exposes 14 tools (13 app-only, plus the model-visibleget_context_report).Scope: this PR adds
zcode-context-insight0.1.0 only. It does not modify the existingzcode-contextentry. The new plugin is Apache-2.0, with aNOTICEcreditingdsh-context, ZCode, models.dev and the DeepSeek image-token calculator.Plugin type (required) / 插件类型(必填)
Affected plugin name(s) / 涉及的插件名称:
zcode-context-insightWhat / 改动内容
Adds
zcode-context-insight0.1.0, a read-only, offline context insight panel for ZCode: per-request composition, trend/DNA, request browser, injections/compactions, file activity, agent fleet, cross-session insights and preferences, plus a/contextcommand and a skill.This is a separate plugin from the existing
zcode-context; it does not modify or replace it. The plugin is installed as a session-scopedui.surfacespanel (ui://zcode-context-insight/context.html).Screenshots
Current implementation, captured from the built panel with live local data.
More screenshots: trend overview and DNA fingerprints
Read-only and side effects / 只读与副作用
PRAGMA query_only; no migrations, session writes or locks.preferences.jsonunderZCODE_PLUGIN_DATA._meta["com.zcode/request-context"].get_context_reportis visible to the model for/context.~/.zcode/cli(db/,rollout/,debug/,log/) and the provider/retention configuration;dataRoot,dbPath,contextWindowandpriceFileare configurable.Version, packaging and licensing / 版本、打包与许可
0.1.0in bothplugin.jsonandmarketplace.json; source./external_plugins/zcode-context-insight; categorydeveloper-tools.description_i18nforenandzh-CN, 512×512 PNG icon atassets/zcode-context-insight/icon.png.NOTICEcredits dsh-context, ZCode, models.dev and the DeepSeek image-token calculator; the build emitsTHIRD_PARTY_NOTICES.txtfor bundled dependencies.dist/, secrets, machine-specific paths or private dependencies are committed; the release pipeline builds the artifact.Verification / 验证
python3 scripts/validate.py→ OK: 47 plugins.python3 -m unittest tests.test_icon_assets→ 3/3.python3 -m unittest tests.test_generated_outputs→ 3/3.pnpm install --filter zcode-context-insight --frozen-lockfile→ lockfile up to date.pnpm --filter zcode-context-insight run build→ server/worker/HTML built.pnpm --filter zcode-context-insight test→ 11/11.node scripts/test-mcp-app-artifacts.mjs→ PASS isolated artifactzcode-context-insight@0.1.0.build_dist.build_zip→ 3.04 MB artifact.docs/verification.md; screenshots are in the plugin README.Self-check / 自查清单
zcode-context-insightlisted.external_plugins/zcode-context-insight/.categoryisdeveloper-tools.versionis set in bothplugin.jsonandmarketplace.json.README.mdandREADME_CN.mdare equivalent.description_i18nhas bothenandzh-CN.python3 scripts/validate.pypasses; the plugin artifact zip passesbuild_dist.build_zip(the fullbuild_dist.pyruns in CI).