@reticlehq/core 3.5.0 → 3.7.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 +4 -0
- package/dist/artifacts/artifacts-entry.js +4 -0
- package/dist/artifacts/drive-script.d.ts +1404 -0
- package/dist/artifacts/drive-script.js +220 -0
- package/dist/artifacts/flow-constants.d.ts +19 -0
- package/dist/artifacts/flow-constants.js +21 -0
- package/dist/artifacts/flow-results.d.ts +450 -0
- package/dist/artifacts/flow-results.js +1 -0
- package/dist/artifacts/flow-types.d.ts +75 -427
- package/dist/artifacts/flow-types.js +15 -2
- package/dist/artifacts/harness-credits.d.ts +39 -0
- package/dist/artifacts/harness-credits.js +69 -0
- package/dist/artifacts/harness-map.d.ts +98 -0
- package/dist/artifacts/harness-map.js +36 -0
- package/dist/artifacts/hud-notices.d.ts +134 -0
- package/dist/artifacts/hud-notices.js +124 -0
- package/dist/artifacts/impact.d.ts +489 -189
- package/dist/artifacts/impact.js +90 -47
- package/dist/artifacts/journal.d.ts +105 -5
- package/dist/artifacts/journal.js +41 -0
- package/dist/artifacts/prompt-context.d.ts +105 -0
- package/dist/artifacts/prompt-context.js +108 -0
- package/dist/artifacts/screenshot-upload.d.ts +51 -0
- package/dist/artifacts/screenshot-upload.js +26 -0
- package/dist/desktop-contract.cjs +1 -0
- package/dist/desktop-contract.d.cts +1 -0
- package/dist/hooks/hook-events.d.ts +4 -4
- package/dist/hud-entry.d.ts +2 -0
- package/dist/hud-entry.js +4 -0
- package/dist/identity/contract-fingerprint.d.ts +9 -0
- package/dist/identity/contract-fingerprint.js +12 -0
- package/dist/identity/testid-attribute.d.ts +18 -0
- package/dist/identity/testid-attribute.js +24 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +9 -1
- package/dist/onboarding.d.ts +10 -2
- package/dist/onboarding.js +6 -0
- package/dist/realm/registry.js +19 -1
- package/dist/schema/command-message.json +36 -0
- package/dist/schema/command-name.json +5 -1
- package/dist/schema/event-payloads.json +56 -2
- package/dist/schema/reticle-message.json +36 -0
- package/dist/telemetry-bug.d.ts +169 -0
- package/dist/telemetry-bug.js +123 -0
- package/dist/telemetry-entry.d.ts +1 -0
- package/dist/telemetry-entry.js +1 -0
- package/dist/telemetry-feedback.d.ts +2 -2
- package/dist/telemetry-refusal.d.ts +5 -4
- package/dist/telemetry-session.d.ts +79 -1
- package/dist/telemetry-session.js +57 -1
- package/dist/telemetry-signals.d.ts +339 -0
- package/dist/telemetry-signals.js +138 -0
- package/dist/telemetry.d.ts +330 -276
- package/dist/telemetry.js +40 -115
- package/dist/tour.d.ts +1 -0
- package/dist/tour.js +13 -5
- package/dist/verdict/consequence.d.ts +3 -0
- package/dist/verdict/disparity.d.ts +105 -0
- package/dist/verdict/disparity.js +40 -0
- package/dist/verdict/findings.d.ts +11 -0
- package/dist/verdict/findings.js +16 -0
- package/dist/verdict/instrumentation-coverage.d.ts +115 -0
- package/dist/verdict/instrumentation-coverage.js +226 -0
- package/dist/verdict/instrumentation-gap.js +1 -1
- package/dist/verdict/intent.d.ts +19 -5
- package/dist/verdict/intent.js +13 -1
- package/dist/verdict/predicate-tree.d.ts +15 -0
- package/dist/verdict/predicate-tree.js +21 -0
- package/dist/verdict/predicate.d.ts +28 -0
- package/dist/verdict/predicate.js +94 -15
- package/dist/verdict/security.d.ts +25 -0
- package/dist/verdict/security.js +82 -0
- package/dist/verdict/verdict-attribution.js +1 -0
- package/dist/verdict/verification-run.d.ts +638 -32
- package/dist/verdict/verification-run.js +90 -0
- package/dist/verdict/verified-constants.d.ts +19 -0
- package/dist/verdict/verified-constants.js +22 -0
- package/dist/wire/constants/constants.d.ts +60 -32
- package/dist/wire/constants/constants.js +61 -33
- package/dist/wire/constants/hud-controls.d.ts +1 -1
- package/dist/wire/constants/hud-controls.js +34 -1
- package/dist/wire/constants/hud-use.d.ts +89 -1
- package/dist/wire/constants/hud-use.js +62 -1
- package/dist/wire/constants/mcp-wire.d.ts +10 -0
- package/dist/wire/constants/mcp-wire.js +10 -0
- package/dist/wire/constants/reticle-chrome.d.ts +19 -0
- package/dist/wire/constants/reticle-chrome.js +19 -0
- package/dist/wire/constants/session-constants.d.ts +21 -0
- package/dist/wire/constants/session-constants.js +21 -0
- package/dist/wire/desktop-contract.d.ts +11 -0
- package/dist/wire/desktop-contract.js +14 -0
- package/dist/wire/event-payloads.d.ts +77 -4
- package/dist/wire/event-payloads.js +27 -0
- package/dist/wire/global-press.d.ts +34 -3
- package/dist/wire/global-press.js +91 -3
- package/dist/wire/hold.d.ts +14 -0
- package/dist/wire/hold.js +18 -0
- package/dist/wire/messages.d.ts +129 -32
- package/dist/wire/messages.js +17 -1
- package/dist/wire/platform-link.d.ts +238 -0
- package/dist/wire/platform-link.js +234 -0
- package/dist/wire/tool-names.d.ts +2 -0
- package/dist/wire/tool-names.js +2 -0
- package/dist/wire/types.d.ts +26 -6
- package/dist/wire/types.js +5 -0
- package/dist/words/no-session-reason.d.ts +7 -0
- package/dist/words/no-session-reason.js +7 -0
- package/dist/words/notices.d.ts +1 -1
- package/dist/words/notices.js +5 -3
- package/dist/words/upgrade.js +1 -1
- package/dist/words/writing-rule.d.ts +14 -0
- package/dist/words/writing-rule.js +17 -0
- package/package.json +1 -1
|
@@ -28,3 +28,28 @@ export declare function isOpaqueOrigin(origin: string): boolean;
|
|
|
28
28
|
* role (a tool name, a click with no role on the descriptor) omit it and the text decides.
|
|
29
29
|
*/
|
|
30
30
|
export declare function isDangerousActionText(text: string, role?: string): boolean;
|
|
31
|
+
export declare const OutwardAction: {
|
|
32
|
+
readonly INVITE: "invite";
|
|
33
|
+
readonly SEND: "send";
|
|
34
|
+
readonly SHARE: "share";
|
|
35
|
+
readonly DELETE: "delete";
|
|
36
|
+
readonly PAY: "pay";
|
|
37
|
+
readonly PUBLISH: "publish";
|
|
38
|
+
readonly REVOKE: "revoke";
|
|
39
|
+
readonly TRANSFER: "transfer";
|
|
40
|
+
readonly SIGN_OUT: "sign out";
|
|
41
|
+
readonly CHANGE_ROLE: "change role";
|
|
42
|
+
readonly CREATE_KEY: "create key";
|
|
43
|
+
/** Reassigning, reopening, archiving, approving: changing an item's state for everyone. */
|
|
44
|
+
readonly CHANGE_STATE: "change state";
|
|
45
|
+
};
|
|
46
|
+
export type OutwardAction = (typeof OutwardAction)[keyof typeof OutwardAction];
|
|
47
|
+
/** The outward action a control would take, from its text and role; value pickers take none. */
|
|
48
|
+
export declare function outwardActionOf(text: string, role?: string): OutwardAction | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The outward actions a journey asks for in so many words. "Invite a teammate" asks for invite;
|
|
51
|
+
* "she does not send an invite" and "without sending" ask for nothing. Pure.
|
|
52
|
+
*/
|
|
53
|
+
export declare function outwardActionsAsked(journey: string): OutwardAction[];
|
|
54
|
+
/** What the Harness says, and the journey records, when it would not press one. */
|
|
55
|
+
export declare const outwardRefusal: (action: OutwardAction) => string;
|
package/dist/verdict/security.js
CHANGED
|
@@ -123,3 +123,85 @@ export function isDangerousActionText(text, role) {
|
|
|
123
123
|
return false;
|
|
124
124
|
return DANGEROUS_ACTION.test(text.replace(/[_-]+/g, ' '));
|
|
125
125
|
}
|
|
126
|
+
// ── What the Harness may press ────────────────────────────────────────────────────────────────
|
|
127
|
+
/*
|
|
128
|
+
* An action that reaches outside the page or changes someone's workspace: it invites, sends,
|
|
129
|
+
* shares, deletes, pays, publishes, revokes, transfers, signs out, changes a role or creates a key.
|
|
130
|
+
* The Harness pressed Invite in a customer's workspace although its journey said "she does not send
|
|
131
|
+
* an invite", and a planner-invented journey typed a new address and pressed Invite. A Harness drive
|
|
132
|
+
* presses one only when its journey asks for that action; a saved flow's steps were asked for by
|
|
133
|
+
* whoever recorded them. The agent's own guard (`isDangerousActionText`) is narrower on purpose.
|
|
134
|
+
*/
|
|
135
|
+
export const OutwardAction = {
|
|
136
|
+
INVITE: 'invite',
|
|
137
|
+
SEND: 'send',
|
|
138
|
+
SHARE: 'share',
|
|
139
|
+
DELETE: 'delete',
|
|
140
|
+
PAY: 'pay',
|
|
141
|
+
PUBLISH: 'publish',
|
|
142
|
+
REVOKE: 'revoke',
|
|
143
|
+
TRANSFER: 'transfer',
|
|
144
|
+
SIGN_OUT: 'sign out',
|
|
145
|
+
CHANGE_ROLE: 'change role',
|
|
146
|
+
CREATE_KEY: 'create key',
|
|
147
|
+
/** Reassigning, reopening, archiving, approving: changing an item's state for everyone. */
|
|
148
|
+
CHANGE_STATE: 'change state',
|
|
149
|
+
};
|
|
150
|
+
/** Each outward action as words on a control (or in the request it points at), and in a journey. */
|
|
151
|
+
const OUTWARD_WORDS = [
|
|
152
|
+
[OutwardAction.INVITE, /\binvit(?:e|es|ed|ing|ation|ations)\b|\/invit/i],
|
|
153
|
+
[OutwardAction.TRANSFER, /\b(?:transfer|send money|send funds|withdraw)\b/i],
|
|
154
|
+
[OutwardAction.SEND, /\b(?:send|sends|sending|resend|email (?:it|them|the))\b/i],
|
|
155
|
+
[OutwardAction.SHARE, /\b(?:share|shares|sharing)\b/i],
|
|
156
|
+
[
|
|
157
|
+
OutwardAction.DELETE,
|
|
158
|
+
/\b(?:delete|deletes|deleting|remove|removes|removing|destroy|erase|drop)\b/i,
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
OutwardAction.PAY,
|
|
162
|
+
/\b(?:pay|pays|paying|payment|purchase|buy|checkout|check out|subscribe|upgrade|place order|confirm order|refund|add (?:a )?card|start (?:the |your |a )?(?:\d+-day |free )?trial)\b|\/(?:billing|checkout)\b/i,
|
|
163
|
+
],
|
|
164
|
+
[OutwardAction.PUBLISH, /\b(?:publish|publishes|deploy|deploys|go live)\b/i],
|
|
165
|
+
[OutwardAction.REVOKE, /\b(?:revoke|revokes|deactivate|suspend)\b/i],
|
|
166
|
+
[OutwardAction.SIGN_OUT, /\b(?:sign ?out|log ?out|sign off)\b/i],
|
|
167
|
+
[
|
|
168
|
+
OutwardAction.CHANGE_ROLE,
|
|
169
|
+
/\b(?:change (?:the |their |his |her )?role|make (?:an? )?(?:admin|owner)|promote|demote|set role)\b/i,
|
|
170
|
+
],
|
|
171
|
+
[OutwardAction.CREATE_KEY, /\b(?:create|generate|new|mint)(?: an?)?(?: api)? key\b|\/keys\b/i],
|
|
172
|
+
[
|
|
173
|
+
OutwardAction.CHANGE_STATE,
|
|
174
|
+
/\b(?:reassign|reassigns|reopen|reopens|re-open|archive|archives|unarchive|approve|approves|reject|rejects|mark as (?:fixed|resolved|done|closed))\b/i,
|
|
175
|
+
],
|
|
176
|
+
];
|
|
177
|
+
/** The outward action a control would take, from its text and role; value pickers take none. */
|
|
178
|
+
export function outwardActionOf(text, role) {
|
|
179
|
+
if (role !== undefined && VALUE_PICKER_ROLES.has(role.trim().toLowerCase()))
|
|
180
|
+
return undefined;
|
|
181
|
+
const words = text.replace(/[_-]+/g, ' ');
|
|
182
|
+
return OUTWARD_WORDS.find(([, pattern]) => pattern.test(words))?.[0];
|
|
183
|
+
}
|
|
184
|
+
/** A word that turns the action after it into one the journey forbids: "does not send". */
|
|
185
|
+
const NEGATION = /\b(?:not|no|never|without|nor|avoid|avoids|don't|doesn't|won't|didn't)\b/i;
|
|
186
|
+
/** How many words before an action a negation still governs it. */
|
|
187
|
+
const NEGATION_REACH = 4;
|
|
188
|
+
/**
|
|
189
|
+
* The outward actions a journey asks for in so many words. "Invite a teammate" asks for invite;
|
|
190
|
+
* "she does not send an invite" and "without sending" ask for nothing. Pure.
|
|
191
|
+
*/
|
|
192
|
+
export function outwardActionsAsked(journey) {
|
|
193
|
+
const asked = [];
|
|
194
|
+
for (const [action, pattern] of OUTWARD_WORDS) {
|
|
195
|
+
const global = new RegExp(pattern.source, 'gi');
|
|
196
|
+
for (const match of journey.matchAll(global)) {
|
|
197
|
+
const before = journey.slice(0, match.index).split(/\s+/).slice(-NEGATION_REACH).join(' ');
|
|
198
|
+
if (!NEGATION.test(before)) {
|
|
199
|
+
asked.push(action);
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return asked;
|
|
205
|
+
}
|
|
206
|
+
/** What the Harness says, and the journey records, when it would not press one. */
|
|
207
|
+
export const outwardRefusal = (action) => `would need to ${action} — not done (outward action): the journey does not ask for it`;
|
|
@@ -71,6 +71,7 @@ const OWNER = {
|
|
|
71
71
|
[VerifiedReason.NOTHING_DECLARED]: VerdictAttribution.HARNESS,
|
|
72
72
|
[VerifiedReason.VACUOUS_GRADE]: VerdictAttribution.HARNESS,
|
|
73
73
|
[VerifiedReason.ALREADY_TRUE]: VerdictAttribution.HARNESS,
|
|
74
|
+
[VerifiedReason.HIDDEN_MATCH]: VerdictAttribution.HARNESS,
|
|
74
75
|
// The evidence was not there to read.
|
|
75
76
|
[VerifiedReason.CAPABILITY_ABSENT]: VerdictAttribution.COULD_NOT_SEE,
|
|
76
77
|
[VerifiedReason.OBSERVATION_LOST]: VerdictAttribution.COULD_NOT_SEE,
|