@prestack/thread 0.0.2 → 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.
Files changed (183) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/dist/core/{asking.d.ts → answers.d.ts} +6 -14
  3. package/dist/core/{asking.js → answers.js} +13 -332
  4. package/dist/core/{asking.ts → answers.ts} +14 -357
  5. package/dist/core/attach.js +2 -2
  6. package/dist/core/attach.ts +2 -3
  7. package/dist/core/chain.js +4 -11
  8. package/dist/core/chain.ts +4 -3
  9. package/dist/core/client.d.ts +57 -0
  10. package/dist/core/client.js +186 -0
  11. package/dist/core/client.ts +227 -0
  12. package/dist/core/descend.d.ts +2 -0
  13. package/dist/core/descend.js +109 -16
  14. package/dist/core/descend.ts +120 -16
  15. package/dist/core/files.d.ts +45 -0
  16. package/dist/core/files.js +95 -0
  17. package/dist/core/files.ts +137 -0
  18. package/dist/core/init.d.ts +1 -0
  19. package/dist/core/init.js +10 -2
  20. package/dist/core/init.ts +8 -2
  21. package/dist/core/invoked.js +1 -1
  22. package/dist/core/invoked.ts +1 -1
  23. package/dist/core/rows.d.ts +2 -0
  24. package/dist/core/rows.js +65 -0
  25. package/dist/core/rows.ts +58 -0
  26. package/dist/core/tree.js +1 -1
  27. package/dist/core/tree.ts +1 -1
  28. package/dist/derivation/attach.js +0 -12
  29. package/dist/derivation/attach.ts +0 -12
  30. package/dist/derivation/generators/build.js +8 -7
  31. package/dist/derivation/generators/build.ts +8 -7
  32. package/dist/derivation/generators/release.d.ts +1 -1
  33. package/dist/derivation/generators/release.js +15 -23
  34. package/dist/derivation/generators/release.ts +15 -15
  35. package/dist/integrations/attach.js +1 -19
  36. package/dist/integrations/attach.ts +1 -19
  37. package/dist/integrations/generators/read.js +2 -2
  38. package/dist/integrations/generators/read.ts +4 -4
  39. package/dist/integrations/generators/vault.js +4 -12
  40. package/dist/integrations/generators/vault.ts +4 -4
  41. package/dist/integrations/module.js +5 -3
  42. package/dist/integrations/module.ts +5 -3
  43. package/dist/integrations/vault.js +5 -5
  44. package/dist/integrations/vault.ts +5 -5
  45. package/dist/integrity/attach.js +0 -12
  46. package/dist/integrity/attach.ts +0 -12
  47. package/dist/integrity/check-threads.js +1 -1
  48. package/dist/integrity/check-threads.ts +1 -1
  49. package/dist/integrity/constraint.d.ts +11 -2
  50. package/dist/integrity/constraint.js +163 -20
  51. package/dist/integrity/constraint.ts +174 -22
  52. package/dist/integrity/generators/compiler.js +1 -1
  53. package/dist/integrity/generators/compiler.ts +1 -1
  54. package/dist/integrity/generators/gate.js +8 -16
  55. package/dist/integrity/generators/gate.ts +8 -7
  56. package/dist/integrity/generators/publish.js +14 -26
  57. package/dist/integrity/generators/publish.ts +14 -17
  58. package/dist/integrity/generators/trial.d.ts +2 -2
  59. package/dist/integrity/generators/trial.js +108 -50
  60. package/dist/integrity/generators/trial.ts +107 -48
  61. package/dist/integrity/lint.js +3 -3
  62. package/dist/integrity/lint.ts +3 -3
  63. package/dist/integrity/lsp/diagnostics.js +1 -1
  64. package/dist/integrity/lsp/diagnostics.ts +1 -1
  65. package/dist/integrity/lsp/lint.js +1 -1
  66. package/dist/integrity/lsp/lint.ts +1 -1
  67. package/dist/integrity/slopnator.d.ts +1 -14
  68. package/dist/integrity/slopnator.js +8 -40
  69. package/dist/integrity/slopnator.ts +9 -51
  70. package/dist/integrity/slopnators/sl_broken_lineage.js +4 -2
  71. package/dist/integrity/slopnators/sl_broken_lineage.ts +4 -2
  72. package/dist/integrity/slopnators/sl_declared_elsewhere.js +24 -3
  73. package/dist/integrity/slopnators/sl_declared_elsewhere.ts +24 -3
  74. package/dist/integrity/slopnators/sl_derived_drift.js +10 -4
  75. package/dist/integrity/slopnators/sl_derived_drift.ts +10 -4
  76. package/dist/integrity/slopnators/sl_inert_island.js +7 -13
  77. package/dist/integrity/slopnators/sl_inert_island.ts +7 -16
  78. package/dist/integrity/slopnators/sl_inert_slopnator.js +8 -8
  79. package/dist/integrity/slopnators/sl_inert_slopnator.ts +8 -8
  80. package/dist/integrity/slopnators/sl_missing_row.js +14 -9
  81. package/dist/integrity/slopnators/sl_missing_row.ts +14 -10
  82. package/dist/integrity/slopnators/sl_no_child_process.js +8 -8
  83. package/dist/integrity/slopnators/sl_no_child_process.ts +8 -8
  84. package/dist/integrity/slopnators/sl_no_import_cycle.js +1 -1
  85. package/dist/integrity/slopnators/sl_no_import_cycle.ts +1 -1
  86. package/dist/integrity/slopnators/sl_no_such_command.js +20 -5
  87. package/dist/integrity/slopnators/sl_no_such_command.ts +22 -5
  88. package/dist/integrity/slopnators/sl_only_takes_a_literal.js +8 -8
  89. package/dist/integrity/slopnators/sl_only_takes_a_literal.ts +8 -8
  90. package/dist/integrity/slopnators/sl_stale_path.js +91 -18
  91. package/dist/integrity/slopnators/sl_stale_path.ts +97 -18
  92. package/dist/integrity/slopnators/sl_twice_meant.js +25 -2
  93. package/dist/integrity/slopnators/sl_twice_meant.ts +28 -2
  94. package/dist/integrity/slopnators/sl_twice_parented.js +26 -5
  95. package/dist/integrity/slopnators/sl_twice_parented.ts +26 -5
  96. package/dist/integrity/slopnators/sl_undeclared_node.js +18 -2
  97. package/dist/integrity/slopnators/sl_undeclared_node.ts +18 -2
  98. package/dist/integrity/slopnators/sl_undeclared_operation.js +3 -1
  99. package/dist/integrity/slopnators/sl_undeclared_operation.ts +3 -1
  100. package/dist/integrity/slopnators/sl_undeclared_variant.js +6 -2
  101. package/dist/integrity/slopnators/sl_undeclared_variant.ts +6 -2
  102. package/dist/integrity/slopnators/sl_ungoverned_island.js +3 -4
  103. package/dist/integrity/slopnators/sl_ungoverned_island.ts +3 -4
  104. package/dist/integrity/slopnators/sl_unkept_rows.js +1 -1
  105. package/dist/integrity/slopnators/sl_unkept_rows.ts +1 -1
  106. package/dist/integrity/slopnators/sl_unpaired_member.js +13 -8
  107. package/dist/integrity/slopnators/sl_unpaired_member.ts +16 -8
  108. package/dist/integrity/slopnators/sl_unpaired_slopnator.js +16 -3
  109. package/dist/integrity/slopnators/sl_unpaired_slopnator.ts +16 -3
  110. package/dist/integrity/slopnators/sl_unthreaded.d.ts +1 -0
  111. package/dist/integrity/slopnators/sl_unthreaded.js +18 -10
  112. package/dist/integrity/slopnators/sl_unthreaded.ts +19 -11
  113. package/dist/integrity/slopnators/sl_untranslated_key.js +1 -1
  114. package/dist/integrity/slopnators/sl_untranslated_key.ts +1 -1
  115. package/dist/integrity/slopnators/sl_unversioned.js +16 -2
  116. package/dist/integrity/slopnators/sl_unversioned.ts +16 -2
  117. package/dist/integrity/sweep.js +17 -3
  118. package/dist/integrity/sweep.ts +20 -3
  119. package/dist/knowledge/attach.js +0 -6
  120. package/dist/knowledge/attach.ts +0 -6
  121. package/dist/knowledge/generators/docsgen.js +12 -3
  122. package/dist/knowledge/generators/docsgen.ts +12 -2
  123. package/dist/knowledge/generators/glossary.js +1 -1
  124. package/dist/knowledge/generators/glossary.ts +1 -1
  125. package/dist/operations/attach.js +2 -26
  126. package/dist/operations/attach.ts +2 -27
  127. package/dist/operations/dispatch.js +2 -3
  128. package/dist/operations/dispatch.ts +2 -3
  129. package/dist/operations/generators/capability.js +4 -7
  130. package/dist/operations/generators/capability.ts +3 -6
  131. package/dist/operations/generators/compile.js +8 -13
  132. package/dist/operations/generators/compile.ts +8 -4
  133. package/dist/operations/generators/permits.js +4 -13
  134. package/dist/operations/generators/permits.ts +3 -3
  135. package/dist/operations/generators/seed.js +5 -2
  136. package/dist/operations/generators/seed.ts +6 -2
  137. package/dist/operations/generators/trial.js +10 -10
  138. package/dist/operations/generators/trial.ts +10 -10
  139. package/dist/operations/http.js +4 -1
  140. package/dist/operations/http.ts +6 -1
  141. package/package.json +2 -2
  142. package/dist/core/cli.d.ts +0 -2
  143. package/dist/core/cli.js +0 -1761
  144. package/dist/core/cli.ts +0 -2004
  145. package/dist/core/generators/meta.d.ts +0 -2
  146. package/dist/core/generators/meta.js +0 -829
  147. package/dist/core/generators/meta.ts +0 -1006
  148. package/dist/derivation/generators/derivation.d.ts +0 -3
  149. package/dist/derivation/generators/derivation.js +0 -273
  150. package/dist/derivation/generators/derivation.ts +0 -347
  151. package/dist/derivation/makers/release.d.ts +0 -1
  152. package/dist/derivation/makers/release.js +0 -107
  153. package/dist/derivation/makers/release.ts +0 -135
  154. package/dist/integrations/generators/secret.d.ts +0 -1
  155. package/dist/integrations/generators/secret.js +0 -233
  156. package/dist/integrations/generators/secret.ts +0 -289
  157. package/dist/integrations/generators/target.d.ts +0 -1
  158. package/dist/integrations/generators/target.js +0 -775
  159. package/dist/integrations/generators/target.ts +0 -944
  160. package/dist/integrity/generators/rule.d.ts +0 -2
  161. package/dist/integrity/generators/rule.js +0 -213
  162. package/dist/integrity/generators/rule.ts +0 -271
  163. package/dist/integrity/generators/seal.d.ts +0 -4
  164. package/dist/integrity/generators/seal.js +0 -101
  165. package/dist/integrity/generators/seal.ts +0 -117
  166. package/dist/integrity/sealed.d.ts +0 -1
  167. package/dist/integrity/sealed.js +0 -56
  168. package/dist/integrity/sealed.ts +0 -56
  169. package/dist/knowledge/generators/skills.d.ts +0 -1
  170. package/dist/knowledge/generators/skills.js +0 -222
  171. package/dist/knowledge/generators/skills.ts +0 -263
  172. package/dist/operations/generators/grant.d.ts +0 -1
  173. package/dist/operations/generators/grant.js +0 -267
  174. package/dist/operations/generators/grant.ts +0 -336
  175. package/dist/operations/generators/operation.d.ts +0 -1
  176. package/dist/operations/generators/operation.js +0 -811
  177. package/dist/operations/generators/operation.ts +0 -972
  178. package/dist/operations/makers/capability.d.ts +0 -1
  179. package/dist/operations/makers/capability.js +0 -117
  180. package/dist/operations/makers/capability.ts +0 -166
  181. package/dist/operations/makers/trial.d.ts +0 -1
  182. package/dist/operations/makers/trial.js +0 -413
  183. package/dist/operations/makers/trial.ts +0 -520
@@ -1 +0,0 @@
1
- export {};
@@ -1,117 +0,0 @@
1
- import { spawnSync } from 'node:child_process';
2
- import { existsSync, readFileSync, writeFileSync } from 'node:fs';
3
- import { resolve } from 'node:path';
4
- import { argv, exit, stdout } from 'node:process';
5
- import { RECEIPT, answer, asking, given, issue, only, refuse, spend, wordsIn } from "../../core/asking.js";
6
- import { findTree } from "../../core/tree.js";
7
- import { CAPABILITIES_AT, SURFACES, isSurface } from "../capabilities.js";
8
- const TREE = findTree();
9
- const at = resolve(TREE.at, CAPABILITIES_AT);
10
- if (!existsSync(at)) {
11
- refuse(`${CAPABILITIES_AT} is not there, so this app has nothing reachable to switch. Declare an operation with ` +
12
- '`thread create operation` — it writes this table on its way out — or run `thread capabilities`.');
13
- }
14
- let table;
15
- try {
16
- table = JSON.parse(readFileSync(at, 'utf8'));
17
- }
18
- catch (thrown) {
19
- refuse(`${CAPABILITIES_AT} could not be read: ${thrown instanceof Error ? thrown.message : String(thrown)}. ` +
20
- 'Run `thread capabilities` — it is derived, so it can always be written again.');
21
- }
22
- if (table.length === 0) {
23
- refuse('this app declares no operation, so there is nothing to switch on or off yet.');
24
- }
25
- const mark = (one) => [
26
- ` ${one.operation} — ${one.describes}`,
27
- ` ${SURFACES.map((each) => `${one.live.includes(each) ? '[on] ' : '[off]'} ${each}`).join(' ')}`,
28
- ` ${one.browsable ? 'may be called from a page' : 'server only — it reaches a target that needs a server secret'}`,
29
- ];
30
- const listing = [`${String(table.length)} operation(s):`, ...table.flatMap(mark)].join('\n');
31
- const words = wordsIn(['edit']);
32
- const verb = words[0];
33
- stdout.write(`${listing}\n`);
34
- const ASKS = [
35
- {
36
- key: 'live',
37
- says: [
38
- 'which surfaces are on, comma-separated. Answering nothing switches every',
39
- 'one of them off, which leaves the operation declared, compiled and proven',
40
- 'and reachable by nobody — a real thing to want, and said out loud rather',
41
- 'than refused.',
42
- ],
43
- },
44
- ];
45
- const TAKES = ASKS.map((one) => one.key);
46
- const ASKED = ASKS.flatMap((one) => one.says.map((line, at) => ` ${at === 0 ? `${one.key}:`.padEnd(8) : ' '.repeat(8)}${line}`));
47
- const method = (nonce) => [
48
- '',
49
- 'what this changes:',
50
- '',
51
- ` thread create capability edit <operation> ${RECEIPT} ${nonce}`,
52
- '',
53
- ` ${RECEIPT} is spent by one run and refused if the table moved after it was issued.`,
54
- '',
55
- `a surface is a way this app is CALLED, and there are ${String(SURFACES.length)}: ${SURFACES.join(', ')}.`,
56
- '',
57
- ' cli a command a terminal runs',
58
- ' api a route a request arrives on, and the OpenAPI document written from it',
59
- ' mcp a tool an agent is offered. Switch this off and an AI actor cannot call the operation,',
60
- ' while everything else about it goes on working',
61
- '',
62
- '`edit` asks, one answer per line:',
63
- '',
64
- ...ASKED,
65
- '',
66
- 'It writes the flag and runs `thread capabilities`, which carries every flag across and rewrites',
67
- 'the tool list, the OpenAPI document and the client bundle from them.',
68
- ].join('\n');
69
- const flagged = argv.indexOf(RECEIPT);
70
- if (verb === undefined && flagged === -1) {
71
- const nonce = issue(TREE.at, listing);
72
- stdout.write(`${method(nonce)}\n`);
73
- stdout.write(`\ncapability: receipt ${nonce} — spent on use, and stale the moment ${CAPABILITIES_AT} changes.\n`);
74
- exit(0);
75
- }
76
- spend(TREE.at, listing, argv[flagged + 1], CAPABILITIES_AT);
77
- if (verb !== 'edit') {
78
- refuse(`there is nothing called "${verb ?? ''}" to do here — say edit. A capability is derived, so there is none to add`);
79
- }
80
- const which = words[1];
81
- if (which === undefined) {
82
- refuse('`edit` takes the name of an operation this app declares');
83
- }
84
- const one = table.find((each) => each.operation === which);
85
- if (one === undefined) {
86
- refuse(`\`${which}\` is not an operation this app declares. What is here is ${table.map((each) => each.operation).join(', ')}`);
87
- }
88
- const piped = given();
89
- only(piped, TAKES, 'editing a capability');
90
- const { ask, shut } = asking(piped);
91
- const said = (piped.length > 0
92
- ? (answer(piped, 'live') ?? '')
93
- : await ask('live', `which surfaces are on — ${SURFACES.join(', ')} (now: ${one.live.join(', ') || 'none'}): `)).trim();
94
- shut();
95
- const wanted = said
96
- .split(',')
97
- .map((each) => each.trim().toLowerCase())
98
- .filter((each) => each !== '');
99
- const wrong = wanted.filter((each) => !isSurface(each));
100
- if (wrong.length > 0) {
101
- refuse(`there is no surface called ${wrong.map((each) => `"${each}"`).join(', ')}. There are ${String(SURFACES.length)}: ` +
102
- `${SURFACES.join(', ')}. Nothing was written.`);
103
- }
104
- const live = SURFACES.filter((each) => wanted.includes(each));
105
- writeFileSync(at, `${JSON.stringify(table.map((each) => (each.operation === one.operation ? { ...each, live } : each)), null, 2)}\n`);
106
- const off = SURFACES.filter((each) => !live.includes(each));
107
- stdout.write(`capability: ${one.operation} is live on ${live.join(', ') || 'nothing'}` +
108
- `${off.length === 0 ? '' : `, and off for ${off.join(', ')}`}.\n`);
109
- for (const what of [['capabilities'], ['docs']]) {
110
- const made = spawnSync('npx', ['thread', ...what], { cwd: TREE.at, encoding: 'utf8' });
111
- stdout.write(`${`${made.stdout ?? ''}${made.stderr ?? ''}`.trim()}\n`);
112
- if (made.status !== 0) {
113
- stdout.write(`capability: the flag is written and stands; \`thread ${what.join(' ')}\` refused above.\n`);
114
- exit(1);
115
- }
116
- }
117
- exit(0);
@@ -1,166 +0,0 @@
1
- import { spawnSync } from 'node:child_process'
2
- import { existsSync, readFileSync, writeFileSync } from 'node:fs'
3
- import { resolve } from 'node:path'
4
- import { argv, exit, stdout } from 'node:process'
5
-
6
- import { RECEIPT, answer, asking, given, issue, only, refuse, spend, wordsIn } from '../../core/asking.ts'
7
- import { findTree } from '../../core/tree.ts'
8
-
9
- import { CAPABILITIES_AT, SURFACES, isSurface, type Capability, type Surface } from '../capabilities.ts'
10
-
11
- const TREE = findTree()
12
-
13
- const at = resolve(TREE.at, CAPABILITIES_AT)
14
-
15
- if (!existsSync(at)) {
16
- refuse(
17
- `${CAPABILITIES_AT} is not there, so this app has nothing reachable to switch. Declare an operation with ` +
18
- '`thread create operation` — it writes this table on its way out — or run `thread capabilities`.',
19
- )
20
- }
21
-
22
- let table: readonly Capability[]
23
- try {
24
- table = JSON.parse(readFileSync(at, 'utf8')) as readonly Capability[]
25
- } catch (thrown) {
26
- refuse(
27
- `${CAPABILITIES_AT} could not be read: ${thrown instanceof Error ? thrown.message : String(thrown)}. ` +
28
- 'Run `thread capabilities` — it is derived, so it can always be written again.',
29
- )
30
- }
31
-
32
- if (table.length === 0) {
33
- refuse('this app declares no operation, so there is nothing to switch on or off yet.')
34
- }
35
-
36
- const mark = (one: Capability): readonly string[] => [
37
- ` ${one.operation} — ${one.describes}`,
38
- ` ${SURFACES.map((each) => `${one.live.includes(each) ? '[on] ' : '[off]'} ${each}`).join(' ')}`,
39
- ` ${one.browsable ? 'may be called from a page' : 'server only — it reaches a target that needs a server secret'}`,
40
- ]
41
-
42
- const listing = [`${String(table.length)} operation(s):`, ...table.flatMap(mark)].join('\n')
43
-
44
- const words = wordsIn(['edit'])
45
-
46
- const verb = words[0]
47
-
48
- stdout.write(`${listing}\n`)
49
-
50
- const ASKS: readonly { readonly key: string; readonly says: readonly string[] }[] = [
51
- {
52
- key: 'live',
53
- says: [
54
- 'which surfaces are on, comma-separated. Answering nothing switches every',
55
- 'one of them off, which leaves the operation declared, compiled and proven',
56
- 'and reachable by nobody — a real thing to want, and said out loud rather',
57
- 'than refused.',
58
- ],
59
- },
60
- ]
61
-
62
- const TAKES: readonly string[] = ASKS.map((one) => one.key)
63
-
64
- const ASKED: readonly string[] = ASKS.flatMap((one) =>
65
- one.says.map((line, at) => ` ${at === 0 ? `${one.key}:`.padEnd(8) : ' '.repeat(8)}${line}`),
66
- )
67
-
68
- const method = (nonce: string): string =>
69
- [
70
- '',
71
- 'what this changes:',
72
- '',
73
- ` thread create capability edit <operation> ${RECEIPT} ${nonce}`,
74
- '',
75
- ` ${RECEIPT} is spent by one run and refused if the table moved after it was issued.`,
76
- '',
77
- `a surface is a way this app is CALLED, and there are ${String(SURFACES.length)}: ${SURFACES.join(', ')}.`,
78
- '',
79
- ' cli a command a terminal runs',
80
- ' api a route a request arrives on, and the OpenAPI document written from it',
81
- ' mcp a tool an agent is offered. Switch this off and an AI actor cannot call the operation,',
82
- ' while everything else about it goes on working',
83
- '',
84
- '`edit` asks, one answer per line:',
85
- '',
86
- ...ASKED,
87
- '',
88
- 'It writes the flag and runs `thread capabilities`, which carries every flag across and rewrites',
89
- 'the tool list, the OpenAPI document and the client bundle from them.',
90
- ].join('\n')
91
-
92
- const flagged = argv.indexOf(RECEIPT)
93
-
94
- if (verb === undefined && flagged === -1) {
95
- const nonce = issue(TREE.at, listing)
96
- stdout.write(`${method(nonce)}\n`)
97
- stdout.write(`\ncapability: receipt ${nonce} — spent on use, and stale the moment ${CAPABILITIES_AT} changes.\n`)
98
- exit(0)
99
- }
100
-
101
- spend(TREE.at, listing, argv[flagged + 1], CAPABILITIES_AT)
102
-
103
- if (verb !== 'edit') {
104
- refuse(`there is nothing called "${verb ?? ''}" to do here — say edit. A capability is derived, so there is none to add`)
105
- }
106
-
107
- const which = words[1]
108
- if (which === undefined) {
109
- refuse('`edit` takes the name of an operation this app declares')
110
- }
111
-
112
- const one = table.find((each) => each.operation === which)
113
- if (one === undefined) {
114
- refuse(`\`${which}\` is not an operation this app declares. What is here is ${table.map((each) => each.operation).join(', ')}`)
115
- }
116
-
117
- const piped = given()
118
- only(piped, TAKES, 'editing a capability')
119
- const { ask, shut } = asking(piped)
120
-
121
- const said = (
122
- piped.length > 0
123
- ? (answer(piped, 'live') ?? '')
124
- : await ask('live', `which surfaces are on — ${SURFACES.join(', ')} (now: ${one.live.join(', ') || 'none'}): `)
125
- ).trim()
126
- shut()
127
-
128
- const wanted = said
129
- .split(',')
130
- .map((each) => each.trim().toLowerCase())
131
- .filter((each) => each !== '')
132
-
133
- const wrong = wanted.filter((each) => !isSurface(each))
134
- if (wrong.length > 0) {
135
- refuse(
136
- `there is no surface called ${wrong.map((each) => `"${each}"`).join(', ')}. There are ${String(SURFACES.length)}: ` +
137
- `${SURFACES.join(', ')}. Nothing was written.`,
138
- )
139
- }
140
-
141
- const live = SURFACES.filter((each) => wanted.includes(each))
142
-
143
- writeFileSync(
144
- at,
145
- `${JSON.stringify(
146
- table.map((each) => (each.operation === one.operation ? { ...each, live } : each)),
147
- null,
148
- 2,
149
- )}\n`,
150
- )
151
-
152
- const off = SURFACES.filter((each) => !live.includes(each))
153
- stdout.write(
154
- `capability: ${one.operation} is live on ${live.join(', ') || 'nothing'}` +
155
- `${off.length === 0 ? '' : `, and off for ${off.join(', ')}`}.\n`,
156
- )
157
-
158
- for (const what of [['capabilities'], ['docs']]) {
159
- const made = spawnSync('npx', ['thread', ...what], { cwd: TREE.at, encoding: 'utf8' })
160
- stdout.write(`${`${made.stdout ?? ''}${made.stderr ?? ''}`.trim()}\n`)
161
- if (made.status !== 0) {
162
- stdout.write(`capability: the flag is written and stands; \`thread ${what.join(' ')}\` refused above.\n`)
163
- exit(1)
164
- }
165
- }
166
- exit(0)
@@ -1 +0,0 @@
1
- export {};