@reticlehq/server 2.9.0 → 2.11.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/SKILL.md +64 -26
- package/dist/capsule/capsule-store.d.ts +2 -2
- package/dist/cli/cli-parse.d.ts +1 -1
- package/dist/cli/cli-parse.js +1 -1
- package/dist/cli/cli-verify.js +1 -1
- package/dist/crawl/crawl.d.ts +7 -2
- package/dist/crawl/crawl.js +52 -9
- package/dist/dev/stale-issue-guard.d.ts +43 -0
- package/dist/dev/stale-issue-guard.js +75 -0
- package/dist/domain/domain-tools.js +3 -2
- package/dist/ee/audit-log.js +2 -2
- package/dist/events/body-failures.d.ts +2 -2
- package/dist/events/contradiction-folds.d.ts +45 -0
- package/dist/events/contradiction-folds.js +42 -0
- package/dist/events/contradictions.d.ts +19 -1
- package/dist/events/contradictions.js +17 -2
- package/dist/events/echo-mismatch.d.ts +2 -2
- package/dist/events/predicate-asks.d.ts +17 -0
- package/dist/events/predicate-asks.js +26 -0
- package/dist/events/predicate-eval.js +211 -24
- package/dist/events/predicate-parse.js +9 -3
- package/dist/events/predicate-schema.d.ts +18 -0
- package/dist/events/predicate-schema.js +55 -0
- package/dist/events/stale-response.d.ts +2 -3
- package/dist/events/stale-response.js +49 -2
- package/dist/events/unit-mismatch.d.ts +2 -2
- package/dist/flows/flow-tools.js +34 -5
- package/dist/flows/predicate-to-expect.js +8 -0
- package/dist/flows/verify-change-tools.js +6 -2
- package/dist/honesty/blind-spots.d.ts +9 -0
- package/dist/honesty/blind-spots.js +17 -4
- package/dist/honesty/gap-ledger.d.ts +52 -0
- package/dist/honesty/gap-ledger.js +63 -0
- package/dist/honesty/instrumentation-gaps.d.ts +55 -0
- package/dist/honesty/instrumentation-gaps.js +21 -0
- package/dist/honesty/observability.d.ts +37 -0
- package/dist/honesty/observability.js +40 -0
- package/dist/honesty/verified.js +16 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.js +57 -0
- package/dist/init/mcp.d.ts +1 -2
- package/dist/init/mcp.js +4 -1
- package/dist/init/node-io.js +3 -0
- package/dist/init/run.d.ts +18 -0
- package/dist/init/run.js +34 -3
- package/dist/init/slash-command.d.ts +1 -1
- package/dist/init/slash-command.js +33 -10
- package/dist/journal/envelope.d.ts +24 -24
- package/dist/license/license.d.ts +76 -5
- package/dist/license/license.js +93 -29
- package/dist/mcp/mcp-proxy.d.ts +2 -27
- package/dist/mcp/mcp-proxy.js +4 -88
- package/dist/mcp/mcp.d.ts +18 -2
- package/dist/mcp/mcp.js +31 -10
- package/dist/mcp/proxy-daemon-probe.d.ts +8 -0
- package/dist/mcp/proxy-daemon-probe.js +48 -0
- package/dist/mcp/proxy-handshake.js +1 -1
- package/dist/mcp/server-instructions.js +2 -2
- package/dist/mcp/sse-frame-parser.d.ts +19 -0
- package/dist/mcp/sse-frame-parser.js +41 -0
- package/dist/project/artifact-root.d.ts +83 -0
- package/dist/project/artifact-root.js +112 -0
- package/dist/project/memory-fs.d.ts +9 -0
- package/dist/project/memory-fs.js +88 -0
- package/dist/project/project-store.d.ts +17 -0
- package/dist/project/project-store.js +33 -0
- package/dist/project/remember-project.d.ts +24 -0
- package/dist/project/remember-project.js +40 -0
- package/dist/project/session-root.d.ts +15 -0
- package/dist/project/session-root.js +31 -0
- package/dist/runs/run-tools.js +2 -1
- package/dist/session/lease-availability.d.ts +40 -0
- package/dist/session/lease-availability.js +43 -0
- package/dist/session/no-session-diagnosis.d.ts +17 -0
- package/dist/session/no-session-diagnosis.js +41 -8
- package/dist/session/no-session-watch.js +7 -0
- package/dist/session/session-readiness.js +1 -1
- package/dist/session/session.d.ts +9 -0
- package/dist/session/session.js +9 -0
- package/dist/session/stall-clock.d.ts +18 -0
- package/dist/session/stall-clock.js +48 -0
- package/dist/telemetry/daemon-telemetry.js +16 -22
- package/dist/telemetry/license-activation.d.ts +48 -0
- package/dist/telemetry/license-activation.js +57 -0
- package/dist/telemetry/session-metrics.d.ts +1 -1
- package/dist/telemetry/session-metrics.js +1 -1
- package/dist/telemetry/telemetry.d.ts +12 -3
- package/dist/telemetry/telemetry.js +34 -5
- package/dist/tools/act-tools.js +34 -4
- package/dist/tools/assert-verdict.d.ts +2 -0
- package/dist/tools/assert-verdict.js +24 -1
- package/dist/tools/contract-tools.js +5 -3
- package/dist/tools/coverage-tools.js +33 -0
- package/dist/tools/dynamic-tools.js +1 -1
- package/dist/tools/error-recovery.js +1 -1
- package/dist/tools/feedback-tools.js +31 -6
- package/dist/tools/invoke-tool.d.ts +1 -1
- package/dist/tools/invoke-tool.js +10 -5
- package/dist/tools/observe-tools.js +8 -2
- package/dist/tools/tool-kit.d.ts +46 -4
- package/dist/tools/tool-names.d.ts +2 -0
- package/dist/tools/tool-names.js +2 -0
- package/dist/tools/tool-surface.js +2 -3
- package/dist/tools/tools.js +16 -1
- package/docs/README.md +1 -0
- package/docs/agent-cheatsheet.md +2 -2
- package/docs/capabilities.mdx +4 -4
- package/docs/cli/hunt.mdx +2 -2
- package/docs/deploy-checks.md +2 -2
- package/docs/docs.json +2 -2
- package/docs/enterprise.md +9 -3
- package/docs/flows.md +4 -4
- package/docs/gates.md +1 -1
- package/docs/license-activation.mdx +145 -0
- package/docs/recipes.mdx +2 -2
- package/docs/telemetry-contract.md +18 -12
- package/docs/telemetry-events.mdx +1 -34
- package/docs/telemetry.md +0 -1
- package/docs/tools-overview.mdx +1 -1
- package/docs/tools-session-and-feedback.mdx +5 -0
- package/docs/tools-tools-and-run.mdx +15 -15
- package/docs/usage.md +3 -3
- package/package.json +2 -2
- package/dist/telemetry/instrumentation-stall.d.ts +0 -50
- package/dist/telemetry/instrumentation-stall.js +0 -90
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* When a daemon has waited long enough that no app is coming.
|
|
3
|
-
*
|
|
4
|
-
* `app_instrumented` fires on success and only on success, so the population that matters most —
|
|
5
|
-
* daemons that never get an app wired at all — exists in the data only as an absence. An absence is
|
|
6
|
-
* the one thing telemetry cannot interpret: it cannot separate "nothing was ever wired" from "the
|
|
7
|
-
* process was killed before it could say so" from "we never sent the event". The funnel breaks at
|
|
8
|
-
* exactly this step and nowhere else, which makes it the one silence worth converting into a signal.
|
|
9
|
-
*
|
|
10
|
-
* Once per daemon run, and never after an app has connected. A daemon that takes a while and then
|
|
11
|
-
* works reports nothing at all: the question is "did this run ever get an app", and a run that did
|
|
12
|
-
* is not stalled no matter how long it took.
|
|
13
|
-
*
|
|
14
|
-
* The threshold is a judgement, not a measurement, and it is deliberately generous. Someone running
|
|
15
|
-
* `init` and then going to make coffee has not hit a defect, and calling that a stall would drown
|
|
16
|
-
* the real signal in ordinary human latency.
|
|
17
|
-
*
|
|
18
|
-
* Read the result against `agentAttached`, which is what makes it actionable: a stalled daemon with
|
|
19
|
-
* no agent is somebody who installed and walked away, and is not a defect. A stalled daemon WITH an
|
|
20
|
-
* agent attached is the failure the product actually has — the tools are loaded, something is asking
|
|
21
|
-
* for them, and there is nothing on the other end to drive.
|
|
22
|
-
*/
|
|
23
|
-
import { TelemetryEventKind } from '@reticlehq/core';
|
|
24
|
-
import { getTelemetry } from './telemetry.js';
|
|
25
|
-
import { appEverConnected } from './app-instrumented.js';
|
|
26
|
-
/**
|
|
27
|
-
* How long a daemon may sit with no app before it counts as stalled.
|
|
28
|
-
*
|
|
29
|
-
* Ten minutes sits well past setup latency — reading a doc, restarting a dev server, opening a tab —
|
|
30
|
-
* and well short of the half-hour idle windows that dominate the field, so a stall is reported while
|
|
31
|
-
* the session is still alive rather than inferred from its corpse.
|
|
32
|
-
*/
|
|
33
|
-
export const STALL_AFTER_MS = 10 * 60 * 1000;
|
|
34
|
-
let reported = false;
|
|
35
|
-
let daemonStartedAt;
|
|
36
|
-
/** Start the clock. Called from the same place the instrumentation clock is marked. */
|
|
37
|
-
export function markStallClock(now) {
|
|
38
|
-
daemonStartedAt = now;
|
|
39
|
-
reported = false;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Report a stalled install, at most once per daemon run.
|
|
43
|
-
*
|
|
44
|
-
* Returns whether it emitted, so the caller's test can assert the once-only rule without reaching
|
|
45
|
-
* into the telemetry client. Best-effort like every other metric here: it must never be the reason
|
|
46
|
-
* a daemon misbehaves.
|
|
47
|
-
*/
|
|
48
|
-
export function reportInstrumentationStall(facts, now = () => Date.now(), opts = {}) {
|
|
49
|
-
if (reported)
|
|
50
|
-
return false;
|
|
51
|
-
// An app arrived. Whatever this run was, it was not stalled.
|
|
52
|
-
if (appEverConnected())
|
|
53
|
-
return false;
|
|
54
|
-
if (daemonStartedAt === undefined)
|
|
55
|
-
return false;
|
|
56
|
-
const waited = now() - daemonStartedAt;
|
|
57
|
-
// The threshold is a guard against crying stall seconds after boot. At SHUTDOWN there is nothing
|
|
58
|
-
// left to wait for: this daemon ran, no app ever connected, and it is now gone. That is a fact
|
|
59
|
-
// rather than an inference, and it does not become truer at ten minutes than at five.
|
|
60
|
-
//
|
|
61
|
-
// Skipping it here is what makes the event able to see anything at all. An UNATTENDED daemon
|
|
62
|
-
// idle-exits at DAEMON_IDLE_SHUTDOWN_MS (5 min), well short of STALL_AFTER_MS (10) — only an
|
|
63
|
-
// attached one gets the six-times grace that reaches the threshold. So on the periodic path alone
|
|
64
|
-
// `agentAttached` was forced to true on every row, and the bucket this event exists for —
|
|
65
|
-
// installed it, walked away, never wired the app — could not appear in the data at all.
|
|
66
|
-
//
|
|
67
|
-
// `msWaited` still carries the duration, so a consumer that wants to exclude short runs can do it
|
|
68
|
-
// on the data instead of being unable to see them.
|
|
69
|
-
if (true !== opts.atShutdown && waited < STALL_AFTER_MS)
|
|
70
|
-
return false;
|
|
71
|
-
reported = true;
|
|
72
|
-
try {
|
|
73
|
-
void getTelemetry().emit(TelemetryEventKind.INSTRUMENTATION_STALLED, {
|
|
74
|
-
stall: {
|
|
75
|
-
initialized: facts.initialized,
|
|
76
|
-
agentAttached: facts.agentAttached,
|
|
77
|
-
msWaited: Math.max(0, waited),
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
/* never let a metric interfere with a running daemon */
|
|
83
|
-
}
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
/** Tests only. */
|
|
87
|
-
export function resetInstrumentationStall() {
|
|
88
|
-
reported = false;
|
|
89
|
-
daemonStartedAt = undefined;
|
|
90
|
-
}
|