clinkx 1.3.0 → 1.4.1
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/CHANGELOG.md +57 -0
- package/README.md +13 -6
- package/clinkx-workflows/dist/child-env.d.ts +3 -0
- package/clinkx-workflows/dist/child-env.js +11 -0
- package/clinkx-workflows/dist/child-env.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/api-routes.d.ts +21 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js +27 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +13 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +27 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.js +262 -23
- package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.d.ts +62 -0
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js +70 -0
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/request-admission.d.ts +6 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js +9 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/server-factory.js +15 -1
- package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/settings-contract.d.ts +1806 -0
- package/clinkx-workflows/dist/dashboard/settings-contract.js +630 -0
- package/clinkx-workflows/dist/dashboard/settings-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.d.ts +48 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.js +195 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.d.ts +87 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.js +690 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.js.map +1 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/index-CX4FrhYN.js +122 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/style-C5guUjwN.css +1 -0
- package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
- package/clinkx-workflows/dist/durable-file-core.d.ts +76 -0
- package/clinkx-workflows/dist/durable-file-core.js +146 -0
- package/clinkx-workflows/dist/durable-file-core.js.map +1 -0
- package/clinkx-workflows/dist/durable-file.d.ts +8 -64
- package/clinkx-workflows/dist/durable-file.js +14 -137
- package/clinkx-workflows/dist/durable-file.js.map +1 -1
- package/clinkx-workflows/dist/index.js +68 -2
- package/clinkx-workflows/dist/index.js.map +1 -1
- package/clinkx-workflows/dist/settings/audit.d.ts +101 -0
- package/clinkx-workflows/dist/settings/audit.js +318 -0
- package/clinkx-workflows/dist/settings/audit.js.map +1 -0
- package/clinkx-workflows/dist/settings/bootstrap.d.ts +35 -0
- package/clinkx-workflows/dist/settings/bootstrap.js +52 -0
- package/clinkx-workflows/dist/settings/bootstrap.js.map +1 -0
- package/clinkx-workflows/dist/settings/codec.d.ts +51 -0
- package/clinkx-workflows/dist/settings/codec.js +410 -0
- package/clinkx-workflows/dist/settings/codec.js.map +1 -0
- package/clinkx-workflows/dist/settings/durable-write.d.ts +48 -0
- package/clinkx-workflows/dist/settings/durable-write.js +31 -0
- package/clinkx-workflows/dist/settings/durable-write.js.map +1 -0
- package/clinkx-workflows/dist/settings/index.d.ts +20 -0
- package/clinkx-workflows/dist/settings/index.js +23 -0
- package/clinkx-workflows/dist/settings/index.js.map +1 -0
- package/clinkx-workflows/dist/settings/loader.d.ts +80 -0
- package/clinkx-workflows/dist/settings/loader.js +577 -0
- package/clinkx-workflows/dist/settings/loader.js.map +1 -0
- package/clinkx-workflows/dist/settings/lock.d.ts +108 -0
- package/clinkx-workflows/dist/settings/lock.js +344 -0
- package/clinkx-workflows/dist/settings/lock.js.map +1 -0
- package/clinkx-workflows/dist/settings/paths.d.ts +65 -0
- package/clinkx-workflows/dist/settings/paths.js +173 -0
- package/clinkx-workflows/dist/settings/paths.js.map +1 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.d.ts +47 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.js +305 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.js.map +1 -0
- package/clinkx-workflows/dist/settings/registry.d.ts +178 -0
- package/clinkx-workflows/dist/settings/registry.js +1290 -0
- package/clinkx-workflows/dist/settings/registry.js.map +1 -0
- package/clinkx-workflows/dist/settings/schema.d.ts +404 -0
- package/clinkx-workflows/dist/settings/schema.js +415 -0
- package/clinkx-workflows/dist/settings/schema.js.map +1 -0
- package/clinkx-workflows/dist/settings/store.d.ts +157 -0
- package/clinkx-workflows/dist/settings/store.js +842 -0
- package/clinkx-workflows/dist/settings/store.js.map +1 -0
- package/clinkx-workflows/dist/stdio-entry.d.ts +2 -0
- package/clinkx-workflows/dist/stdio-entry.js +52 -0
- package/clinkx-workflows/dist/stdio-entry.js.map +1 -0
- package/dist/dashboard-cli.d.ts +11 -3
- package/dist/dashboard-cli.js +199 -33
- package/dist/dashboard-cli.js.map +1 -1
- package/dist/dashboard-companion/client.d.ts +14 -0
- package/dist/dashboard-companion/client.js +16 -0
- package/dist/dashboard-companion/client.js.map +1 -1
- package/dist/dashboard-companion/credential-expectation.d.ts +23 -0
- package/dist/dashboard-companion/credential-expectation.js +50 -0
- package/dist/dashboard-companion/credential-expectation.js.map +1 -0
- package/dist/dashboard-companion/host-channel.d.ts +36 -0
- package/dist/dashboard-companion/host-channel.js +78 -0
- package/dist/dashboard-companion/host-channel.js.map +1 -0
- package/dist/dashboard-companion/host-status.d.ts +179 -0
- package/dist/dashboard-companion/host-status.js +122 -0
- package/dist/dashboard-companion/host-status.js.map +1 -0
- package/dist/dashboard-companion/protocol.js +17 -0
- package/dist/dashboard-companion/protocol.js.map +1 -1
- package/dist/dashboard-companion/standalone-assets.d.ts +8 -0
- package/dist/dashboard-companion/standalone-assets.js +7 -1
- package/dist/dashboard-companion/standalone-assets.js.map +1 -1
- package/dist/dashboard-companion/standalone-entry.js +34 -13
- package/dist/dashboard-companion/standalone-entry.js.map +1 -1
- package/dist/dashboard-gateway/control-plane/contracts.d.ts +38 -38
- package/dist/dashboard-gateway/tunnel-http.js +20 -0
- package/dist/dashboard-gateway/tunnel-http.js.map +1 -1
- package/dist/desktop-host/child-env.d.ts +23 -0
- package/dist/desktop-host/child-env.js +70 -0
- package/dist/desktop-host/child-env.js.map +1 -0
- package/dist/desktop-host/daemon-entry.d.ts +2 -0
- package/dist/desktop-host/daemon-entry.js +50 -0
- package/dist/desktop-host/daemon-entry.js.map +1 -0
- package/dist/desktop-host/daemon-env.d.ts +12 -0
- package/dist/desktop-host/daemon-env.js +35 -0
- package/dist/desktop-host/daemon-env.js.map +1 -0
- package/dist/desktop-host/daemon-protocol.d.ts +210 -0
- package/dist/desktop-host/daemon-protocol.js +56 -0
- package/dist/desktop-host/daemon-protocol.js.map +1 -0
- package/dist/desktop-host/daemon.d.ts +50 -0
- package/dist/desktop-host/daemon.js +441 -0
- package/dist/desktop-host/daemon.js.map +1 -0
- package/dist/desktop-host/enrollment.d.ts +17 -0
- package/dist/desktop-host/enrollment.js +25 -0
- package/dist/desktop-host/enrollment.js.map +1 -0
- package/dist/desktop-host/import.d.ts +14 -0
- package/dist/desktop-host/import.js +95 -0
- package/dist/desktop-host/import.js.map +1 -0
- package/dist/desktop-host/profile.d.ts +130 -0
- package/dist/desktop-host/profile.js +176 -0
- package/dist/desktop-host/profile.js.map +1 -0
- package/dist/desktop-host/service.d.ts +6 -0
- package/dist/desktop-host/service.js +7 -0
- package/dist/desktop-host/service.js.map +1 -0
- package/dist/desktop-host/supervisor.d.ts +57 -0
- package/dist/desktop-host/supervisor.js +256 -0
- package/dist/desktop-host/supervisor.js.map +1 -0
- package/dist/desktop-host/view-state.d.ts +138 -0
- package/dist/desktop-host/view-state.js +27 -0
- package/dist/desktop-host/view-state.js.map +1 -0
- package/dist/elaris/config.d.ts +10 -0
- package/dist/elaris/config.js +27 -1
- package/dist/elaris/config.js.map +1 -1
- package/dist/elaris/tools.js +4 -1
- package/dist/elaris/tools.js.map +1 -1
- package/dist/index.d.ts +0 -31
- package/dist/index.js +41 -404
- package/dist/index.js.map +1 -1
- package/dist/lib.d.ts +17 -0
- package/dist/lib.js +17 -0
- package/dist/lib.js.map +1 -0
- package/dist/progress-report/lock.d.ts +17 -59
- package/dist/progress-report/lock.js +25 -329
- package/dist/progress-report/lock.js.map +1 -1
- package/dist/registry.d.ts +7 -0
- package/dist/registry.js +21 -7
- package/dist/registry.js.map +1 -1
- package/dist/server.js +75 -4
- package/dist/server.js.map +1 -1
- package/dist/settings-cli/clients.d.ts +137 -0
- package/dist/settings-cli/clients.js +1124 -0
- package/dist/settings-cli/clients.js.map +1 -0
- package/dist/settings-cli/commands.d.ts +67 -0
- package/dist/settings-cli/commands.js +726 -0
- package/dist/settings-cli/commands.js.map +1 -0
- package/dist/settings-cli/format.d.ts +34 -0
- package/dist/settings-cli/format.js +40 -0
- package/dist/settings-cli/format.js.map +1 -0
- package/dist/settings-cli/main.d.ts +18 -0
- package/dist/settings-cli/main.js +256 -0
- package/dist/settings-cli/main.js.map +1 -0
- package/dist/stdio-main.d.ts +73 -0
- package/dist/stdio-main.js +455 -0
- package/dist/stdio-main.js.map +1 -0
- package/docs/configuration.md +340 -39
- package/docs/security.md +150 -6
- package/docs/verification/README.md +28 -2
- package/docs/verification/workflow-handoff.md +86 -0
- package/package.json +3 -3
- package/clinkx-workflows/dist/dashboard-ui/assets/index-DRId2DVA.js +0 -119
- package/clinkx-workflows/dist/dashboard-ui/assets/style-CHAw57y5.css +0 -1
|
@@ -45,15 +45,41 @@ General rules:
|
|
|
45
45
|
|
|
46
46
|
## Maintaining the feature map
|
|
47
47
|
|
|
48
|
-
Each row above maps one feature to one procedure.
|
|
49
|
-
|
|
48
|
+
Each row above maps one feature to one procedure. Declare the maintenance scope
|
|
49
|
+
before work: name the selected rows, affected entry points, and procedures.
|
|
50
|
+
Account for every feature in that scope with an observed result, a correction,
|
|
51
|
+
or a blocker. Name rows that were not inspected; a scoped result does not qualify
|
|
52
|
+
the whole map.
|
|
53
|
+
|
|
54
|
+
When a procedure stops passing, classify the cause before repairing it:
|
|
50
55
|
|
|
51
56
|
| Class | Meaning | Example | Repair in |
|
|
52
57
|
| --- | --- | --- | --- |
|
|
53
58
|
| Documentation drift | The product changed on purpose; the procedure or its selectors did not follow. | A UI redesign moved labels the spec asserted. | The procedure and spec. Keep the assertion's intent; record any check that can no longer be observed. |
|
|
54
59
|
| Harness defect | The fixture, config, or runner misreports the result. | A fixture that treats an unsolicited exit as a clean shutdown; a runner that kills the fixture before its cleanup. | The fixture or config, with a subprocess test or a repeated procedure run that fails without the repair. |
|
|
55
60
|
| Product regression | The feature itself no longer behaves as intended. | The inspector stops refreshing after a state replacement. | The product code, not the procedure. |
|
|
61
|
+
| Environment or access blocker | A required host capability, file, permission, or evidence location is unavailable. | Chromium is missing, or the MCP host's project or private evidence parent is outside authorized roots. | Restore the authorized prerequisite or report the operation blocked. Keep the behavioral assertions. |
|
|
62
|
+
|
|
63
|
+
Paths for installed checks belong to the MCP host. A client without host shell
|
|
64
|
+
access can still invoke a reviewed manifest that already exists there through
|
|
65
|
+
`verification_run`, using its known authorized host paths. If the host manifest
|
|
66
|
+
is missing and no authorized channel can create it, preparation is blocked;
|
|
67
|
+
do not invent a path or start execution. Unavailable access does not authorize
|
|
68
|
+
broader allowed roots or a substitute procedure with different coverage.
|
|
56
69
|
|
|
57
70
|
After any repair, repeat the affected procedure and keep the new attempt's
|
|
58
71
|
evidence. Do not weaken an assertion to make drift pass. Add a row here when a
|
|
59
72
|
new procedure is added, and remove a row only when its feature is removed.
|
|
73
|
+
|
|
74
|
+
Report one maintenance outcome for the declared scope:
|
|
75
|
+
|
|
76
|
+
| Outcome | Required evidence |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `clean` | Every selected feature was inspected, its required procedure passed with applicable evidence, and no correction was needed. |
|
|
79
|
+
| `changed` | A scoped correction was made, every affected procedure was rerun successfully, and the new evidence and changed files are identified. |
|
|
80
|
+
| `blocked` | A selected feature has an unresolved regression, unavailable prerequisite or access, missing evidence, or a required check that was not run or did not pass. Name the affected feature and the next required action. |
|
|
81
|
+
|
|
82
|
+
Any unresolved blocker makes the scoped outcome `blocked`, even when other
|
|
83
|
+
features passed or files changed. Preserve the underlying execution and coverage
|
|
84
|
+
results separately; a maintenance outcome grants no owner acceptance or release
|
|
85
|
+
approval.
|
|
@@ -29,6 +29,10 @@ does not itself manufacture that project-command attachment.
|
|
|
29
29
|
- Retain the original expectations digest outside the attempt. Inspection uses
|
|
30
30
|
that owner-selected digest rather than trusting an editable cached summary.
|
|
31
31
|
|
|
32
|
+
If qualifying an installed companion skill, record that skill's digest and this
|
|
33
|
+
guide's digest separately. The fixture's source identity does not bind either
|
|
34
|
+
document or qualify another running MCP server.
|
|
35
|
+
|
|
32
36
|
## Run and inspect
|
|
33
37
|
|
|
34
38
|
Build once:
|
|
@@ -91,6 +95,85 @@ acceptance, merge, or publication authority.
|
|
|
91
95
|
|
|
92
96
|
## Negative cases and cleanup
|
|
93
97
|
|
|
98
|
+
### Retain a controlled producer failure
|
|
99
|
+
|
|
100
|
+
Run this block from the checkout root after the build above, with the same
|
|
101
|
+
private `EVIDENCE_ROOT`. It invokes the existing source helper directly and
|
|
102
|
+
creates a fresh private attempt. `fixture_a` fails before producing evidence;
|
|
103
|
+
`fixture_b` delivers its file and the final consumer still runs. Host coverage
|
|
104
|
+
must remain `incomplete` although workflow execution and the consumer complete.
|
|
105
|
+
|
|
106
|
+
The block retains the original returned pin, run summary, and inspection summary
|
|
107
|
+
as siblings of the attempt. It writes summaries before checking the assertions,
|
|
108
|
+
so an assertion failure leaves diagnostic evidence. It does not delete attempts.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
: "${EVIDENCE_ROOT:?set an existing private evidence root outside the checkout}"
|
|
112
|
+
node --input-type=module - "$EVIDENCE_ROOT" <<'NODE'
|
|
113
|
+
import assert from 'node:assert/strict';
|
|
114
|
+
import { chmodSync, mkdtempSync, readFileSync, realpathSync, writeFileSync } from 'node:fs';
|
|
115
|
+
import { isAbsolute, join, relative, sep } from 'node:path';
|
|
116
|
+
import { REPOSITORY_ROOT, loadModules, runFixture, inspectFixture } from './scripts/verification/workflow-handoff-fixture.mjs';
|
|
117
|
+
|
|
118
|
+
const evidenceRoot = realpathSync(process.argv[2]);
|
|
119
|
+
const fromCheckout = relative(realpathSync(REPOSITORY_ROOT), evidenceRoot);
|
|
120
|
+
assert.ok(isAbsolute(fromCheckout) || fromCheckout === '..' || fromCheckout.startsWith(`..${sep}`),
|
|
121
|
+
'Evidence root must be outside the source checkout');
|
|
122
|
+
const modules = await loadModules();
|
|
123
|
+
const attempt = mkdtempSync(join(evidenceRoot, 'workflow-handoff-negative-'));
|
|
124
|
+
chmodSync(attempt, 0o700);
|
|
125
|
+
const run = await runFixture(attempt, modules, { fail: ['fixture_a'], manageSignals: true });
|
|
126
|
+
const pinPath = `${attempt}.expectations-sha256`;
|
|
127
|
+
const summaryPath = `${attempt}.result.json`;
|
|
128
|
+
const inspectionPath = `${attempt}.inspection.json`;
|
|
129
|
+
writeFileSync(pinPath, `${run.expectations_sha256}\n`, { flag: 'wx', mode: 0o600 });
|
|
130
|
+
writeFileSync(summaryPath, `${JSON.stringify({ evidence_directory: attempt,
|
|
131
|
+
expectations_sha256: run.expectations_sha256, ...run.coverage,
|
|
132
|
+
diagnostics: run.diagnostics, process_result: run.processResult }, null, 2)}\n`,
|
|
133
|
+
{ flag: 'wx', mode: 0o600 });
|
|
134
|
+
const originalPin = readFileSync(pinPath, 'utf8').trim();
|
|
135
|
+
const inspected = inspectFixture(attempt, modules, originalPin);
|
|
136
|
+
writeFileSync(inspectionPath, `${JSON.stringify({ ...inspected.coverage,
|
|
137
|
+
diagnostics: inspected.diagnostics }, null, 2)}\n`, { flag: 'wx', mode: 0o600 });
|
|
138
|
+
|
|
139
|
+
assert.equal(run.coverage.status, 'incomplete');
|
|
140
|
+
assert.equal(inspected.coverage.status, 'incomplete');
|
|
141
|
+
assert.equal(run.processResult.status, 'completed');
|
|
142
|
+
const calls = run.processResult.stages.flatMap((stage) => stage.calls);
|
|
143
|
+
assert.equal(calls.find((call) => call.stageId === 'producers' && call.callId === 'fixture_a')?.ok, false);
|
|
144
|
+
assert.equal(calls.find((call) => call.stageId === 'producers' && call.callId === 'fixture_b')?.ok, true);
|
|
145
|
+
assert.equal(calls.find((call) => call.stageId === 'consumer' && call.callId === 'read')?.ok, true);
|
|
146
|
+
const consumer = JSON.parse(readFileSync(join(attempt, 'artifacts/consumer/01-read.json'), 'utf8'));
|
|
147
|
+
assert.equal(consumer.verdict, 'complete');
|
|
148
|
+
assert.equal(consumer.reads.length, 1);
|
|
149
|
+
assert.equal(consumer.reads[0].check_id, 'fixture_b');
|
|
150
|
+
assert.equal(run.artifacts.filter((artifact) => artifact.status === 'readable').length, 1);
|
|
151
|
+
assert.equal(run.processResult.terminated, true);
|
|
152
|
+
assert.equal(run.processResult.child_exited, true);
|
|
153
|
+
assert.equal(run.processResult.cleanup_error, undefined);
|
|
154
|
+
assert.equal(run.processResult.child_death, undefined);
|
|
155
|
+
assert.equal(run.interrupted_signal, undefined);
|
|
156
|
+
const child = JSON.parse(readFileSync(join(attempt, 'child-process.json'), 'utf8'));
|
|
157
|
+
assert.equal(child.exit_code, 0);
|
|
158
|
+
process.stdout.write(`${JSON.stringify({ status: inspected.coverage.status,
|
|
159
|
+
evidence_directory: attempt, pin: pinPath, summary: summaryPath, inspection: inspectionPath })}\n`);
|
|
160
|
+
NODE
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Exit zero here means the controlled negative case met these assertions; it does
|
|
164
|
+
not mean complete verification. Stdout is one JSON summary with evidence paths.
|
|
165
|
+
The retained consumer record has at most two reads, and this case requires
|
|
166
|
+
exactly one. Inspection rechecks that read's bytes and its producer ownership.
|
|
167
|
+
Missing or wrong original pins cannot support authenticated inspection; do not
|
|
168
|
+
recover a lost pin from the editable attempt.
|
|
169
|
+
|
|
170
|
+
An interruption or prerequisite failure may prevent final summary publication.
|
|
171
|
+
Keep that attempt as partial evidence and use a fresh directory for a retry.
|
|
172
|
+
The public CLI remains the `run` and `inspect` interface shown above; no failure
|
|
173
|
+
flag or installed fixture API is added.
|
|
174
|
+
|
|
175
|
+
### Automated negative cases
|
|
176
|
+
|
|
94
177
|
The integration suite executes either producer failing, both producers failing,
|
|
95
178
|
swapped check ownership, an unreadable delivered file, and an empty artifact
|
|
96
179
|
store with no omission records. It requires the final consumer to run even when
|
|
@@ -105,6 +188,9 @@ npx vitest run \
|
|
|
105
188
|
tests/verify-workflow-handoff.test.ts
|
|
106
189
|
```
|
|
107
190
|
|
|
191
|
+
These tests remove their temporary attempts. Their passing output does not
|
|
192
|
+
replace the retained negative evidence from the direct helper invocation.
|
|
193
|
+
|
|
108
194
|
The runner owns and stops its child session. It retains evidence after cleanup,
|
|
109
195
|
including failed attempts. An interrupted or unpublished attempt cannot become
|
|
110
196
|
complete merely because earlier artifacts exist. The task owner controls
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clinkx",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "ClinkX MCP STDIO server
|
|
3
|
+
"version": "1.4.1",
|
|
4
|
+
"description": "ClinkX MCP STDIO server — CLI-to-CLI bridge tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.0.0"
|
|
8
8
|
},
|
|
9
|
-
"main": "dist/
|
|
9
|
+
"main": "dist/lib.js",
|
|
10
10
|
"bin": {
|
|
11
11
|
"clinkx": "dist/index.js",
|
|
12
12
|
"clinkx-workflows-dashboard": "dist/dashboard-cli.js"
|