@reticlehq/core 2.13.1 → 3.1.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/dist/artifacts/artifacts-entry.d.ts +20 -0
- package/dist/artifacts/artifacts-entry.js +20 -0
- package/dist/artifacts/flow-composition.d.ts +30 -0
- package/dist/artifacts/flow-composition.js +19 -0
- package/dist/{flow-constants.d.ts → artifacts/flow-constants.d.ts} +97 -3
- package/dist/{flow-constants.js → artifacts/flow-constants.js} +103 -4
- package/dist/artifacts/flow-mutation-target.d.ts +39 -0
- package/dist/artifacts/flow-mutation-target.js +89 -0
- package/dist/artifacts/flow-order.d.ts +30 -0
- package/dist/artifacts/flow-order.js +49 -0
- package/dist/artifacts/flow-select.d.ts +56 -0
- package/dist/artifacts/flow-select.js +56 -0
- package/dist/artifacts/flow-step-tool.d.ts +31 -0
- package/dist/artifacts/flow-step-tool.js +31 -0
- package/dist/artifacts/flow-types.d.ts +3736 -0
- package/dist/artifacts/flow-types.js +463 -0
- package/dist/artifacts/flow-unreached.d.ts +12 -0
- package/dist/artifacts/flow-unreached.js +24 -0
- package/dist/{impact-savings.d.ts → artifacts/impact-savings.d.ts} +7 -3
- package/dist/{impact-savings.js → artifacts/impact-savings.js} +27 -4
- package/dist/{impact.d.ts → artifacts/impact.d.ts} +122 -54
- package/dist/{impact.js → artifacts/impact.js} +30 -0
- package/dist/{journal.d.ts → artifacts/journal.d.ts} +50 -6
- package/dist/{journal.js → artifacts/journal.js} +38 -2
- package/dist/artifacts/step-effect.d.ts +29 -0
- package/dist/artifacts/step-effect.js +28 -0
- package/dist/hooks/hook-events.d.ts +311 -0
- package/dist/hooks/hook-events.js +127 -0
- package/dist/hooks/hooks-entry.d.ts +9 -0
- package/dist/hooks/hooks-entry.js +9 -0
- package/dist/{brand.d.ts → identity/brand.d.ts} +7 -0
- package/dist/{contract-fingerprint.d.ts → identity/contract-fingerprint.d.ts} +21 -3
- package/dist/{contract-fingerprint.js → identity/contract-fingerprint.js} +22 -4
- package/dist/{document-identity.d.ts → identity/document-identity.d.ts} +4 -5
- package/dist/{document-identity.js → identity/document-identity.js} +4 -5
- package/dist/{source-constants.d.ts → identity/source-constants.d.ts} +4 -4
- package/dist/{source-constants.js → identity/source-constants.js} +4 -4
- package/dist/index.d.ts +69 -42
- package/dist/index.js +78 -44
- package/dist/onboarding.d.ts +114 -0
- package/dist/onboarding.js +141 -0
- package/dist/realm/registry.d.ts +212 -0
- package/dist/realm/registry.js +302 -0
- package/dist/{dev-server-registry.d.ts → registry/dev-server-registry.d.ts} +4 -5
- package/dist/{dev-server-registry.js → registry/dev-server-registry.js} +28 -19
- package/dist/{project-registry.d.ts → registry/project-registry.d.ts} +5 -5
- package/dist/{project-registry.js → registry/project-registry.js} +5 -5
- package/dist/schema/command-name.json +31 -0
- package/dist/schema/event-message.json +1 -0
- package/dist/schema/event-payloads.json +791 -0
- package/dist/schema/event-type.json +1 -0
- package/dist/schema/hello-message.json +76 -2
- package/dist/schema/reticle-event.json +1 -0
- package/dist/schema/reticle-message.json +77 -2
- package/dist/telemetry-entry.d.ts +15 -0
- package/dist/telemetry-entry.js +15 -0
- package/dist/telemetry-feedback.d.ts +13 -14
- package/dist/telemetry-feedback.js +11 -12
- package/dist/telemetry-license.d.ts +1 -1
- package/dist/telemetry-license.js +1 -1
- package/dist/telemetry-refusal.d.ts +11 -11
- package/dist/telemetry-refusal.js +7 -8
- package/dist/telemetry-session.d.ts +49 -57
- package/dist/telemetry-session.js +47 -55
- package/dist/telemetry.d.ts +229 -198
- package/dist/telemetry.js +83 -98
- package/dist/tour-entry.d.ts +10 -0
- package/dist/tour-entry.js +10 -0
- package/dist/tour.d.ts +125 -0
- package/dist/tour.js +165 -0
- package/dist/{consequence.d.ts → verdict/consequence.d.ts} +35 -11
- package/dist/{consequence.js → verdict/consequence.js} +9 -22
- package/dist/{finding-fingerprint.js → verdict/finding-fingerprint.js} +1 -1
- package/dist/{findings.d.ts → verdict/findings.d.ts} +149 -41
- package/dist/{findings.js → verdict/findings.js} +169 -48
- package/dist/{instrumentation-gap.d.ts → verdict/instrumentation-gap.d.ts} +22 -14
- package/dist/{instrumentation-gap.js → verdict/instrumentation-gap.js} +23 -15
- package/dist/{intent.d.ts → verdict/intent.d.ts} +41 -52
- package/dist/{intent.js → verdict/intent.js} +11 -22
- package/dist/verdict/revision.d.ts +44 -0
- package/dist/verdict/revision.js +53 -0
- package/dist/{run-context.d.ts → verdict/run-context.d.ts} +13 -34
- package/dist/{run-context.js → verdict/run-context.js} +15 -36
- package/dist/{security.js → verdict/security.js} +12 -21
- package/dist/{verification-run.d.ts → verdict/verification-run.d.ts} +369 -93
- package/dist/{verification-run.js → verdict/verification-run.js} +157 -21
- package/dist/{verified-constants.d.ts → verdict/verified-constants.d.ts} +36 -13
- package/dist/{verified-constants.js → verdict/verified-constants.js} +36 -13
- package/dist/verdict/verify-progress.d.ts +129 -0
- package/dist/verdict/verify-progress.js +74 -0
- package/dist/wire/channel.d.ts +46 -0
- package/dist/wire/channel.js +95 -0
- package/dist/{constants.d.ts → wire/constants/constants.d.ts} +124 -28
- package/dist/{constants.js → wire/constants/constants.js} +137 -28
- package/dist/{session-constants.d.ts → wire/constants/session-constants.d.ts} +9 -2
- package/dist/{session-constants.js → wire/constants/session-constants.js} +9 -2
- package/dist/{desktop-contract.js → wire/desktop-contract.js} +1 -1
- package/dist/{event-classification.js → wire/event-classification.js} +1 -1
- package/dist/{event-payloads.d.ts → wire/event-payloads.d.ts} +229 -17
- package/dist/{event-payloads.js → wire/event-payloads.js} +61 -3
- package/dist/{event-priority.d.ts → wire/event-priority.d.ts} +1 -4
- package/dist/{event-priority.js → wire/event-priority.js} +2 -5
- package/dist/wire/global-press.d.ts +30 -0
- package/dist/wire/global-press.js +54 -0
- package/dist/{messages.d.ts → wire/messages.d.ts} +290 -38
- package/dist/{messages.js → wire/messages.js} +93 -5
- package/dist/wire/narrow.d.ts +39 -0
- package/dist/wire/narrow.js +45 -0
- package/dist/{net.d.ts → wire/net.d.ts} +49 -10
- package/dist/{net.js → wire/net.js} +49 -10
- package/dist/wire/platform.d.ts +37 -0
- package/dist/wire/platform.js +36 -0
- package/dist/{redaction.d.ts → wire/redaction.d.ts} +30 -0
- package/dist/wire/redaction.js +274 -0
- package/dist/wire/tool-names.d.ts +133 -0
- package/dist/wire/tool-names.js +142 -0
- package/dist/{toon.js → wire/toon.js} +1 -1
- package/dist/{types.d.ts → wire/types.d.ts} +106 -66
- package/dist/{types.js → wire/types.js} +24 -4
- package/dist/{no-session-reason.d.ts → words/no-session-reason.d.ts} +7 -3
- package/dist/{no-session-reason.js → words/no-session-reason.js} +7 -3
- package/dist/{notices.d.ts → words/notices.d.ts} +24 -12
- package/dist/{notices.js → words/notices.js} +27 -12
- package/package.json +22 -5
- package/dist/flow-types.d.ts +0 -1473
- package/dist/flow-types.js +0 -195
- package/dist/redaction.js +0 -149
- /package/dist/{brand.js → identity/brand.js} +0 -0
- /package/dist/{edit-epoch.d.ts → identity/edit-epoch.d.ts} +0 -0
- /package/dist/{edit-epoch.js → identity/edit-epoch.js} +0 -0
- /package/dist/{project-id.d.ts → identity/project-id.d.ts} +0 -0
- /package/dist/{project-id.js → identity/project-id.js} +0 -0
- /package/dist/{daemon-registry.d.ts → registry/daemon-registry.d.ts} +0 -0
- /package/dist/{daemon-registry.js → registry/daemon-registry.js} +0 -0
- /package/dist/{finding-fingerprint.d.ts → verdict/finding-fingerprint.d.ts} +0 -0
- /package/dist/{security.d.ts → verdict/security.d.ts} +0 -0
- /package/dist/{desktop-contract.d.ts → wire/desktop-contract.d.ts} +0 -0
- /package/dist/{event-classification.d.ts → wire/event-classification.d.ts} +0 -0
- /package/dist/{state-select.d.ts → wire/state-select.d.ts} +0 -0
- /package/dist/{state-select.js → wire/state-select.js} +0 -0
- /package/dist/{toon.d.ts → wire/toon.d.ts} +0 -0
- /package/dist/{browser-misdirect.d.ts → words/browser-misdirect.d.ts} +0 -0
- /package/dist/{browser-misdirect.js → words/browser-misdirect.js} +0 -0
- /package/dist/{unreachable-notice.d.ts → words/unreachable-notice.d.ts} +0 -0
- /package/dist/{unreachable-notice.js → words/unreachable-notice.js} +0 -0
- /package/dist/{upgrade.d.ts → words/upgrade.d.ts} +0 -0
- /package/dist/{upgrade.js → words/upgrade.js} +0 -0
|
@@ -2,20 +2,16 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* The dev-server discovery registry — the return leg of `daemon-registry.ts`.
|
|
4
4
|
*
|
|
5
|
-
* A live daemon
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* A live daemon drops `daemon-<port>.json` here so a build plugin can FIND it by projectId rather
|
|
6
|
+
* than being told a port in two places. This is the other leg: without it the daemon and `init`
|
|
7
|
+
* cannot know a dev server exists at all, and the commonest setup miss — a plugin added to a config
|
|
8
|
+
* the running dev server already read — is invisible from outside that process.
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* The alternative was for `init` to run the dev command itself. It cannot: the command, the script
|
|
15
|
-
* name, the package manager, the port and the framework are all things the user or their agent may
|
|
16
|
-
* change, and a setup step that hardcodes any of them is a setup step that breaks on the project it
|
|
17
|
-
* was most needed for. So nothing here starts anything or names a command. The plugin ALREADY runs
|
|
18
|
-
* Node-side when the dev server boots; it announces there, and the reader waits.
|
|
10
|
+
* Nothing here starts anything or names a command. `init` cannot run the dev command itself: the
|
|
11
|
+
* command, the script name, the package manager, the port and the framework are all things the user
|
|
12
|
+
* or their agent may change, and hardcoding any of them breaks on the project it was most needed
|
|
13
|
+
* for. The plugin ALREADY runs Node-side when the dev server boots; it announces there, and the
|
|
14
|
+
* reader waits.
|
|
19
15
|
*
|
|
20
16
|
* With both legs present the diagnosis is three-way and every branch is an observed fact:
|
|
21
17
|
*
|
|
@@ -81,11 +77,10 @@ export const DevServerEntrySchema = z.object({
|
|
|
81
77
|
/**
|
|
82
78
|
* The live entries that belong to THIS project.
|
|
83
79
|
*
|
|
84
|
-
* Scoping is
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* and handed them app B's URL: confident, specific, and about a project they were not setting up.
|
|
80
|
+
* Scoping is the difference between a diagnosis and a wrong answer. The registry is machine-wide —
|
|
81
|
+
* one directory holds every app on the box — so unscoped, "a dev server is running" is satisfied by
|
|
82
|
+
* somebody else's app, another package in the same monorepo, or yesterday's terminal, and `init`
|
|
83
|
+
* for app A hands the user app B's URL: confident, specific, and about the wrong project.
|
|
89
84
|
*
|
|
90
85
|
* Two ways to belong, because both are true and neither covers the other:
|
|
91
86
|
*
|
|
@@ -110,7 +105,21 @@ export function devServersForProject(entries, scope) {
|
|
|
110
105
|
function isWithin(path, base) {
|
|
111
106
|
if (base === undefined || 0 === base.length)
|
|
112
107
|
return false;
|
|
113
|
-
|
|
108
|
+
/*
|
|
109
|
+
* Trailing separators are trimmed with a loop rather than `/\/+$/`, which is a polynomial-ReDoS
|
|
110
|
+
* shape: on a run of slashes followed by anything else the engine retries `\/+` from every start
|
|
111
|
+
* position and rescans to the end each time, so the cost is quadratic in the length of the run.
|
|
112
|
+
* Flagged by CodeQL on this line. A registry root is not obviously hostile input, but this is
|
|
113
|
+
* `@reticlehq/core` — the package everything else depends on — and the loop is O(n), boring, and
|
|
114
|
+
* the same length as the regex it replaces.
|
|
115
|
+
*/
|
|
116
|
+
const norm = (p) => {
|
|
117
|
+
const forward = p.split('\\').join('/');
|
|
118
|
+
let end = forward.length;
|
|
119
|
+
while (end > 0 && '/' === forward[end - 1])
|
|
120
|
+
end -= 1;
|
|
121
|
+
return forward.slice(0, end);
|
|
122
|
+
};
|
|
114
123
|
const target = norm(path);
|
|
115
124
|
const parent = norm(base);
|
|
116
125
|
return target === parent || target.startsWith(`${parent}/`);
|
|
@@ -2,11 +2,11 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Which directory a projectId lives in, on this machine.
|
|
4
4
|
*
|
|
5
|
-
* Config discovery answers the same question by walking out from the daemon's
|
|
6
|
-
* which
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Config discovery answers the same question by walking out from the daemon's working directory,
|
|
6
|
+
* which works only when the daemon and the app share a tree. A daemon started in one repo, driving
|
|
7
|
+
* an app in a sibling checkout, never finds that app's `.reticle.json` however far it walks — and
|
|
8
|
+
* since an editor starts a user-scoped MCP server wherever it likes, that is the default
|
|
9
|
+
* arrangement.
|
|
10
10
|
*
|
|
11
11
|
* `init` holds both halves at the moment it runs — the directory it is initialising and the
|
|
12
12
|
* projectId it has just written into that directory's `.reticle.json`. Recording the pair once makes
|
|
@@ -2,11 +2,11 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Which directory a projectId lives in, on this machine.
|
|
4
4
|
*
|
|
5
|
-
* Config discovery answers the same question by walking out from the daemon's
|
|
6
|
-
* which
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Config discovery answers the same question by walking out from the daemon's working directory,
|
|
6
|
+
* which works only when the daemon and the app share a tree. A daemon started in one repo, driving
|
|
7
|
+
* an app in a sibling checkout, never finds that app's `.reticle.json` however far it walks — and
|
|
8
|
+
* since an editor starts a user-scoped MCP server wherever it likes, that is the default
|
|
9
|
+
* arrangement.
|
|
10
10
|
*
|
|
11
11
|
* `init` holds both halves at the moment it runs — the directory it is initialising and the
|
|
12
12
|
* projectId it has just written into that directory's `.reticle.json`. Recording the pair once makes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/ReticleCommand",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"ReticleCommand": {
|
|
5
|
+
"type": "string",
|
|
6
|
+
"enum": [
|
|
7
|
+
"snapshot",
|
|
8
|
+
"query",
|
|
9
|
+
"match",
|
|
10
|
+
"inspect",
|
|
11
|
+
"act",
|
|
12
|
+
"act_sequence",
|
|
13
|
+
"animations",
|
|
14
|
+
"narrate",
|
|
15
|
+
"clock",
|
|
16
|
+
"capabilities",
|
|
17
|
+
"state_read",
|
|
18
|
+
"storage_read",
|
|
19
|
+
"scroll",
|
|
20
|
+
"session_config",
|
|
21
|
+
"presenter",
|
|
22
|
+
"impact",
|
|
23
|
+
"capture",
|
|
24
|
+
"navigate",
|
|
25
|
+
"refresh",
|
|
26
|
+
"flows"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
31
|
+
}
|