@amalgm/live 0.2.81-main.44714289132 → 0.2.81-main.44851115227

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.
Files changed (69) hide show
  1. package/PURPOSE.md +10 -9
  2. package/dist/apply/contracts.d.ts +1 -1
  3. package/dist/apply/showing.d.ts +1 -2
  4. package/dist/apply/showing.d.ts.map +1 -1
  5. package/dist/apply/showing.js +1 -2
  6. package/dist/apply/showing.js.map +1 -1
  7. package/dist/detection/ignore-lines.d.ts +22 -0
  8. package/dist/detection/ignore-lines.d.ts.map +1 -0
  9. package/dist/detection/ignore-lines.js +212 -0
  10. package/dist/detection/ignore-lines.js.map +1 -0
  11. package/dist/detection/index.d.ts +6 -2
  12. package/dist/detection/index.d.ts.map +1 -1
  13. package/dist/detection/index.js +6 -2
  14. package/dist/detection/index.js.map +1 -1
  15. package/dist/detection/refusal.d.ts +1 -1
  16. package/dist/detection/refusal.js +1 -1
  17. package/dist/detection/skip-defaults.d.ts +18 -0
  18. package/dist/detection/skip-defaults.d.ts.map +1 -0
  19. package/dist/detection/skip-defaults.js +116 -0
  20. package/dist/detection/skip-defaults.js.map +1 -0
  21. package/dist/detection/skip-policy.d.ts +74 -0
  22. package/dist/detection/skip-policy.d.ts.map +1 -0
  23. package/dist/detection/skip-policy.js +203 -0
  24. package/dist/detection/skip-policy.js.map +1 -0
  25. package/dist/detection/watch-boundary.js +1 -1
  26. package/dist/detection/watch-boundary.js.map +1 -1
  27. package/dist/drive/contracts.d.ts +2 -3
  28. package/dist/drive/contracts.d.ts.map +1 -1
  29. package/dist/drive/contracts.js.map +1 -1
  30. package/dist/files/computer-address.d.ts +2 -1
  31. package/dist/files/computer-address.d.ts.map +1 -1
  32. package/dist/files/computer-address.js +5 -2
  33. package/dist/files/computer-address.js.map +1 -1
  34. package/dist/records/publication.d.ts +1 -1
  35. package/dist/records/publication.d.ts.map +1 -1
  36. package/dist/records/publication.js +2 -2
  37. package/dist/records/publication.js.map +1 -1
  38. package/dist/registration/home-layout.js +3 -3
  39. package/dist/registration/home-layout.js.map +1 -1
  40. package/dist/registration/user-ground.d.ts +2 -2
  41. package/dist/registration/user-ground.js +3 -3
  42. package/dist-cjs/apply/showing.js +1 -2
  43. package/dist-cjs/apply/showing.js.map +1 -1
  44. package/dist-cjs/detection/ignore-lines.js +216 -0
  45. package/dist-cjs/detection/ignore-lines.js.map +1 -0
  46. package/dist-cjs/detection/index.js +6 -2
  47. package/dist-cjs/detection/index.js.map +1 -1
  48. package/dist-cjs/detection/refusal.js +1 -1
  49. package/dist-cjs/detection/skip-defaults.js +119 -0
  50. package/dist-cjs/detection/skip-defaults.js.map +1 -0
  51. package/dist-cjs/detection/skip-policy.js +208 -0
  52. package/dist-cjs/detection/skip-policy.js.map +1 -0
  53. package/dist-cjs/detection/watch-boundary.js +2 -2
  54. package/dist-cjs/detection/watch-boundary.js.map +1 -1
  55. package/dist-cjs/drive/contracts.js.map +1 -1
  56. package/dist-cjs/files/computer-address.js +4 -1
  57. package/dist-cjs/files/computer-address.js.map +1 -1
  58. package/dist-cjs/records/publication.js +2 -2
  59. package/dist-cjs/records/publication.js.map +1 -1
  60. package/dist-cjs/registration/home-layout.js +3 -3
  61. package/dist-cjs/registration/home-layout.js.map +1 -1
  62. package/dist-cjs/registration/user-ground.js +3 -3
  63. package/package.json +4 -4
  64. package/dist/detection/enrollment.d.ts +0 -71
  65. package/dist/detection/enrollment.d.ts.map +0 -1
  66. package/dist/detection/enrollment.js +0 -392
  67. package/dist/detection/enrollment.js.map +0 -1
  68. package/dist-cjs/detection/enrollment.js +0 -397
  69. package/dist-cjs/detection/enrollment.js.map +0 -1
package/PURPOSE.md CHANGED
@@ -167,12 +167,13 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
167
167
  folders: `.amalgm/` and `.private/` at any depth. Database-like filenames
168
168
  have no implicit exclusion; Live's own databases and coordination files
169
169
  live in the `.amalgm/live/` folder Shell hands it.
170
- The one `.amalgmignore` at the top of the home selects later publication
171
- for every root, never physical observation, registration or cold
172
- transfer. It reads exactly as Git reads a root `.gitignore`, as if it
173
- stood at each root's top; an absent file reads as Live's starter lines,
174
- each visible and deletable. A `.amalgmignore` anywhere else is an
175
- ordinary file.
170
+ The skip rules (`docs/skip-rules.md`) select later publication for
171
+ every root, never physical observation, registration or cold transfer:
172
+ Live's shipped defaults, the holding Git project's `.gitignore` files,
173
+ then Live's shipped includes, the last line naming a path deciding it as
174
+ in Git. A file Git tracks always travels and a skipped folder is not
175
+ reached into. The rules live in the runtime alone; a `.amalgmignore`
176
+ anywhere is an ordinary file.
176
177
  Ignoring an already registered file preserves its UUID and last recorded
177
178
  result; it does not remove the file from the registered snapshot.
178
179
  Ignore never gates incoming Apply; accepted changes still belong to
@@ -184,11 +185,11 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
184
185
  identities, observer evidence, and watcher bindings locally.
185
186
  14. **Login convergence has one authority.** A first machine conditionally
186
187
  publishes the declared home; every later machine places that exact cloud
187
- graph's map, the home root and `.amalgmignore` as real bytes and every
188
+ graph's map, the home root and the runtime's own entries as real bytes and every
188
189
  other entity listed until first touch, and a simultaneous first-login
189
190
  loser places the winning graph's map. Login downloads nothing else.
190
191
  15. **Cloud precedes Watch.** Login becomes ready only after the user's
191
- identity is proven, the home root and its `.amalgmignore` stand as exactly
192
+ identity is proven, the home root and the runtime's own entries stand as exactly
192
193
  their records at the ground's place on the line, and watcher coverage is
193
194
  established over the resulting user ground. A computer keeps every byte it
194
195
  already holds. Durable records newer than that baseline survive restart
@@ -219,7 +220,7 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
219
220
  the core graph points to the selected workspace UUID, including when that
220
221
  workspace later becomes nested beneath a newly registered parent.
221
222
  20. **One install primitive, selective and never replacing.** Login places
222
- the core root and its `.amalgmignore` and lists the rest of the home;
223
+ the core root and the runtime's own entries and lists the rest of the home;
223
224
  `files add <workspace>` installs one owned, UUID-selected
224
225
  materialization boundary and refreshes the exact portable reference
225
226
  inventory in always-materialized core ground. Both pin the folded graph in
@@ -399,7 +399,7 @@ export type ApplyGuard =
399
399
  * producer's progress may have changed it. */
400
400
  | ApplyDependencyOutcome | ApplyRejudge
401
401
  /** Ground this machine observes but sharing does not hold, such as ground
402
- * its enrollment policy excludes, occupies the derived destination. Every
402
+ * its skip rules keep here, occupies the derived destination. Every
403
403
  * shared sibling derives its own address, so no other recorded occupant is
404
404
  * possible, and capture can never turn this one into this entity's local
405
405
  * work. The line parks and reports the occupant: it re-runs only when its
@@ -50,8 +50,7 @@
50
50
  * So in a home a result at or beneath one of the runtime's own entries
51
51
  * enters, a projects or computers folder that arrives enters without what it
52
52
  * holds, and anything else is listed. Any other root, such as a workspace a
53
- * home's reference leads to, places nothing whatever its unit: the one
54
- * sharing policy Detect reads stands in the home. `placedInRoot` asks this of
53
+ * home's reference leads to, places nothing whatever its unit. `placedInRoot` asks this of
55
54
  * each member of an Enter too.
56
55
  *
57
56
  * A construct is its own root and its own authority, and has no ground.
@@ -1 +1 @@
1
- {"version":3,"file":"showing.d.ts","sourceRoot":"","sources":["../../src/apply/showing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAA+B,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG9D,oDAAoD;AACpD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEpD,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/D,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,SAAS,CAAmD,CAAC;AAEnG;6CAC6C;AAC7C,MAAM,WAAW,UAAU;IACzB,Q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AAC3E,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED;;4BAE4B;AAC5B,wBAAgB,WAAW,CACzB,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,EACpD,UAAU,EAAE,UAAU,GACrB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAE7B;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAC5B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,EACpD,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAO1C"}
@@ -50,8 +50,7 @@
50
50
  * So in a home a result at or beneath one of the runtime's own entries
51
51
  * enters, a projects or computers folder that arrives enters without what it
52
52
  * holds, and anything else is listed. Any other root, such as a workspace a
53
- * home's reference leads to, places nothing whatever its unit: the one
54
- * sharing policy Detect reads stands in the home. `placedInRoot` asks this of
53
+ * home's reference leads to, places nothing whatever its unit. `placedInRoot` asks this of
55
54
  * each member of an Enter too.
56
55
  *
57
56
  * A construct is its own root and its own authority, and has no ground.
@@ -1 +1 @@
1
- {"version":3,"file":"showing.js","sourceRoot":"","sources":["../../src/apply/showing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAGH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAmB,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAkB,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAQ9D,MAAM,CAAC,MAAM,WAAW,GAA2B,IAAI,GAAG,CAAY,CAA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,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,KAAK,IAAI,EAAE,GAAkB,MAAM,CAAC,UAAU,EAAE,EAAE,KAAK,IAAI,GAAI,CAAC;QAC9D,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1B,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChB,MAAM,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3E,IAAI,KAAK,CAAC,IAAI;YAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACvC,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC;IACxB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Ignore lines, read exactly as Git reads one `.gitignore` (gitignore(5)),
3
+ * byte for byte and case-sensitively. A compiled list answers one question:
4
+ * the last line naming this path, if any, says skip or keep. Which lists
5
+ * stack, and in which order, is skip-policy.ts's law.
6
+ */
7
+ export type LineVerdict = 'skip' | 'keep' | null;
8
+ /** One ignore file's lines, compiled. Paths are relative to the file's own
9
+ * folder, already in byteString form. */
10
+ export interface IgnoreLines {
11
+ /** What the last line naming this path says. */
12
+ verdict(path: string, directory: boolean): LineVerdict;
13
+ /** A regex source matching every path a skipping line could name at the
14
+ * path or at a folder above it, so a path it misses needs no line read. */
15
+ readonly screen: string;
16
+ }
17
+ /** Text as one character per UTF-8 byte, the units Git matches. */
18
+ export declare function byteString(text: string): string;
19
+ /** Compile one ignore file's text. A leading byte-order mark, comments, blank
20
+ * lines and carriage returns read as Git reads them. */
21
+ export declare function compileIgnoreLines(text: string): IgnoreLines;
22
+ //# sourceMappingURL=ignore-lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-lines.d.ts","sourceRoot":"","sources":["../../src/detection/ignore-lines.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAEjD;yCACyC;AACzC,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,WAAW,CAAC;IACvD;+EAC2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAeD,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAS/C;AAyID;wDACwD;AACxD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CA0B5D"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * Ignore lines, read exactly as Git reads one `.gitignore` (gitignore(5)),
3
+ * byte for byte and case-sensitively. A compiled list answers one question:
4
+ * the last line naming this path, if any, says skip or keep. Which lists
5
+ * stack, and in which order, is skip-policy.ts's law.
6
+ */
7
+ const encoder = new TextEncoder();
8
+ /** Text as one character per UTF-8 byte, the units Git matches. */
9
+ export function byteString(text) {
10
+ for (let index = 0; index < text.length; index += 1) {
11
+ if (text.charCodeAt(index) > 0x7f) {
12
+ let bytes = '';
13
+ for (const byte of encoder.encode(text))
14
+ bytes += String.fromCharCode(byte);
15
+ return bytes;
16
+ }
17
+ }
18
+ return text;
19
+ }
20
+ const hex = (code) => `\\x${code.toString(16).padStart(2, '0')}`;
21
+ const literal = (character) => /[0-9A-Za-z]/.test(character) ? character : hex(character.charCodeAt(0));
22
+ /** Git's ASCII-only character classes, as regex class members. */
23
+ const CLASSES = new Map([
24
+ ['alnum', '\\x30-\\x39\\x41-\\x5a\\x61-\\x7a'], ['alpha', '\\x41-\\x5a\\x61-\\x7a'], ['blank', '\\x09\\x20'],
25
+ ['cntrl', '\\x00-\\x1f\\x7f'], ['digit', '\\x30-\\x39'], ['graph', '\\x21-\\x7e'], ['lower', '\\x61-\\x7a'],
26
+ ['print', '\\x20-\\x7e'], ['punct', '\\x21-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7e'],
27
+ ['space', '\\x09\\x0a\\x0d\\x20'], ['upper', '\\x41-\\x5a'], ['xdigit', '\\x30-\\x39\\x41-\\x46\\x61-\\x66'],
28
+ ]);
29
+ /** The bracket expression opening at pattern[open], read as Git's wildmatch
30
+ * reads it: its regex and the index after its `]`, or null when the rule can
31
+ * never match, being unterminated or naming an unknown class. A bracket never
32
+ * matches `/`. */
33
+ function bracket(pattern, open) {
34
+ let index = open + 1;
35
+ const negated = pattern[index] === '!' || pattern[index] === '^';
36
+ if (negated)
37
+ index += 1;
38
+ let members = '';
39
+ // The member a following `-` may extend into a range: none at the start
40
+ // or after a range or class. The first member is read even when it is `]`.
41
+ let previous = null;
42
+ do {
43
+ const character = pattern[index];
44
+ if (character === undefined)
45
+ return null;
46
+ if (character === '\\') {
47
+ const escaped = pattern[index += 1];
48
+ if (escaped === undefined)
49
+ return null;
50
+ previous = escaped.charCodeAt(0);
51
+ members += hex(previous);
52
+ }
53
+ else if (character === '-' && previous !== null && index + 1 < pattern.length && pattern[index + 1] !== ']') {
54
+ let high = pattern[index += 1];
55
+ if (high === '\\')
56
+ high = pattern[index += 1];
57
+ if (high === undefined)
58
+ return null;
59
+ if (previous <= high.charCodeAt(0))
60
+ members += `${hex(previous)}-${hex(high.charCodeAt(0))}`;
61
+ previous = null;
62
+ }
63
+ else if (character === '[' && pattern[index + 1] === ':') {
64
+ const name = index + 2, close = pattern.indexOf(']', name);
65
+ if (close === -1)
66
+ return null;
67
+ if (close === name || pattern[close - 1] !== ':') {
68
+ // No `:]` closes it: the `[` is a member and the `:` is read next.
69
+ previous = 0x5b;
70
+ members += hex(previous);
71
+ }
72
+ else {
73
+ const named = CLASSES.get(pattern.slice(name, close - 1));
74
+ if (named === undefined)
75
+ return null;
76
+ members += named;
77
+ previous = null;
78
+ index = close;
79
+ }
80
+ }
81
+ else {
82
+ previous = character.charCodeAt(0);
83
+ members += hex(previous);
84
+ }
85
+ index += 1;
86
+ } while (pattern[index] !== ']');
87
+ return { source: `(?!/)[${negated ? '^' : ''}${members}]`, next: index + 1 };
88
+ }
89
+ /** What `*` matches within one segment. */
90
+ const ANY_RUN = '[^/]*';
91
+ /** The regex of a wildmatch pattern, or null when it can never match. Its
92
+ * start counts as a segment boundary for `**`, as it does where Git hands
93
+ * wildmatch the pattern past a literal prefix it compared first. */
94
+ function wildSource(pattern) {
95
+ let source = '';
96
+ for (let index = 0; index < pattern.length;) {
97
+ const character = pattern[index];
98
+ if (character === '*') {
99
+ let end = index;
100
+ while (pattern[end] === '*')
101
+ end += 1;
102
+ const bounded = end - index > 1 && (index === 0 || pattern[index - 1] === '/')
103
+ && (end === pattern.length || pattern[end] === '/' || (pattern[end] === '\\' && pattern[end + 1] === '/'));
104
+ if (bounded && pattern[end] === '/') {
105
+ source += '(?:.*/)?';
106
+ index = end + 1;
107
+ }
108
+ else {
109
+ source += bounded ? '.*' : ANY_RUN;
110
+ index = end;
111
+ }
112
+ }
113
+ else if (character === '?') {
114
+ source += '[^/]';
115
+ index += 1;
116
+ }
117
+ else if (character === '[') {
118
+ const set = bracket(pattern, index);
119
+ if (set === null)
120
+ return null;
121
+ source += set.source;
122
+ index = set.next;
123
+ }
124
+ else if (character === '\\') {
125
+ if (index + 1 === pattern.length)
126
+ return null;
127
+ source += literal(pattern[index + 1]);
128
+ index += 2;
129
+ }
130
+ else {
131
+ source += literal(character);
132
+ index += 1;
133
+ }
134
+ }
135
+ return source;
136
+ }
137
+ /** Git's `trim_trailing_spaces`: a trailing run of spaces goes unless a `\`
138
+ * escapes its first one. */
139
+ function trimTrailingSpaces(line) {
140
+ let space = -1;
141
+ for (let index = 0; index < line.length; index += 1) {
142
+ if (line[index] === ' ') {
143
+ if (space === -1)
144
+ space = index;
145
+ }
146
+ else {
147
+ if (line[index] === '\\' && (index += 1) === line.length)
148
+ return line;
149
+ space = -1;
150
+ }
151
+ }
152
+ return space === -1 ? line : line.slice(0, space);
153
+ }
154
+ /** One line of the file as a rule, or null when it names none that can
155
+ * match. */
156
+ function ignoreRule(line) {
157
+ let value = trimTrailingSpaces(line.split('\0')[0]);
158
+ const negated = value.startsWith('!');
159
+ if (negated)
160
+ value = value.slice(1);
161
+ const directoryOnly = value.endsWith('/');
162
+ if (directoryOnly)
163
+ value = value.slice(0, -1);
164
+ if (!value)
165
+ return null;
166
+ const rule = { negated, directoryOnly };
167
+ if (!value.includes('/')) {
168
+ const source = wildSource(value);
169
+ return source === null ? null : { ...rule, basename: true, source, expression: new RegExp(`^${source}$`, 's') };
170
+ }
171
+ // Git compares a path rule's literal opening as text, then matches the
172
+ // rest as a pattern of its own.
173
+ if (value.startsWith('/'))
174
+ value = value.slice(1);
175
+ const opening = value.search(/[*?[\\]|$/), rest = wildSource(value.slice(opening));
176
+ if (rest === null)
177
+ return null;
178
+ const source = [...value.slice(0, opening)].map(literal).join('') + rest;
179
+ return { ...rule, basename: false, source, expression: new RegExp(`^${source}$`, 's') };
180
+ }
181
+ /** Compile one ignore file's text. A leading byte-order mark, comments, blank
182
+ * lines and carriage returns read as Git reads them. */
183
+ export function compileIgnoreLines(text) {
184
+ const bytes = byteString(text);
185
+ const rules = (bytes.startsWith('\xef\xbb\xbf') ? bytes.slice(3) : bytes).split('\n')
186
+ .map(line => line && !line.startsWith('#') ? ignoreRule(line.replace(/\r$/, '')) : null)
187
+ .filter((rule) => rule !== null);
188
+ const skipping = rules.filter(rule => !rule.negated);
189
+ // A basename rule opening with `*` could match only where its remainder
190
+ // ends a segment, so the screen looks for that ending, once, rather than
191
+ // trying the whole rule from every segment's start.
192
+ const screen = [
193
+ ...skipping.filter(rule => !rule.basename).map(rule => `^(?:${rule.source})(?=/|$)`),
194
+ ...skipping.filter(rule => rule.basename).map(rule => rule.source.startsWith(ANY_RUN)
195
+ ? `(?:${rule.source.slice(ANY_RUN.length)})(?=/|$)` : `(?:^|/)(?:${rule.source})(?=/|$)`),
196
+ ].join('|');
197
+ return {
198
+ screen,
199
+ verdict(path, directory) {
200
+ const name = path.slice(path.lastIndexOf('/') + 1);
201
+ for (let index = rules.length - 1; index >= 0; index -= 1) {
202
+ const rule = rules[index];
203
+ if (rule.directoryOnly && !directory)
204
+ continue;
205
+ if (rule.expression.test(rule.basename ? name : path))
206
+ return rule.negated ? 'keep' : 'skip';
207
+ }
208
+ return null;
209
+ },
210
+ };
211
+ }
212
+ //# sourceMappingURL=ignore-lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-lines.js","sourceRoot":"","sources":["../../src/detection/ignore-lines.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyBH,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAElC,mEAAmE;AACnE,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACpD,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC;YAClC,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;gBAAE,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC5E,OAAO,KAAK,CAAC;QACf,C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C,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;YACnF,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,UAAU,CAAC;KAC5F,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACZ,OAAO;QACL,MAAM;QACN,OAAO,CAAC,IAAI,EAAE,SAAS;YACrB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YACnD,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;gBAC1D,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAE,CAAC;gBAC3B,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,SAAS;oBAAE,SAAS;gBAC/C,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;oBAAE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;YAC/F,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -13,7 +13,9 @@
13
13
  * and descriptor conviction
14
14
  * - `classify` text/binary from detect's own read evidence
15
15
  * - `refusal` declined-vs-broken, named where it is raised
16
- * - `enrollment` the one home sharing policy
16
+ * - `skip-policy` the skip rules: three lists, tracked files, nested projects
17
+ * - `ignore-lines` one ignore file's lines, read as Git reads them
18
+ * - `skip-defaults` the shipped defaults and includes
17
19
  * - `identity` ground identity from resolved parents and child slots
18
20
  * - `scoped-identity` the same identity for named leaves from their closure
19
21
  * - `watch-boundary` generation-safe Watch input and coverage output
@@ -35,7 +37,9 @@ export * from './dispositions.js';
35
37
  export * from './identity.js';
36
38
  export * from './scoped-identity.js';
37
39
  export * from './echo.js';
38
- export * from './enrollment.js';
40
+ export * from './ignore-lines.js';
41
+ export * from './skip-defaults.js';
42
+ export * from './skip-policy.js';
39
43
  export * from './record-order.js';
40
44
  export * from './record-proposal.js';
41
45
  export * from './package-proposal.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/detection/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/detection/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
@@ -13,7 +13,9 @@
13
13
  * and descriptor conviction
14
14
  * - `classify` text/binary from detect's own read evidence
15
15
  * - `refusal` declined-vs-broken, named where it is raised
16
- * - `enrollment` the one home sharing policy
16
+ * - `skip-policy` the skip rules: three lists, tracked files, nested projects
17
+ * - `ignore-lines` one ignore file's lines, read as Git reads them
18
+ * - `skip-defaults` the shipped defaults and includes
17
19
  * - `identity` ground identity from resolved parents and child slots
18
20
  * - `scoped-identity` the same identity for named leaves from their closure
19
21
  * - `watch-boundary` generation-safe Watch input and coverage output
@@ -35,7 +37,9 @@ export * from './dispositions.js';
35
37
  export * from './identity.js';
36
38
  export * from './scoped-identity.js';
37
39
  export * from './echo.js';
38
- export * from './enrollment.js';
40
+ export * from './ignore-lines.js';
41
+ export * from './skip-defaults.js';
42
+ export * from './skip-policy.js';
39
43
  export * from './record-order.js';
40
44
  export * from './record-proposal.js';
41
45
  export * from './package-proposal.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/detection/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/detection/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
@@ -7,7 +7,7 @@
7
7
  * mean opposite things:
8
8
  *
9
9
  * a refusal the request named ground amalgm will not take — excluded
10
- * by enrollment policy, already owned by another tree, not
10
+ * by the skip rules, already owned by another tree, not
11
11
  * there at all. Nothing is broken. The message IS the
12
12
  * reason and is meant to be shown to whoever asked.
13
13
  * a fault the boundary could not do its job — a torn identity
@@ -7,7 +7,7 @@
7
7
  * mean opposite things:
8
8
  *
9
9
  * a refusal the request named ground amalgm will not take — excluded
10
- * by enrollment policy, already owned by another tree, not
10
+ * by the skip rules, already owned by another tree, not
11
11
  * there at all. Nothing is broken. The message IS the
12
12
  * reason and is meant to be shown to whoever asked.
13
13
  * a fault the boundary could not do its job — a torn identity
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The lines Amalgm ships: layer 1, what every computer makes again for
3
+ * itself, and layer 3, what travels even when a project's `.gitignore` names
4
+ * it. docs/skip-rules.md gives each line its reason; skip-policy.ts stacks
5
+ * them. A name is a default only when a program on each computer makes it
6
+ * again (an install, a build, a cache, an editor, the operating system) and
7
+ * people rarely keep hand-made work, or files a Git project commits, under
8
+ * it. So `build/`, `dist/`, `out/`, `bin/`, `vendor/` and `env/` are not
9
+ * listed: projects commit them or people write in them. Every line is a name
10
+ * at any depth, so it means the same in every root.
11
+ */
12
+ /** Layer 1: what every computer makes again for itself. */
13
+ export declare const SKIP_DEFAULTS = "# Installed packages: an install puts them back from the project's lock file.\nnode_modules/\nbower_components/\njspm_packages/\n.pnpm-store/\n__pypackages__/\nelm-stuff/\n.dart_tool/\n.terraform/\n\n# Virtual environments: made again from the project's requirements.\n.venv/\nvenv/\n.tox/\n.nox/\n.direnv/\n\n# Build output: made again by building the source that travels.\ntarget/\n.next/\n.nuxt/\n.output/\n.svelte-kit/\n.astro/\n.docusaurus/\n.build/\nDerivedData/\n_build/\ndist-newstyle/\n.stack-work/\nzig-cache/\n.zig-cache/\nzig-out/\ncmake-build-*/\nCMakeFiles/\n*.egg-info/\n.eggs/\n__pycache__/\n*.py[cod]\n*.tsbuildinfo\n\n# Caches: a tool fills them again the first time it runs.\n.cache/\n.parcel-cache/\n.turbo/\n.angular/\n.expo/\n.gradle/\n.kotlin/\n.sass-cache/\n.swc/\n.eslintcache\n.stylelintcache\n\n# Test, coverage and type-checker caches.\n.pytest_cache/\n.mypy_cache/\n.ruff_cache/\n.pyre/\n.pytype/\n.hypothesis/\n.nyc_output/\nhtmlcov/\n.coverage\n.coverage.*\n\n# Editor state: one computer's windows, autosaves, swap and lock files.\n.vs/\nxcuserdata/\n**/.idea/workspace.xml\n*.sublime-workspace\n.ipynb_checkpoints/\n.*.sw[a-p]\n*~\n.#*\n\\#*#\n~$*\n.~lock.*#\n\n# Operating system litter on Mac, Windows and Linux.\n.DS_Store\n._*\n.AppleDouble/\n.Spotlight-V100/\n.Trashes/\n.fseventsd/\n.TemporaryItems/\n.DocumentRevisions-V100/\nThumbs.db\nehthumbs.db\ndesktop.ini\n$RECYCLE.BIN/\n.directory\n.Trash-*/\n.nfs*\n.fuse_hidden*\n";
14
+ /** Layer 3: a project's settings file of secrets travels with the person's
15
+ * own copy of the project, though Git keeps it out of commits; a `.env`
16
+ * folder is a virtual environment, made again like any other. */
17
+ export declare const SHIPPED_INCLUDES = "!.env*\n.env/\n";
18
+ //# sourceMappingURL=skip-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-defaults.d.ts","sourceRoot":"","sources":["../../src/detection/skip-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2DAA2D;AAC3D,eAAO,MAAM,aAAa,47CAgGzB,CAAC;AAEF;;iEAEiE;AACjE,eAAO,MAAM,gBAAgB,oBAE5B,CAAC"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * The lines Amalgm ships: layer 1, what every computer makes again for
3
+ * itself, and layer 3, what travels even when a project's `.gitignore` names
4
+ * it. docs/skip-rules.md gives each line its reason; skip-policy.ts stacks
5
+ * them. A name is a default only when a program on each computer makes it
6
+ * again (an install, a build, a cache, an editor, the operating system) and
7
+ * people rarely keep hand-made work, or files a Git project commits, under
8
+ * it. So `build/`, `dist/`, `out/`, `bin/`, `vendor/` and `env/` are not
9
+ * listed: projects commit them or people write in them. Every line is a name
10
+ * at any depth, so it means the same in every root.
11
+ */
12
+ /** Layer 1: what every computer makes again for itself. */
13
+ export const SKIP_DEFAULTS = `# Installed packages: an install puts them back from the project's lock file.
14
+ node_modules/
15
+ bower_components/
16
+ jspm_packages/
17
+ .pnpm-store/
18
+ __pypackages__/
19
+ elm-stuff/
20
+ .dart_tool/
21
+ .terraform/
22
+
23
+ # Virtual environments: made again from the project's requirements.
24
+ .venv/
25
+ venv/
26
+ .tox/
27
+ .nox/
28
+ .direnv/
29
+
30
+ # Build output: made again by building the source that travels.
31
+ target/
32
+ .next/
33
+ .nuxt/
34
+ .output/
35
+ .svelte-kit/
36
+ .astro/
37
+ .docusaurus/
38
+ .build/
39
+ DerivedData/
40
+ _build/
41
+ dist-newstyle/
42
+ .stack-work/
43
+ zig-cache/
44
+ .zig-cache/
45
+ zig-out/
46
+ cmake-build-*/
47
+ CMakeFiles/
48
+ *.egg-info/
49
+ .eggs/
50
+ __pycache__/
51
+ *.py[cod]
52
+ *.tsbuildinfo
53
+
54
+ # Caches: a tool fills them again the first time it runs.
55
+ .cache/
56
+ .parcel-cache/
57
+ .turbo/
58
+ .angular/
59
+ .expo/
60
+ .gradle/
61
+ .kotlin/
62
+ .sass-cache/
63
+ .swc/
64
+ .eslintcache
65
+ .stylelintcache
66
+
67
+ # Test, coverage and type-checker caches.
68
+ .pytest_cache/
69
+ .mypy_cache/
70
+ .ruff_cache/
71
+ .pyre/
72
+ .pytype/
73
+ .hypothesis/
74
+ .nyc_output/
75
+ htmlcov/
76
+ .coverage
77
+ .coverage.*
78
+
79
+ # Editor state: one computer's windows, autosaves, swap and lock files.
80
+ .vs/
81
+ xcuserdata/
82
+ **/.idea/workspace.xml
83
+ *.sublime-workspace
84
+ .ipynb_checkpoints/
85
+ .*.sw[a-p]
86
+ *~
87
+ .#*
88
+ \\#*#
89
+ ~$*
90
+ .~lock.*#
91
+
92
+ # Operating system litter on Mac, Windows and Linux.
93
+ .DS_Store
94
+ ._*
95
+ .AppleDouble/
96
+ .Spotlight-V100/
97
+ .Trashes/
98
+ .fseventsd/
99
+ .TemporaryItems/
100
+ .DocumentRevisions-V100/
101
+ Thumbs.db
102
+ ehthumbs.db
103
+ desktop.ini
104
+ $RECYCLE.BIN/
105
+ .directory
106
+ .Trash-*/
107
+ .nfs*
108
+ .fuse_hidden*
109
+ `;
110
+ /** Layer 3: a project's settings file of secrets travels with the person's
111
+ * own copy of the project, though Git keeps it out of commits; a `.env`
112
+ * folder is a virtual environment, made again like any other. */
113
+ export const SHIPPED_INCLUDES = `!.env*
114
+ .env/
115
+ `;
116
+ //# sourceMappingURL=skip-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-defaults.js","sourceRoot":"","sources":["../../src/detection/skip-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgG5B,CAAC;AAEF;;iEAEiE;AACjE,MAAM,CAAC,MAAM,gBAAgB,GAAG;;CAE/B,CAAC"}