@reticlehq/core 1.3.0 → 2.0.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/README.md +14 -86
- package/dist/brand.d.ts +21 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +16 -0
- package/dist/brand.js.map +1 -0
- package/dist/constants.d.ts +371 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +343 -0
- package/dist/constants.js.map +1 -0
- package/dist/flow-constants.d.ts +175 -0
- package/dist/flow-constants.d.ts.map +1 -0
- package/dist/flow-constants.js +162 -0
- package/dist/flow-constants.js.map +1 -0
- package/dist/flow-types.d.ts +1182 -0
- package/dist/flow-types.d.ts.map +1 -0
- package/dist/flow-types.js +144 -0
- package/dist/flow-types.js.map +1 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -5543
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +424 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +103 -0
- package/dist/messages.js.map +1 -0
- package/dist/notices.d.ts +47 -0
- package/dist/notices.d.ts.map +1 -0
- package/dist/notices.js +51 -0
- package/dist/notices.js.map +1 -0
- package/dist/schema/command-message.json +41 -0
- package/dist/schema/command-result.json +34 -0
- package/dist/schema/event-message.json +77 -0
- package/dist/schema/event-type.json +35 -0
- package/dist/schema/hello-message.json +59 -0
- package/dist/schema/reticle-event.json +63 -0
- package/dist/schema/reticle-message.json +193 -0
- package/dist/security.d.ts +5 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +22 -0
- package/dist/security.js.map +1 -0
- package/dist/session-constants.d.ts +116 -0
- package/dist/session-constants.d.ts.map +1 -0
- package/dist/session-constants.js +113 -0
- package/dist/session-constants.js.map +1 -0
- package/dist/state-select.d.ts +23 -0
- package/dist/state-select.d.ts.map +1 -0
- package/dist/state-select.js +60 -0
- package/dist/state-select.js.map +1 -0
- package/dist/toon.d.ts +44 -0
- package/dist/toon.d.ts.map +1 -0
- package/dist/toon.js +153 -0
- package/dist/toon.js.map +1 -0
- package/dist/types.d.ts +833 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +165 -0
- package/dist/types.js.map +1 -0
- package/dist/upgrade.d.ts +74 -0
- package/dist/upgrade.d.ts.map +1 -0
- package/dist/upgrade.js +88 -0
- package/dist/upgrade.js.map +1 -0
- package/dist/verification-run.d.ts +1195 -0
- package/dist/verification-run.d.ts.map +1 -0
- package/dist/verification-run.js +261 -0
- package/dist/verification-run.js.map +1 -0
- package/package.json +32 -79
- package/dist/babel.d.ts +0 -7
- package/dist/babel.js +0 -32
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -11264
- package/dist/eslint.d.ts +0 -1
- package/dist/eslint.js +0 -134
- package/dist/loader.cjs +0 -52
- package/dist/next.d.ts +0 -21
- package/dist/next.js +0 -24
- package/dist/server.d.ts +0 -1
- package/dist/server.js +0 -9486
- package/dist/test.d.ts +0 -1
- package/dist/test.js +0 -9368
- package/dist/vite.d.ts +0 -1
- package/dist/vite.js +0 -196
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,YAAY,EAIb,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;IAU7B,sGAAsG;;IAEtG,oGAAoG;;;;;;;;;;;;;;IAIpG,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/C,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CA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CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwD3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAE7C;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AnnotationKind, ElementState, QueryBy, RunKind, RunStatus, } from './constants.js';
|
|
3
|
+
import { RiskSurface } from './verification-run.js';
|
|
4
|
+
/** A query describing which element(s) to find, Testing-Library style. */
|
|
5
|
+
export const ElementQuerySchema = z.object({
|
|
6
|
+
by: z.nativeEnum(QueryBy).optional(),
|
|
7
|
+
value: z.string().optional(),
|
|
8
|
+
role: z.string().optional(),
|
|
9
|
+
name: z.string().optional(),
|
|
10
|
+
text: z.string().optional(),
|
|
11
|
+
label: z.string().optional(),
|
|
12
|
+
placeholder: z.string().optional(),
|
|
13
|
+
testid: z.string().optional(),
|
|
14
|
+
alt: z.string().optional(),
|
|
15
|
+
/** Component display name (auto-anchor resolution). The nearest enclosing component of the target. */
|
|
16
|
+
component: z.string().optional(),
|
|
17
|
+
/** Source location of the target element (auto-anchor resolution) — the precise, granular match. */
|
|
18
|
+
source: z
|
|
19
|
+
.object({ file: z.string(), line: z.number(), column: z.number().optional() })
|
|
20
|
+
.optional(),
|
|
21
|
+
/** CSS selector or ref to scope the search. */
|
|
22
|
+
scope: z.string().optional(),
|
|
23
|
+
});
|
|
24
|
+
/** One named flow advertised by the app (mirrors the browser CapabilityFlow). */
|
|
25
|
+
export const CapabilityFlowSchema = z.object({
|
|
26
|
+
name: z.string(),
|
|
27
|
+
steps: z.array(z.string()),
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* A declared risk zone — the app naming a surface (auth/payment/db/…) and the paths it covers, so a
|
|
31
|
+
* host can gate on it. Shares RiskSurface with the verification-run verdict so a declaration and a
|
|
32
|
+
* detection speak the same vocabulary. ENFORCED LATER — parsed + surfaced now.
|
|
33
|
+
*/
|
|
34
|
+
export const RiskZoneSchema = z.object({
|
|
35
|
+
surface: z.nativeEnum(RiskSurface),
|
|
36
|
+
paths: z.array(z.string()).optional(),
|
|
37
|
+
note: z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Optional governance metadata an app may declare about its testable surface: who owns it, safety
|
|
41
|
+
* invariants, allowed scopes, store paths/selectors to redact, and declared risk zones. All optional
|
|
42
|
+
* and additive — a manifest without any of it stays valid (back-compat). Parsed + surfaced now;
|
|
43
|
+
* enforcement (policy gates, redaction-by-declaration) comes later.
|
|
44
|
+
*/
|
|
45
|
+
export const ManifestGovernanceSchema = z.object({
|
|
46
|
+
owner: z.string().optional(),
|
|
47
|
+
safety: z.array(z.string()).optional(),
|
|
48
|
+
scope: z.array(z.string()).optional(),
|
|
49
|
+
redact: z.array(z.string()).optional(),
|
|
50
|
+
risk: z.array(RiskZoneSchema).optional(),
|
|
51
|
+
});
|
|
52
|
+
/** The app's testable surface — persisted form of the browser Capabilities. */
|
|
53
|
+
export const CapabilitiesSchema = z.object({
|
|
54
|
+
testids: z.array(z.string()),
|
|
55
|
+
signals: z.array(z.string()),
|
|
56
|
+
stores: z.array(z.string()),
|
|
57
|
+
flows: z.array(CapabilityFlowSchema),
|
|
58
|
+
/** Optional declared governance (owner/safety/scope/redact/risk). Additive — back-compat safe. */
|
|
59
|
+
governance: ManifestGovernanceSchema.optional(),
|
|
60
|
+
});
|
|
61
|
+
/** The on-disk contract.json envelope: versioned + timestamped capabilities. */
|
|
62
|
+
export const ContractFileSchema = z.object({
|
|
63
|
+
version: z.number(),
|
|
64
|
+
generatedAt: z.number(),
|
|
65
|
+
capabilities: CapabilitiesSchema,
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* Evidence counts captured with a run so the agent can compare runs over time
|
|
69
|
+
* ("console errors went 0→3 since last run"). All optional: a run records only what it observed.
|
|
70
|
+
*/
|
|
71
|
+
export const RunEvidenceSchema = z.object({
|
|
72
|
+
consoleErrors: z.number().optional(),
|
|
73
|
+
networkErrors: z.number().optional(),
|
|
74
|
+
driftSteps: z.number().optional(),
|
|
75
|
+
});
|
|
76
|
+
/** One persisted run outcome in .reticle/project.json. */
|
|
77
|
+
export const RunRecordSchema = z.object({
|
|
78
|
+
kind: z.nativeEnum(RunKind),
|
|
79
|
+
name: z.string(),
|
|
80
|
+
status: z.nativeEnum(RunStatus),
|
|
81
|
+
at: z.number(),
|
|
82
|
+
summary: z.string().optional(),
|
|
83
|
+
evidence: RunEvidenceSchema.optional(),
|
|
84
|
+
durationMs: z.number().optional(),
|
|
85
|
+
});
|
|
86
|
+
/** The optional learned map of the app (known flow/route names). */
|
|
87
|
+
export const ProjectLearnedSchema = z.object({
|
|
88
|
+
flows: z.array(z.string()).optional(),
|
|
89
|
+
routes: z.array(z.string()).optional(),
|
|
90
|
+
});
|
|
91
|
+
/** The on-disk project.json envelope: versioned learned-map + chronological runs. */
|
|
92
|
+
export const ProjectFileSchema = z.object({
|
|
93
|
+
version: z.number(),
|
|
94
|
+
learned: ProjectLearnedSchema.optional(),
|
|
95
|
+
runs: z.array(RunRecordSchema),
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* The structured annotation REQUEST a human/agent attaches to the live
|
|
99
|
+
* recording (the server-side `reticle_annotate` tool). A discriminated union over the four shipped
|
|
100
|
+
* AnnotationKind values. Each variant carries exactly the fields its compilation needs.
|
|
101
|
+
*
|
|
102
|
+
* FIRST CUT boundary (do NOT remove): only this structured union is accepted. A free
|
|
103
|
+
* NATURAL-LANGUAGE annotation (e.g. the string "the diff should appear") is REJECTED by this
|
|
104
|
+
* schema — never guessed/compiled into a predicate. Free NL → predicate compilation is explicitly
|
|
105
|
+
* FUTURE; a `safeParse` of a bare string returns success:false, which the tool maps
|
|
106
|
+
* to AnnotationErrorCode.UNKNOWN_KIND. No NL parser exists or is faked here.
|
|
107
|
+
*/
|
|
108
|
+
export const AnnotationSchema = z.discriminatedUnion('kind', [
|
|
109
|
+
z.object({
|
|
110
|
+
kind: z.literal(AnnotationKind.ASSERT_SIGNAL),
|
|
111
|
+
name: z.string().min(1),
|
|
112
|
+
dataMatches: z.record(z.unknown()).optional(),
|
|
113
|
+
}),
|
|
114
|
+
z.object({
|
|
115
|
+
kind: z.literal(AnnotationKind.ASSERT_VISIBLE),
|
|
116
|
+
testid: z.string().min(1),
|
|
117
|
+
}),
|
|
118
|
+
z.object({
|
|
119
|
+
kind: z.literal(AnnotationKind.ASSERT_STATE),
|
|
120
|
+
statePath: z.string().min(1),
|
|
121
|
+
store: z.string().min(1).optional(),
|
|
122
|
+
equals: z.unknown().optional(),
|
|
123
|
+
}),
|
|
124
|
+
z.object({
|
|
125
|
+
kind: z.literal(AnnotationKind.MARK_DYNAMIC),
|
|
126
|
+
testid: z.string().min(1),
|
|
127
|
+
}),
|
|
128
|
+
z.object({
|
|
129
|
+
kind: z.literal(AnnotationKind.SUCCESS_STATE),
|
|
130
|
+
signal: z.string().min(1).optional(),
|
|
131
|
+
testid: z.string().min(1).optional(),
|
|
132
|
+
// A store-truth golden end-condition: the flow succeeds when this store path holds (e.g. the
|
|
133
|
+
// created deployment actually reached status 'live' in the store, not just on screen).
|
|
134
|
+
statePath: z.string().min(1).optional(),
|
|
135
|
+
store: z.string().min(1).optional(),
|
|
136
|
+
equals: z.unknown().optional(),
|
|
137
|
+
// Treat the statePath as an INVARIANT that must hold AFTER settle (a blast-radius "this unrelated
|
|
138
|
+
// path must not have moved" check), not a condition to wait for.
|
|
139
|
+
hold: z.boolean().optional(),
|
|
140
|
+
// A network-cardinality golden end-condition: the flow succeeds only when EXACTLY `count` matching
|
|
141
|
+
// requests fired (omit count = presence). Catches the double-submit / retry-storm regression class.
|
|
142
|
+
net: z
|
|
143
|
+
.object({
|
|
144
|
+
method: z.string().min(1).optional(),
|
|
145
|
+
urlContains: z.string().min(1).optional(),
|
|
146
|
+
status: z.number().optional(),
|
|
147
|
+
count: z.number().int().nonnegative().optional(),
|
|
148
|
+
})
|
|
149
|
+
.optional(),
|
|
150
|
+
// A console golden end-condition: with absent:true, "the action completed with a clean console"
|
|
151
|
+
// (no message at `level`, default 'error') — catches an action that logs a caught error / rejection
|
|
152
|
+
// while the UI still renders fine.
|
|
153
|
+
console: z
|
|
154
|
+
.object({
|
|
155
|
+
level: z.string().min(1).optional(),
|
|
156
|
+
absent: z.boolean().optional(),
|
|
157
|
+
})
|
|
158
|
+
.optional(),
|
|
159
|
+
}),
|
|
160
|
+
z.object({
|
|
161
|
+
kind: z.literal(AnnotationKind.INTENT),
|
|
162
|
+
text: z.string().min(1),
|
|
163
|
+
}),
|
|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QAAQ,EAAE;YACpC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;SACjD,CAAC;aACD,QAAQ,EAAE;QACb,gGAAgG;QAChG,oGAAoG;QACpG,mCAAmC;QACnC,OAAO,EAAE,CAAC;aACP,MAAM,CAAC;YACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACnC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SAC/B,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;QACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACxB,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The upgrade-hint contract — how the local (free, offline-first) Reticle server tells the agent, and
|
|
3
|
+
* through it the human, that a capability they just reached for lives in the hosted tier. It is a
|
|
4
|
+
* VALUE-TRIGGERED signal, never an advertisement: the server emits a hint only when a task is genuinely
|
|
5
|
+
* blocked by a free-tier boundary (e.g. the agent tries to share a verification result with a teammate,
|
|
6
|
+
* or wants run history beyond the local buffer). The agent surfaces it in context and MUST NOT repeat it
|
|
7
|
+
* after a decline. This keeps Reticle's "no phone-home" promise intact — nothing leaves the machine, and
|
|
8
|
+
* the hint is honest about the exact problem the paid tier solves.
|
|
9
|
+
*
|
|
10
|
+
* Design guarantees the emitter must honour (enforced server-side, named here so both ends agree):
|
|
11
|
+
* - one hint per capability per session,
|
|
12
|
+
* - fully silenceable via the env switch below,
|
|
13
|
+
* - the agent's objective never includes "drive upgrades" — it reports a blocker, it does not sell.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
/** Env switch that silences ALL upgrade hints — respected by the server before any hint is emitted. */
|
|
17
|
+
export declare const UPGRADE_HINT_SILENCE_ENV = "RETICLE_NO_UPSELL";
|
|
18
|
+
/** Where the human is sent to learn more / link a free account. The canonical cloud entry point. */
|
|
19
|
+
export declare const CLOUD_LEARN_MORE_URL = "https://reticle.sh/cloud";
|
|
20
|
+
/**
|
|
21
|
+
* The hosted capabilities a free/local session can reach for. Each is genuinely multiplayer, memory, or
|
|
22
|
+
* learned — the categories a local-only tool structurally cannot provide (see OSS↔server line).
|
|
23
|
+
*/
|
|
24
|
+
export declare const CloudCapability: {
|
|
25
|
+
/** Share a read-only proof of a verification run with a teammate (a hosted, linkable artifact). */
|
|
26
|
+
readonly SHARE_PROOF: "share_proof";
|
|
27
|
+
/** Run history beyond the local ring buffer — trends, flake surfaces across sessions. */
|
|
28
|
+
readonly RUN_HISTORY: "run_history";
|
|
29
|
+
/** A shared review queue of human-pinned mistakes across the team. */
|
|
30
|
+
readonly TEAM_REVIEW: "team_review";
|
|
31
|
+
/** Corpus-ranked heal: anchor-stability priors learned from real refactors across the fleet. */
|
|
32
|
+
readonly CORPUS_HEAL: "corpus_heal";
|
|
33
|
+
/** Verify-before-merge policy gate in CI (the governance tier). */
|
|
34
|
+
readonly CI_GATE: "ci_gate";
|
|
35
|
+
};
|
|
36
|
+
export type CloudCapability = (typeof CloudCapability)[keyof typeof CloudCapability];
|
|
37
|
+
/**
|
|
38
|
+
* A single, structured hint. `reason` states the blocker as fact; `unlockedBy` names the one action that
|
|
39
|
+
* resolves it; `learnMoreUrl` is where to go. Machine-readable `capability` lets the agent de-dupe and
|
|
40
|
+
* lets a client branch without matching prose.
|
|
41
|
+
*/
|
|
42
|
+
export declare const UpgradeHintSchema: z.ZodObject<{
|
|
43
|
+
capability: z.ZodNativeEnum<{
|
|
44
|
+
/** Share a read-only proof of a verification run with a teammate (a hosted, linkable artifact). */
|
|
45
|
+
readonly SHARE_PROOF: "share_proof";
|
|
46
|
+
/** Run history beyond the local ring buffer — trends, flake surfaces across sessions. */
|
|
47
|
+
readonly RUN_HISTORY: "run_history";
|
|
48
|
+
/** A shared review queue of human-pinned mistakes across the team. */
|
|
49
|
+
readonly TEAM_REVIEW: "team_review";
|
|
50
|
+
/** Corpus-ranked heal: anchor-stability priors learned from real refactors across the fleet. */
|
|
51
|
+
readonly CORPUS_HEAL: "corpus_heal";
|
|
52
|
+
/** Verify-before-merge policy gate in CI (the governance tier). */
|
|
53
|
+
readonly CI_GATE: "ci_gate";
|
|
54
|
+
}>;
|
|
55
|
+
reason: z.ZodString;
|
|
56
|
+
unlockedBy: z.ZodString;
|
|
57
|
+
learnMoreUrl: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
capability: "share_proof" | "run_history" | "team_review" | "corpus_heal" | "ci_gate";
|
|
60
|
+
reason: string;
|
|
61
|
+
unlockedBy: string;
|
|
62
|
+
learnMoreUrl: string;
|
|
63
|
+
}, {
|
|
64
|
+
capability: "share_proof" | "run_history" | "team_review" | "corpus_heal" | "ci_gate";
|
|
65
|
+
reason: string;
|
|
66
|
+
unlockedBy: string;
|
|
67
|
+
learnMoreUrl: string;
|
|
68
|
+
}>;
|
|
69
|
+
export type UpgradeHint = z.infer<typeof UpgradeHintSchema>;
|
|
70
|
+
/** Narrow an unknown wire value to a CloudCapability. */
|
|
71
|
+
export declare function isCloudCapability(value: unknown): value is CloudCapability;
|
|
72
|
+
/** Build the canonical hint for a capability. Pure — the emitter decides WHEN, this decides WHAT. */
|
|
73
|
+
export declare function buildUpgradeHint(capability: CloudCapability): UpgradeHint;
|
|
74
|
+
//# sourceMappingURL=upgrade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../src/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uGAAuG;AACvG,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAE5D,oGAAoG;AACpG,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,mGAAmG;;IAEnG,yFAAyF;;IAEzF,sEAAsE;;IAEtE,gGAAgG;;IAEhG,mEAAmE;;CAE3D,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;QAlB5B,mGAAmG;;QAEnG,yFAAyF;;QAEzF,sEAAsE;;QAEtE,gGAAgG;;QAEhG,mEAAmE;;;;;;;;;;;;;;;;EAenE,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAK1E;AAkCD,qGAAqG;AACrG,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,GAAG,WAAW,CAQzE"}
|
package/dist/upgrade.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The upgrade-hint contract — how the local (free, offline-first) Reticle server tells the agent, and
|
|
3
|
+
* through it the human, that a capability they just reached for lives in the hosted tier. It is a
|
|
4
|
+
* VALUE-TRIGGERED signal, never an advertisement: the server emits a hint only when a task is genuinely
|
|
5
|
+
* blocked by a free-tier boundary (e.g. the agent tries to share a verification result with a teammate,
|
|
6
|
+
* or wants run history beyond the local buffer). The agent surfaces it in context and MUST NOT repeat it
|
|
7
|
+
* after a decline. This keeps Reticle's "no phone-home" promise intact — nothing leaves the machine, and
|
|
8
|
+
* the hint is honest about the exact problem the paid tier solves.
|
|
9
|
+
*
|
|
10
|
+
* Design guarantees the emitter must honour (enforced server-side, named here so both ends agree):
|
|
11
|
+
* - one hint per capability per session,
|
|
12
|
+
* - fully silenceable via the env switch below,
|
|
13
|
+
* - the agent's objective never includes "drive upgrades" — it reports a blocker, it does not sell.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
/** Env switch that silences ALL upgrade hints — respected by the server before any hint is emitted. */
|
|
17
|
+
export const UPGRADE_HINT_SILENCE_ENV = 'RETICLE_NO_UPSELL';
|
|
18
|
+
/** Where the human is sent to learn more / link a free account. The canonical cloud entry point. */
|
|
19
|
+
export const CLOUD_LEARN_MORE_URL = 'https://reticle.sh/cloud';
|
|
20
|
+
/**
|
|
21
|
+
* The hosted capabilities a free/local session can reach for. Each is genuinely multiplayer, memory, or
|
|
22
|
+
* learned — the categories a local-only tool structurally cannot provide (see OSS↔server line).
|
|
23
|
+
*/
|
|
24
|
+
export const CloudCapability = {
|
|
25
|
+
/** Share a read-only proof of a verification run with a teammate (a hosted, linkable artifact). */
|
|
26
|
+
SHARE_PROOF: 'share_proof',
|
|
27
|
+
/** Run history beyond the local ring buffer — trends, flake surfaces across sessions. */
|
|
28
|
+
RUN_HISTORY: 'run_history',
|
|
29
|
+
/** A shared review queue of human-pinned mistakes across the team. */
|
|
30
|
+
TEAM_REVIEW: 'team_review',
|
|
31
|
+
/** Corpus-ranked heal: anchor-stability priors learned from real refactors across the fleet. */
|
|
32
|
+
CORPUS_HEAL: 'corpus_heal',
|
|
33
|
+
/** Verify-before-merge policy gate in CI (the governance tier). */
|
|
34
|
+
CI_GATE: 'ci_gate',
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A single, structured hint. `reason` states the blocker as fact; `unlockedBy` names the one action that
|
|
38
|
+
* resolves it; `learnMoreUrl` is where to go. Machine-readable `capability` lets the agent de-dupe and
|
|
39
|
+
* lets a client branch without matching prose.
|
|
40
|
+
*/
|
|
41
|
+
export const UpgradeHintSchema = z.object({
|
|
42
|
+
capability: z.nativeEnum(CloudCapability),
|
|
43
|
+
reason: z.string(),
|
|
44
|
+
unlockedBy: z.string(),
|
|
45
|
+
learnMoreUrl: z.string().url(),
|
|
46
|
+
});
|
|
47
|
+
/** Narrow an unknown wire value to a CloudCapability. */
|
|
48
|
+
export function isCloudCapability(value) {
|
|
49
|
+
return (typeof value === 'string' &&
|
|
50
|
+
Object.values(CloudCapability).includes(value));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Canned, honest copy per capability. Kept here (not inlined at emit sites) so the tone is reviewed in
|
|
54
|
+
* one place and stays factual. The founder confirms the exact wording before it ships to users.
|
|
55
|
+
*/
|
|
56
|
+
const COPY_BY_CAPABILITY = {
|
|
57
|
+
[CloudCapability.SHARE_PROOF]: {
|
|
58
|
+
reason: 'Sharing a verification result with a teammate needs a hosted, linkable proof page.',
|
|
59
|
+
unlockedBy: 'Link a free Reticle Cloud account (reticle login), then share the run.',
|
|
60
|
+
},
|
|
61
|
+
[CloudCapability.RUN_HISTORY]: {
|
|
62
|
+
reason: 'Run history beyond this session lives in the hosted dashboard; local keeps only a buffer.',
|
|
63
|
+
unlockedBy: 'Link a free Reticle Cloud account to keep run history and trends.',
|
|
64
|
+
},
|
|
65
|
+
[CloudCapability.TEAM_REVIEW]: {
|
|
66
|
+
reason: 'A shared review queue of pinned mistakes is a team feature — it needs a hosted store.',
|
|
67
|
+
unlockedBy: 'Add your team to Reticle Cloud to share a review queue.',
|
|
68
|
+
},
|
|
69
|
+
[CloudCapability.CORPUS_HEAL]: {
|
|
70
|
+
reason: 'Corpus-ranked heal uses refactor outcomes learned across the fleet, served from the cloud.',
|
|
71
|
+
unlockedBy: 'Enable the hosted heal service on a Reticle Cloud team plan.',
|
|
72
|
+
},
|
|
73
|
+
[CloudCapability.CI_GATE]: {
|
|
74
|
+
reason: 'Verify-before-merge is a governance gate that runs in your CI against a hosted policy.',
|
|
75
|
+
unlockedBy: 'Configure the Reticle Cloud CI gate for your repository.',
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
/** Build the canonical hint for a capability. Pure — the emitter decides WHEN, this decides WHAT. */
|
|
79
|
+
export function buildUpgradeHint(capability) {
|
|
80
|
+
const copy = COPY_BY_CAPABILITY[capability];
|
|
81
|
+
return {
|
|
82
|
+
capability,
|
|
83
|
+
reason: copy.reason,
|
|
84
|
+
unlockedBy: copy.unlockedBy,
|
|
85
|
+
learnMoreUrl: CLOUD_LEARN_MORE_URL,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=upgrade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../src/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uGAAuG;AACvG,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAE5D,oGAAoG;AACpG,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,mGAAmG;IACnG,WAAW,EAAE,aAAa;IAC1B,yFAAyF;IACzF,WAAW,EAAE,aAAa;IAC1B,sEAAsE;IACtE,WAAW,EAAE,aAAa;IAC1B,gGAAgG;IAChG,WAAW,EAAE,aAAa;IAC1B,mEAAmE;IACnE,OAAO,EAAE,SAAS;CACV,CAAC;AAGX;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;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