clearotron 0.5.0 → 0.5.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +2 -2
- package/INSTALL.md +334 -302
- package/QUICKSTART.md +12 -4
- package/README.md +12 -7
- package/THIRD-PARTY-NOTICES.md +4 -4
- package/bin/README.md +14 -11
- package/bin/clearotron.mjs +1 -1
- package/bin/connect.mjs +73 -25
- package/bin/example.mjs +4 -2
- package/bin/onboard.mjs +562 -336
- package/bin/start.mjs +184 -36
- package/bin/update.mjs +26 -13
- package/build-info.json +2 -2
- package/docs/PORTAL.md +2 -2
- package/docs/architecture/02-architecture.md +3 -3
- package/docs/architecture/04-configuration-reference.md +1 -2
- package/docs/architecture/05-config-governance.md +1 -1
- package/docs/architecture/06-operations-runbook.md +1 -1
- package/driver/CHANGELOG.md +77 -0
- package/driver/README.md +2 -2
- package/driver/config-inventory.mjs +20 -11
- package/driver/contract-e3-backlog.mjs +27 -27
- package/driver/contract-e3-baseline.json +2 -2
- package/driver/contract-vocabulary.mjs +1 -1
- package/driver/degraded-parts.mjs +67 -3
- package/driver/dev-portal.mjs +1 -1
- package/driver/digest-queue.mjs +5 -5
- package/driver/driver.config.mjs +9 -9
- package/driver/engine/CONTRACT.md +1 -1
- package/driver/engine/anthropic-agent.mjs +4 -2
- package/driver/engine/mcp/band-server.mjs +1 -21
- package/driver/engine/mcp/clarivate-propose-tool.mjs +26 -0
- package/driver/engine/mcp/clarivate-server.mjs +2 -18
- package/driver/engine/mcp/fixture-register-server.mjs +33 -0
- package/driver/engine/mcp/gather-config.mjs +48 -7
- package/driver/engine/mcp/recording-server.mjs +206 -14
- package/driver/engine/mcp/supplemental.mjs +4 -2
- package/driver/engine/openai-agent.mjs +3 -1
- package/driver/engine/probe.mjs +10 -0
- package/driver/filing-goods.mjs +95 -0
- package/driver/findings-model.mjs +3 -0
- package/driver/gateway.mjs +42 -40
- package/driver/knockout-assess-record.mjs +54 -4
- package/driver/knockout-correction-record.mjs +342 -0
- package/driver/knockout-frame-record.mjs +4 -2
- package/driver/knockout-register-read.mjs +705 -0
- package/driver/knockout-register-record.mjs +222 -0
- package/driver/knockout-review-record.mjs +96 -25
- package/driver/narrative-refutation-record.mjs +87 -1
- package/driver/order-tables.mjs +23 -0
- package/driver/owner-use-check.mjs +5 -2
- package/driver/package.json +1 -1
- package/driver/partial-payload-baseline.json +8 -0
- package/driver/pipeline-knockout.mjs +506 -313
- package/driver/pipeline.mjs +179 -86
- package/driver/portal-local-auth.mjs +7 -1
- package/driver/portal-service.mjs +62 -6
- package/driver/progress.mjs +2 -2
- package/driver/publish/index.mjs +18 -21
- package/driver/publish/knockout.mjs +40 -18
- package/driver/publish/render-knockout.mjs +40 -27
- package/driver/publish/report-dates.mjs +43 -0
- package/driver/recall-reconciliation.mjs +2 -2
- package/driver/record-goods.mjs +50 -9
- package/driver/register-count.mjs +12 -59
- package/driver/register-fixture-marker.mjs +22 -0
- package/driver/register-plan.mjs +48 -0
- package/driver/register-records.mjs +84 -266
- package/driver/register-taint.mjs +2 -2
- package/driver/repair-composers.mjs +15 -8
- package/driver/result-noun-fields.mjs +6 -2
- package/driver/run-requirements.mjs +54 -4
- package/driver/runner.mjs +4 -13
- package/driver/skills/clearance-register/providers/clarivate.md +2 -2
- package/driver/skills/knockout-assess/SKILL.md +101 -100
- package/driver/skills/knockout-frame/SKILL.md +3 -1
- package/driver/skills/knockout-register-read/SKILL.md +77 -0
- package/driver/stages-knockout.mjs +159 -98
- package/driver/stages.mjs +4 -2
- package/driver/suite-census.json +389 -71
- package/driver/systemd/README.md +2 -2
- package/driver/verify-knockout.mjs +175 -39
- package/driver/verify.mjs +10 -9
- package/mcp-server/CHANGELOG.md +4 -0
- package/mcp-server/CONNECT.md +4 -0
- package/mcp-server/demo-mode.mjs +6 -0
- package/mcp-server/lib/demo-texts.mjs +38 -0
- package/mcp-server/lib/http-handler.mjs +7 -1
- package/mcp-server/lib/knockout.mjs +3 -2
- package/mcp-server/lib/options.mjs +3 -1
- package/mcp-server/lib/plan.mjs +6 -1
- package/mcp-server/mint-token.mjs +1 -1
- package/mcp-server/package.json +1 -1
- package/mcp-server/serve.mjs +11 -0
- package/mcp-server/server.mjs +13 -5
- package/package.json +1 -1
- package/portal-ui/dist/assets/{index-D2wrw9cH.css → index-AtB9ZpDH.css} +29 -0
- package/portal-ui/dist/assets/{index-DcLbvFmQ.js → index-C1oE78Wk.js} +161 -195
- package/portal-ui/dist/index.html +2 -2
- package/portal-ui/package.json +4 -4
- package/providers/README.md +4 -4
- package/providers/_shared/execute-plan.mjs +45 -1
- package/providers/_shared/term-shape.mjs +1 -1
- package/providers/clarivate/src/capabilities.js +7 -6
- package/providers/clarivate/src/core.js +11 -7
- package/providers/clarivate/src/wider-list.js +104 -0
- package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/providers/signa/src/capabilities.js +0 -9
- package/scripts/e2e-first-time.mjs +8 -7
- package/scripts/freeze-example-run.mjs +2 -2
- package/scripts/settings-render-check.mjs +5 -3
- package/scripts/test-run.mjs +8 -2
- package/shared/client-door.mjs +11 -8
- package/shared/connect-clients.mjs +10 -4
- package/shared/demo-connection.mjs +43 -0
- package/shared/demo-start-args.mjs +7 -2
- package/shared/invocation.mjs +18 -3
- package/shared/permanent-install.mjs +14 -0
- package/shared/scope.mjs +8 -1
- package/shared/stdio-connect.mjs +43 -21
- package/shared/trigger-lane.mjs +7 -0
- package/shared/tty-style.mjs +21 -5
package/mcp-server/serve.mjs
CHANGED
|
@@ -21,6 +21,17 @@ if (!floor.ok) {
|
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
// A DEMO'S CONNECTION STAYS WITH THAT DEMO (shared/demo-connection.mjs), and a demo that is gone refuses here, in one
|
|
25
|
+
// plain line, before the server could read anything else on this machine.
|
|
26
|
+
if (process.env.CLEAROTRON_DEMO === "1") {
|
|
27
|
+
const { bindDemoConnection } = await import("../shared/demo-connection.mjs");
|
|
28
|
+
const gone = bindDemoConnection();
|
|
29
|
+
if (gone) {
|
|
30
|
+
console.error(`clearotron: ${gone}`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
24
35
|
// THE SERVER STARTS AS THE ENTRY IT WOULD HAVE BEEN. It starts its stdio transport, and reads the
|
|
25
36
|
// install's settings, only when it is the process's entry file, so the entry is handed over first.
|
|
26
37
|
process.argv[1] = fileURLToPath(new URL("./server.mjs", import.meta.url));
|
package/mcp-server/server.mjs
CHANGED
|
@@ -33,7 +33,8 @@ import { fileURLToPath } from "node:url";
|
|
|
33
33
|
|
|
34
34
|
import { enumerateRuns, resolveRun, runAccountKey, runOrganisation, runProfileFacts, productIdentityFor, unreadableRunsReason } from "./lib/runs.mjs";
|
|
35
35
|
import { ORDERABLE_PRODUCTS } from "../driver/search-policy.mjs";
|
|
36
|
-
import {
|
|
36
|
+
import { demoServing } from "./demo-mode.mjs";
|
|
37
|
+
import { DEMO_SWAPS, demoText, demoGuidance } from "./lib/demo-texts.mjs"; // — a demo names no tool it withholds
|
|
37
38
|
import { PRODUCTS } from "../driver/products.mjs";
|
|
38
39
|
|
|
39
40
|
// The offering writes its own schema prose. A hand-typed "up to 20 names" beside a wall that refuses at
|
|
@@ -200,7 +201,7 @@ function runSummary(run) {
|
|
|
200
201
|
// field is what made the list unanswerable in the first place.
|
|
201
202
|
const facts = runProfileFacts(run);
|
|
202
203
|
return {
|
|
203
|
-
...(
|
|
204
|
+
...(demoServing() ? { demo: DEMO_LABEL } : {}),
|
|
204
205
|
runId: run.runId, slug: run.slug, codename: run.codename, date: run.date, agent: run.agent,
|
|
205
206
|
client: facts.known
|
|
206
207
|
? { key: facts.account, name: facts.clientName }
|
|
@@ -819,6 +820,12 @@ const CLIENT_TOOL_TEXT = {
|
|
|
819
820
|
* principal get the client cut where one exists; ops and staff get the operator text unchanged.
|
|
820
821
|
* Descriptions only — name, inputSchema and everything the gate reads pass through untouched.
|
|
821
822
|
*/
|
|
823
|
+
/** A tool's description as a demo's assistant reads it: the owner's demo words where a real install's send it to a withheld tool. */
|
|
824
|
+
export function inDemo(def, kind) {
|
|
825
|
+
const key = `${def.name}:${kind === "user" || kind === "account" ? "client" : "ops"}`;
|
|
826
|
+
return DEMO_SWAPS[key] ? { ...def, description: demoText(key, def.description) } : def;
|
|
827
|
+
}
|
|
828
|
+
|
|
822
829
|
export function describeForAudience(def, kind) {
|
|
823
830
|
if (kind !== "user" && kind !== "account") return def;
|
|
824
831
|
const text = CLIENT_TOOL_TEXT[def.name];
|
|
@@ -841,8 +848,9 @@ export function withAnnotations(def) {
|
|
|
841
848
|
}
|
|
842
849
|
|
|
843
850
|
export function attachHandlers(server, { scope = { kind: "ops", runId: null }, local = true } = {}) {
|
|
844
|
-
const
|
|
845
|
-
const
|
|
851
|
+
const demo = demoServing();
|
|
852
|
+
const allow = visibleTools({ kind: scope.kind, local, demo });
|
|
853
|
+
const toolDefs = TOOL_DEFS.filter((d) => allow(d.name)).map((d) => withAnnotations(demo ? inDemo(describeForAudience(d, scope.kind), scope.kind) : describeForAudience(d, scope.kind)));
|
|
846
854
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: toolDefs }));
|
|
847
855
|
|
|
848
856
|
// Prompts are guidance, like the pack: offered to the two client audiences, empty for everyone else.
|
|
@@ -1119,7 +1127,7 @@ export function makeServer({ scope = null, local = null, readonly = false } = {}
|
|
|
1119
1127
|
{ name: NS, version: productIdentity().version ?? "unknown" }, // the package's own version, the one server_info reports
|
|
1120
1128
|
// `prompts` is declared for every kind; promptsFor() returns [] for the audiences that get none, so
|
|
1121
1129
|
// an ops client sees an empty list rather than a protocol error on a capability we did not announce.
|
|
1122
|
-
{ capabilities: { tools: {}, resources: {}, prompts: {} }, instructions: instructionsFor(eff) },
|
|
1130
|
+
{ capabilities: { tools: {}, resources: {}, prompts: {} }, instructions: demoServing() ? demoGuidance(instructionsFor(eff)) : instructionsFor(eff) },
|
|
1123
1131
|
);
|
|
1124
1132
|
attachHandlers(server, { scope: eff, local: isLocal });
|
|
1125
1133
|
return server;
|
package/package.json
CHANGED
|
@@ -2603,6 +2603,35 @@ details[open] > .fold-summary .fold-chev {
|
|
|
2603
2603
|
flex-wrap: wrap;
|
|
2604
2604
|
}
|
|
2605
2605
|
|
|
2606
|
+
/* THE BLEED FOLLOWS THE GUTTER. The footer's negative margin cancels `.screen`'s side padding, which is 30px wide and
|
|
2607
|
+
18px below 900px (the `.screen, .topbar` rule in the max-width: 899px block). Left at 30px there, the footer ran
|
|
2608
|
+
12px past both edges of a phone and pushed the page sideways. Measured 2026-11-06 at 390px. */
|
|
2609
|
+
@media (max-width: 899px) {
|
|
2610
|
+
.composer-footer {
|
|
2611
|
+
margin-left: -18px;
|
|
2612
|
+
margin-right: -18px;
|
|
2613
|
+
padding-left: 18px;
|
|
2614
|
+
padding-right: 18px;
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
/* The footer's actions: saving a template, and the review with its line beside it. They keep their width beside the
|
|
2619
|
+
figures on a desk, and below 900px they take a line of their own and wrap inside it. Held at full width there, the
|
|
2620
|
+
row and the line beside the button ran past the footer and made a filled form 583px wide on a 390px phone. */
|
|
2621
|
+
.composer-actions {
|
|
2622
|
+
display: flex;
|
|
2623
|
+
align-items: center;
|
|
2624
|
+
gap: 9px;
|
|
2625
|
+
flex: none;
|
|
2626
|
+
flex-wrap: wrap;
|
|
2627
|
+
}
|
|
2628
|
+
@media (max-width: 899px) {
|
|
2629
|
+
.composer-actions {
|
|
2630
|
+
flex: 1 1 100%;
|
|
2631
|
+
min-width: 0;
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2606
2635
|
:root[data-theme='dark'] .composer-footer {
|
|
2607
2636
|
box-shadow: 0 -10px 30px -14px rgba(0, 0, 0, 0.75);
|
|
2608
2637
|
}
|