@handfly/protocol 0.0.0-stage → 0.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/LICENSE +21 -0
- package/dist/canonical.d.ts +4 -0
- package/dist/canonical.js +26 -0
- package/dist/canonical.js.map +1 -0
- package/dist/egress.d.ts +38 -0
- package/dist/egress.js +127 -0
- package/dist/egress.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas.d.ts +741 -0
- package/dist/schemas.js +127 -0
- package/dist/schemas.js.map +1 -0
- package/package.json +27 -3
- package/schema/protocol.schema.json +988 -0
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 VISTA CONSULTORES S.A. de C.V.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Canonical JSON: sorted keys, no whitespace. Used for hashes, fingerprints and the exact upload log. */
|
|
2
|
+
export declare function canonicalJson(value: unknown): string;
|
|
3
|
+
export declare function sha256Hex(data: string | Uint8Array): string;
|
|
4
|
+
export declare function sha1Hex(data: string): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
/** Canonical JSON: sorted keys, no whitespace. Used for hashes, fingerprints and the exact upload log. */
|
|
3
|
+
export function canonicalJson(value) {
|
|
4
|
+
return JSON.stringify(sortDeep(value));
|
|
5
|
+
}
|
|
6
|
+
function sortDeep(v) {
|
|
7
|
+
if (Array.isArray(v))
|
|
8
|
+
return v.map(sortDeep);
|
|
9
|
+
if (v && typeof v === "object") {
|
|
10
|
+
const out = {};
|
|
11
|
+
for (const k of Object.keys(v).sort()) {
|
|
12
|
+
const x = v[k];
|
|
13
|
+
if (x !== undefined)
|
|
14
|
+
out[k] = sortDeep(x);
|
|
15
|
+
}
|
|
16
|
+
return out;
|
|
17
|
+
}
|
|
18
|
+
return v;
|
|
19
|
+
}
|
|
20
|
+
export function sha256Hex(data) {
|
|
21
|
+
return createHash("sha256").update(data).digest("hex");
|
|
22
|
+
}
|
|
23
|
+
export function sha1Hex(data) {
|
|
24
|
+
return createHash("sha1").update(data).digest("hex");
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=canonical.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical.js","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,0GAA0G;AAC1G,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,QAAQ,CAAC,CAAU;IAC1B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7C,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAA4B,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YACjE,MAAM,CAAC,GAAI,CAA6B,CAAC,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,KAAK,SAAS;gBAAE,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAyB;IACjD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/egress.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Envelope, type EnvelopeKind } from "./schemas.js";
|
|
2
|
+
export declare class EgressError extends Error {
|
|
3
|
+
readonly details: Record<string, unknown>;
|
|
4
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
5
|
+
}
|
|
6
|
+
export interface EgressWarning {
|
|
7
|
+
code: "fragment_redacted" | "structure_secret_dropped" | "fragment_truncated";
|
|
8
|
+
detail: string;
|
|
9
|
+
}
|
|
10
|
+
export interface BuiltEnvelope {
|
|
11
|
+
envelope: Envelope;
|
|
12
|
+
/** The exact bytes that will be sent. Store these in outbox/sent.log for the user to verify. */
|
|
13
|
+
body: string;
|
|
14
|
+
warnings: EgressWarning[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The only way bytes leave the user's machine (invariant #2).
|
|
18
|
+
*
|
|
19
|
+
* 1. validates the payload against the protocol schema;
|
|
20
|
+
* 2. re-scans every string for secrets: fragments are redacted, structure entries that
|
|
21
|
+
* still contain a secret are refused outright;
|
|
22
|
+
* 3. enforces the 8 KB-per-fragment cap;
|
|
23
|
+
* 4. serializes canonically and hashes the exact body.
|
|
24
|
+
*/
|
|
25
|
+
export declare class EgressGuard {
|
|
26
|
+
static build(kind: EnvelopeKind, repoId: string, payload: unknown, now?: Date): BuiltEnvelope;
|
|
27
|
+
/**
|
|
28
|
+
* The outcome of running a learner's answer locally (`handfly verify`): printed values only, redacted for secrets and
|
|
29
|
+
* capped, with every other key dropped. These values come from executing repo code, so they leave through here.
|
|
30
|
+
*/
|
|
31
|
+
static localOutcome(outcome: Record<string, unknown>): {
|
|
32
|
+
result: Record<string, string | null>;
|
|
33
|
+
warnings: EgressWarning[];
|
|
34
|
+
};
|
|
35
|
+
private static cleanFragments;
|
|
36
|
+
}
|
|
37
|
+
/** Human-readable summary for the consent preview. */
|
|
38
|
+
export declare function describeEnvelope(b: BuiltEnvelope): string;
|
package/dist/egress.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { redact, scan } from "@handfly/secret-filter";
|
|
2
|
+
import { canonicalJson, sha256Hex } from "./canonical.js";
|
|
3
|
+
import { Envelope, MAX_FRAGMENT_BYTES, PAYLOAD_SCHEMAS, PROTOCOL_VERSION, } from "./schemas.js";
|
|
4
|
+
export class EgressError extends Error {
|
|
5
|
+
details;
|
|
6
|
+
constructor(message, details = {}) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.details = details;
|
|
9
|
+
this.name = "EgressError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const utf8 = new TextEncoder();
|
|
13
|
+
/**
|
|
14
|
+
* The only way bytes leave the user's machine (invariant #2).
|
|
15
|
+
*
|
|
16
|
+
* 1. validates the payload against the protocol schema;
|
|
17
|
+
* 2. re-scans every string for secrets: fragments are redacted, structure entries that
|
|
18
|
+
* still contain a secret are refused outright;
|
|
19
|
+
* 3. enforces the 8 KB-per-fragment cap;
|
|
20
|
+
* 4. serializes canonically and hashes the exact body.
|
|
21
|
+
*/
|
|
22
|
+
export class EgressGuard {
|
|
23
|
+
static build(kind, repoId, payload, now = new Date()) {
|
|
24
|
+
const warnings = [];
|
|
25
|
+
const schema = PAYLOAD_SCHEMAS[kind];
|
|
26
|
+
const parsed = schema.safeParse(payload);
|
|
27
|
+
if (!parsed.success) {
|
|
28
|
+
throw new EgressError(`payload does not match protocol for ${kind}`, { issues: parsed.error.issues.slice(0, 10) });
|
|
29
|
+
}
|
|
30
|
+
let clean = parsed.data;
|
|
31
|
+
if (kind === "fragments") {
|
|
32
|
+
clean = EgressGuard.cleanFragments(parsed.data, warnings);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const hits = structuralStrings(parsed.data).flatMap((v) => scan(v));
|
|
36
|
+
if (hits.length > 0) {
|
|
37
|
+
throw new EgressError("secret-like content found in a structural payload; refusing to send", {
|
|
38
|
+
rules: [...new Set(hits.map((h) => h.rule))],
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const payloadJson = canonicalJson(clean);
|
|
43
|
+
const envelope = {
|
|
44
|
+
protocol_version: PROTOCOL_VERSION,
|
|
45
|
+
repo_id: repoId,
|
|
46
|
+
kind,
|
|
47
|
+
created_at: now.toISOString(),
|
|
48
|
+
items_count: countItems(kind, clean),
|
|
49
|
+
bytes: utf8.encode(payloadJson).length,
|
|
50
|
+
sha256: sha256Hex(payloadJson),
|
|
51
|
+
payload: clean,
|
|
52
|
+
};
|
|
53
|
+
Envelope.parse(envelope);
|
|
54
|
+
return { envelope, body: canonicalJson(envelope), warnings };
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The outcome of running a learner's answer locally (`handfly verify`): printed values only, redacted for secrets and
|
|
58
|
+
* capped, with every other key dropped. These values come from executing repo code, so they leave through here.
|
|
59
|
+
*/
|
|
60
|
+
static localOutcome(outcome) {
|
|
61
|
+
const warnings = [];
|
|
62
|
+
const result = {};
|
|
63
|
+
for (const key of ["original", "mutant", "output", "error", "changed"]) {
|
|
64
|
+
const v = outcome[key];
|
|
65
|
+
if (v === undefined)
|
|
66
|
+
continue;
|
|
67
|
+
if (v === null) {
|
|
68
|
+
result[key] = null;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const r = redact(String(v).slice(0, 500));
|
|
72
|
+
if (r.findings.length)
|
|
73
|
+
warnings.push({ code: "fragment_redacted", detail: `local outcome ${key}` });
|
|
74
|
+
result[key] = r.text;
|
|
75
|
+
}
|
|
76
|
+
return { result, warnings };
|
|
77
|
+
}
|
|
78
|
+
static cleanFragments(batch, warnings) {
|
|
79
|
+
const fragments = batch.fragments.map((f) => {
|
|
80
|
+
const r = redact(f.text);
|
|
81
|
+
const redactions = [...f.redactions];
|
|
82
|
+
if (r.findings.length > 0) {
|
|
83
|
+
warnings.push({ code: "fragment_redacted", detail: `${f.path}:${f.start_line} (${r.findings.length})` });
|
|
84
|
+
for (const fi of r.findings) {
|
|
85
|
+
const line = f.start_line + (f.text.slice(0, fi.start).match(/\n/g)?.length ?? 0);
|
|
86
|
+
redactions.push({ rule: fi.rule, line });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// Run evidence (a failing-test trace) is repo-derived text too: same redaction, same byte budget.
|
|
90
|
+
const ev = f.evidence !== undefined ? redact(f.evidence) : null;
|
|
91
|
+
if (ev && ev.findings.length > 0)
|
|
92
|
+
warnings.push({ code: "fragment_redacted", detail: `${f.path} evidence (${ev.findings.length})` });
|
|
93
|
+
const bytes = utf8.encode(r.text).length + (ev ? utf8.encode(ev.text).length : 0);
|
|
94
|
+
if (bytes > MAX_FRAGMENT_BYTES) {
|
|
95
|
+
throw new EgressError(`fragment ${f.path}:${f.start_line} is ${bytes} bytes; the cap is ${MAX_FRAGMENT_BYTES}`);
|
|
96
|
+
}
|
|
97
|
+
return { ...f, text: r.text, redactions, ...(ev ? { evidence: ev.text } : {}) };
|
|
98
|
+
});
|
|
99
|
+
return { fragments };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Keys whose values are our own ids and hashes (40/64 hex), not repo content. */
|
|
103
|
+
const ID_KEYS = new Set(["id", "from", "to", "node_id", "snapshot", "base_snapshot", "sha256", "fingerprint", "component_node_id"]);
|
|
104
|
+
/** Every repo-derived string in a structural payload, scanned one by one (names cannot contain quotes). */
|
|
105
|
+
function structuralStrings(value, key = "") {
|
|
106
|
+
if (typeof value === "string")
|
|
107
|
+
return ID_KEYS.has(key) || /^[0-9a-f]{40}$|^[0-9a-f]{64}$/.test(value) ? [] : [value];
|
|
108
|
+
if (Array.isArray(value))
|
|
109
|
+
return value.flatMap((v) => structuralStrings(v, key));
|
|
110
|
+
if (value && typeof value === "object")
|
|
111
|
+
return Object.entries(value).flatMap(([k, v]) => structuralStrings(v, k));
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
function countItems(kind, payload) {
|
|
115
|
+
const p = payload;
|
|
116
|
+
if (kind === "fragments")
|
|
117
|
+
return p.fragments?.length ?? 0;
|
|
118
|
+
if (kind === "item_specs")
|
|
119
|
+
return p.specs?.length ?? 0;
|
|
120
|
+
return (p.upsert_nodes?.length ?? 0) + (p.upsert_edges?.length ?? 0);
|
|
121
|
+
}
|
|
122
|
+
/** Human-readable summary for the consent preview. */
|
|
123
|
+
export function describeEnvelope(b) {
|
|
124
|
+
const e = b.envelope;
|
|
125
|
+
return `${e.kind}: ${e.items_count} entries, ${e.bytes} bytes, sha256 ${e.sha256.slice(0, 12)}…`;
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=egress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"egress.js","sourceRoot":"","sources":["../src/egress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACL,QAAQ,EAIR,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,MAAM,OAAO,WAAY,SAAQ,KAAK;IACE;IAAtC,YAAY,OAAe,EAAW,UAAmC,EAAE;QACzE,KAAK,CAAC,OAAO,CAAC,CAAC;QADqB,YAAO,GAAP,OAAO,CAA8B;QAEzE,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAcD,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;AAE/B;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAW;IACtB,MAAM,CAAC,KAAK,CAAC,IAAkB,EAAE,MAAc,EAAE,OAAgB,EAAE,MAAY,IAAI,IAAI,EAAE;QACvF,MAAM,QAAQ,GAAoB,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,WAAW,CAAC,uCAAuC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;QACrH,CAAC;QACD,IAAI,KAAK,GAAY,MAAM,CAAC,IAAI,CA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