Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
433 changes: 217 additions & 216 deletions README.md

Large diffs are not rendered by default.

433 changes: 217 additions & 216 deletions README.zh-CN.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schemaVersion": 1,
"name": "tlk1973-gear-measurement-selector",
"displayName": "Gear Measurement Scheme Selector",
"version": "1.0.0",
"description": "Selects contact and non-contact gear measurement equipment: records workpiece, accuracy, space, environment and budget constraints, then produces a filterable comparison table, a ranked recommendation, site/environment/auxiliary configuration lists, and a shareable HTML or Markdown comparison sheet.",
"author": "TLK1973",
"icon": "icon.png",
"category": "Business",
"exampleQueries": [
"Open the gear measurement scheme selector",
"Enter an aerospace gear accuracy and space constraint and generate a selection recommendation",
"Export the gear measurement equipment comparison table"
],
"apps": [],
"mcpServers": [],
"skills": []
}
21 changes: 21 additions & 0 deletions plugins/tlk1973/tlk1973-gear-measurement-selector/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 TLK1973

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
112 changes: 112 additions & 0 deletions plugins/tlk1973/tlk1973-gear-measurement-selector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Gear Measurement Scheme Selector

A Mini App that turns a gear-measurement requirement into a defensible equipment shortlist.
Record the workpiece, the target tolerance, the laboratory space, the environment and the budget;
the app scores every candidate machine against hard constraints and soft criteria, then writes a
main device recommendation, a set of complementary device roles, and site, environment and
auxiliary-equipment configuration lists.

The included library covers 15 machines across contact, optical, hybrid, X-ray CT and laser
confocal measurement principles, with each numeric value carrying an evidence grade and an explicit
"not yet verified" marker where a first-party source was not available.

## What it does

- **Requirement capture** — workpiece class, module, outer diameter, face width, target tolerance,
annual volume, judgement type, laboratory space, environment conditions, budget ceiling and the
acceptance criteria you must require from the vendor.
- **Filterable comparison table** — search by brand, model or use case; filter by role (main-device
candidate, complementary device, excluded), measurement principle and evidence grade; sort by any
score column.
- **Two decision modes** — accuracy-first (accuracy 0.50 / stability 0.25 / fit 0.15 / cost 0.10)
and stability-first (accuracy 0.30 / stability 0.40 / fit 0.20 / cost 0.10). The active weights
are printed under the table so the ranking is reproducible.
- **Hard-constraint gating** — coverage, space, environment and measurement-principle compatibility
are gates, not weights. A machine that cannot legally make the requested judgement is reported as
a mismatch instead of being quietly ranked lower.
- **Main device plus complementary roles** — a machine that cannot judge but can measure waviness,
screen at line rate, inspect internals or profile a cutting edge is routed to that role rather
than discarded.
- **Configuration lists** — site works, environment controls and auxiliary equipment, each item
stating its basis (which device attribute or requirement produced it).
- **Shareable output** — export the current comparison, recommendation and configuration lists as a
standalone HTML document or a Markdown file that leaves the app entirely.
- **Optional online refresh** — fetch the vendor's current product page and show the specification
snippets found. The built-in verified library is never overwritten, and a failed fetch keeps the
built-in value and says so.

## How to install and open it

1. Copy this package into the MiniMax Code plugin directory, or publish it as a local Mini App
package.
2. Open MiniMax Code and select the "Gear Measurement Scheme Selector" Mini App from the plugin
panel, or ask the Agent to open it.
3. Fill in the requirement form on the left, then press **Generate recommendation**.

The Mini App runs entirely on the local machine. No account, API key or external service is
required for the core workflow.

## Tested environment

- MiniMax Code 3.1.2 or later — this package declares `surface.window`, which requires that
version. Tested on MiniMax Code desktop, Windows 10 (10.0.19045) x64, Electron managed Browser
surface.
- Node.js v24.15.0.
- Client acceptance exercised in the opened Mini App page:
- Initial render of the comparison table with all 15 devices, 7 satisfying the hard constraints,
7 routed to complementary roles and 1 excluded.
- Role, principle and evidence-grade filters; text search; column sorting.
- Switching between the accuracy-first and stability-first decision modes.
- The recommendation, configuration-list and saved-scheme tabs, including the empty state.
- Saving a scheme, reloading the page and confirming the scheme persisted, then deleting it.
- HTML and Markdown export, both containing the device table and the data-provenance notice.
- The online refresh action against real vendor pages, including a candidate that fails and falls
back to the built-in value.
- Console errors and failed/4xx/5xx network requests: none.
- The comparison table is wide by design and scrolls inside its own container; the page itself does
not scroll horizontally.

## Data & access

- **Files read**: none outside the plugin package. The Node entry reads only its own
`miniapp/client/` files to serve the page.
- **Files written**: durable state under the Host-provided `context.dataDir` only
(`selection-state.json`, written atomically through a temporary file and rename). Saved schemes
and refresh timestamps live there. Nothing is written to the workspace package at runtime.
- **Network hosts**: the optional refresh action contacts vendor web pages only — Klingelnberg,
Gleason, Mahr, ZEISS, Marposs, DWFritz, Starrett, Nikon, Lasertec, Creaform and Hali. The URLs are
listed in `miniapp/node/devices.mjs`. No other outbound request is made, and no data is uploaded.
- **Spawned processes**: none.
- **Agent turns**: none. The app runs no Agent turns and declares no `agentAccess`.
- **Conversations read**: none. The app declares no `session.read`.
- **Tools called**: none. The app declares no `toolAccess`.
- **Microphone, camera, notifications**: not used.
- **Host navigation read**: not used.
- **Connector providers**: none declared; the app does not use any Host Connector.
- **Declared access in `miniapp/miniapp.json`**: `surface.window` only (window size for the
pop-out window). No other access is declared, and none is used.

## Accuracy and data provenance

The built-in library separates what is verified from what is not:

| Grade | Meaning |
| --- | --- |
| A | First-party vendor page fetched during authoring |
| B | Authoritative secondary source, or a certification announcement carried by several outlets |
| C | Distributor or reseller page repeating vendor claims |
| D | Inference, or a vendor claim not independently confirmed |

Every device entry shows its evidence grade in the table. Values marked as unverified are shown as
such rather than replaced with an estimate. Prices are reported as "not yet verified" because these
machines are sold on quotation and no public price source exists.

Two limits are stated in the app itself and repeated in every export: a published MPE is a maximum
permissible error under ISO 10360-2, not the measurement uncertainty required by ISO 14253-1; and
the ISO gear inspection standards do not define an optical method, so an optical system's authority
to make a final conformity decision has to come from an enterprise specification or customer
acceptance.

## License

MIT. See [LICENSE](LICENSE).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
:root {
--mcode-bg: #ffffff;
--mcode-bg-secondary: #f5f5f5;
--mcode-surface: #ffffff;
--mcode-surface-muted: #fafafa;
--mcode-text: #171717;
--mcode-text-muted: #666666;
--mcode-text-subtle: #adadad;
--mcode-border: #0a0a0a14;
--mcode-border-strong: #0a0a0af2;
--mcode-accent: #0094fc;
--mcode-success: #04b54b;
--mcode-warning: #f56811;
--mcode-danger: #f73646;
--mcode-primary-action-bg: #171717;
--mcode-primary-action-text: #ffffff;
--radius-card: 12px;
--radius-ctl: 8px;
}

@media (prefers-color-scheme: dark) {
:root {
--mcode-bg: #171717;
--mcode-bg-secondary: #1c1c1c;
--mcode-surface: #262626;
--mcode-surface-muted: #262626;
--mcode-text: #ededed;
--mcode-text-muted: #949494;
--mcode-text-subtle: #666666;
--mcode-border: #ffffff14;
--mcode-border-strong: #fffffff2;
--mcode-accent: #0077d9;
--mcode-success: #009c3d;
--mcode-warning: #e25507;
--mcode-danger: #e31937;
--mcode-primary-action-bg: #ffffff;
--mcode-primary-action-text: #171717;
}
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
margin: 0;
background: var(--mcode-bg);
color: var(--mcode-text);
font-family: ui-sans-serif, -apple-system, system-ui, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.6;
}

.page { max-width: 1400px; margin: 0 auto; padding: 24px; }

.page-head {
display: flex; align-items: flex-start; justify-content: space-between;
gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.page-head h1 { font-size: 18px; line-height: 28px; font-weight: 600; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--mcode-text-muted); font-size: 13px; max-width: 760px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

button {
font: inherit; height: 34px; padding: 0 14px; border-radius: var(--radius-ctl);
border: 1px solid var(--mcode-border); background: var(--mcode-surface-muted);
color: var(--mcode-text); cursor: pointer; transition: background 150ms ease-out, border-color 150ms ease-out;
display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
button:hover:not(:disabled) { border-color: var(--mcode-border-strong); }
button:focus-visible { outline: 2px solid var(--mcode-accent); outline-offset: 2px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: var(--mcode-primary-action-bg); color: var(--mcode-primary-action-text); border-color: transparent; }
button.link { background: transparent; border-color: transparent; color: var(--mcode-accent); padding: 0 6px; }
button.small { height: 28px; padding: 0 10px; font-size: 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--mcode-border); margin-bottom: 20px; }
.tab {
border: none; background: transparent; height: 38px; padding: 0 14px;
border-radius: 0; border-bottom: 2px solid transparent; color: var(--mcode-text-muted);
}
.tab[aria-selected="true"] { color: var(--mcode-text); border-bottom-color: var(--mcode-text); font-weight: 500; }

.layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.layout > * { min-width: 0; }
@media (max-width: 1080px) { .layout { grid-template-columns: minmax(0, 1fr); } }

.card {
background: var(--mcode-surface); border: 1px solid var(--mcode-border);
border-radius: var(--radius-card); padding: 16px; margin-bottom: 16px;
}
.card > h2 { font-size: 16px; line-height: 24px; font-weight: 500; margin: 0 0 12px; }
.card > h3 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }

fieldset { border: none; margin: 0 0 16px; padding: 0; }
legend { font-size: 12px; color: var(--mcode-text-muted); padding: 0 0 8px; font-weight: 500; }

.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--mcode-text-muted); margin-bottom: 4px; }
.field input, .field select {
width: 100%; height: 36px; padding: 0 10px; font: inherit;
border: 1px solid var(--mcode-border); border-radius: var(--radius-ctl);
background: var(--mcode-surface); color: var(--mcode-text);
}
.field input:focus, .field select:focus {
outline: none; border-color: var(--mcode-accent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--mcode-accent) 22%, transparent);
}
.field .unit { font-size: 11px; color: var(--mcode-text-subtle); margin-left: 4px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hint { font-size: 11px; color: var(--mcode-text-subtle); margin: 4px 0 0; }

.check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.check input { width: 15px; height: 15px; accent-color: var(--mcode-accent); }

.segmented { display: inline-flex; background: var(--mcode-surface-muted); border: 1px solid var(--mcode-border); border-radius: var(--radius-ctl); padding: 2px; }
.segmented button { border: none; background: transparent; height: 28px; font-size: 12px; color: var(--mcode-text-muted); }
.segmented button[aria-pressed="true"] { background: var(--mcode-surface); color: var(--mcode-text); font-weight: 500; box-shadow: 0 1px 2px rgb(10 10 10 / 8%); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.toolbar .field { margin: 0; min-width: 130px; }
.toolbar .grow { flex: 1 1 180px; min-width: 0; }
.toolbar .field select, .toolbar .field input { min-width: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--mcode-border); border-radius: var(--radius-card); background: var(--mcode-surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--mcode-border); vertical-align: top; }
th { background: var(--mcode-surface-muted); font-weight: 600; font-size: 12px; color: var(--mcode-text-muted); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--mcode-surface-muted); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td .dev-name { font-weight: 500; }
td .dev-model { color: var(--mcode-text-muted); font-size: 12px; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--mcode-text); }

.badge {
display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px;
border: 1px solid var(--mcode-border-strong); margin-right: 4px; white-space: nowrap;
}
.badge.ok { color: var(--mcode-success); border-color: var(--mcode-success); }
.badge.warn { color: var(--mcode-warning); border-color: var(--mcode-warning); }
.badge.info { color: var(--mcode-accent); border-color: var(--mcode-accent); }
.badge.muted { color: var(--mcode-text-subtle); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--mcode-surface); border: 1px solid var(--mcode-border); border-radius: var(--radius-card); padding: 14px 16px; }
.kpi .k { font-size: 12px; color: var(--mcode-text-muted); }
.kpi .v { font-size: 24px; font-weight: 600; line-height: 1.3; margin-top: 2px; }
.kpi .v small { font-size: 13px; font-weight: 400; color: var(--mcode-text-muted); }

.notice { border: 1px solid var(--mcode-border); border-left: 3px solid var(--mcode-accent); background: var(--mcode-surface-muted); border-radius: var(--radius-ctl); padding: 10px 12px; font-size: 12px; color: var(--mcode-text-muted); margin-bottom: 14px; }
.notice.warn { border-left-color: var(--mcode-warning); }
.notice.err { border-left-color: var(--mcode-danger); }
.notice.ok { border-left-color: var(--mcode-success); }

.rec { border: 1px solid var(--mcode-border); border-radius: var(--radius-card); padding: 16px; background: var(--mcode-surface); margin-bottom: 12px; }
.rec h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.rec .role { color: var(--mcode-text-muted); font-size: 12px; margin-bottom: 10px; }
.rec ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--mcode-text-muted); }
.rec li { margin: 3px 0; }

.cfg-item { display: grid; grid-template-columns: 190px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--mcode-border); }
.cfg-item:last-child { border-bottom: none; }
.cfg-item .k { font-weight: 500; font-size: 13px; }
.cfg-item .s { font-size: 13px; }
.cfg-item .b { font-size: 11px; color: var(--mcode-text-subtle); margin-top: 3px; }

.status { font-size: 12px; color: var(--mcode-text-muted); }
.status.error { color: var(--mcode-danger); }
.status.ok { color: var(--mcode-success); }

.empty { text-align: center; padding: 48px 20px; color: var(--mcode-text-muted); }
.empty svg { color: var(--mcode-text-subtle); margin-bottom: 10px; }

.saved-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--mcode-border); }
.saved-item:last-child { border-bottom: none; }
.saved-item .meta { font-size: 12px; color: var(--mcode-text-muted); }

.dialog-backdrop {
position: fixed; inset: 0; background: rgb(0 0 0 / 42%);
display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50;
}
.dialog {
background: var(--mcode-surface); border: 1px solid var(--mcode-border);
border-radius: var(--radius-card); padding: 20px; max-width: 620px; width: 100%;
max-height: 82vh; overflow: auto; box-shadow: 0 0 20px rgb(10 10 10 / 18%);
}
.dialog h2 { font-size: 16px; margin: 0 0 12px; font-weight: 500; }
.dialog pre {
background: var(--mcode-surface-muted); border: 1px solid var(--mcode-border); border-radius: var(--radius-ctl);
padding: 12px; font-size: 12px; overflow: auto; max-height: 42vh;
font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word;
}
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.toast {
position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
background: var(--mcode-primary-action-bg); color: var(--mcode-primary-action-text);
padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 60;
box-shadow: 0 0 20px rgb(10 10 10 / 18%);
}

.spinner {
width: 14px; height: 14px; border: 2px solid var(--mcode-border-strong);
border-top-color: var(--mcode-accent); border-radius: 50%;
animation: spin 700ms linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
* { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 768px) {
.page { padding: 16px; }
.grid2 { grid-template-columns: 1fr; }
.cfg-item { grid-template-columns: 1fr; gap: 4px; }
}
Loading