@prestack/thread 0.1.3 → 0.1.5
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/CHANGELOG.md +563 -0
- package/dist/core/actor.d.ts +1 -1
- package/dist/core/actor.js +5 -4
- package/dist/core/actor.ts +5 -4
- package/dist/core/attach.d.ts +0 -7
- package/dist/core/attach.js +38 -67
- package/dist/core/attach.ts +34 -80
- package/dist/core/chain.js +13 -17
- package/dist/core/chain.ts +11 -15
- package/dist/core/condition.d.ts +4 -4
- package/dist/core/condition.js +2 -2
- package/dist/core/descend.d.ts +4 -2
- package/dist/core/descend.js +91 -23
- package/dist/core/descend.ts +90 -21
- package/dist/core/errors/catalogue.d.ts +52 -0
- package/dist/{operations/errors/errors.js → core/errors/catalogue.js} +1 -1
- package/dist/{operations/errors/errors.ts → core/errors/catalogue.ts} +1 -1
- package/dist/{operations/errors/catalog.d.ts → core/errors/error.d.ts} +2 -3
- package/dist/{operations/errors/catalog.js → core/errors/error.js} +1 -16
- package/dist/{operations/errors/catalog.ts → core/errors/error.ts} +3 -19
- package/dist/core/errors/namespaces.d.ts +3 -0
- package/dist/core/errors/namespaces.js +15 -0
- package/dist/core/errors/namespaces.ts +19 -0
- package/dist/core/finding.js +2 -2
- package/dist/core/finding.ts +1 -2
- package/dist/core/init.d.ts +1 -1
- package/dist/core/init.js +51 -5
- package/dist/core/init.ts +58 -5
- package/dist/core/invoked.d.ts +1 -1
- package/dist/core/invoked.js +3 -1
- package/dist/core/invoked.ts +5 -2
- package/dist/core/round.js +36 -22
- package/dist/core/round.ts +26 -9
- package/dist/core/rows.d.ts +4 -0
- package/dist/core/rows.js +31 -2
- package/dist/core/rows.ts +33 -1
- package/dist/core/scope.d.ts +1 -0
- package/dist/core/scope.js +1 -0
- package/dist/core/scope.ts +2 -0
- package/dist/core/thread.d.ts +3 -3
- package/dist/core/tree.d.ts +4 -1
- package/dist/core/tree.js +26 -6
- package/dist/core/tree.ts +29 -6
- package/dist/core/types.d.ts +3 -3
- package/dist/core/types.js +3 -1
- package/dist/core/types.ts +2 -1
- package/dist/derivation/attach.js +3 -2
- package/dist/derivation/attach.ts +2 -1
- package/dist/derivation/generators/build.js +6 -6
- package/dist/derivation/generators/build.ts +1 -1
- package/dist/derivation/generators/check.js +1 -1
- package/dist/derivation/generators/determinism.js +1 -1
- package/dist/derivation/generators/release.js +60 -47
- package/dist/derivation/generators/release.ts +66 -43
- package/dist/derivation/release.d.ts +7 -3
- package/dist/derivation/release.js +14 -1
- package/dist/derivation/release.ts +22 -2
- package/dist/integrations/attach.d.ts +4 -0
- package/dist/integrations/attach.js +37 -56
- package/dist/integrations/attach.ts +54 -60
- package/dist/integrations/cli.d.ts +37 -0
- package/dist/integrations/cli.js +440 -0
- package/dist/integrations/cli.ts +543 -0
- package/dist/{core/files.d.ts → integrations/disk.d.ts} +16 -24
- package/dist/integrations/disk.js +435 -0
- package/dist/integrations/disk.ts +465 -0
- package/dist/integrations/generators/read.js +6 -6
- package/dist/integrations/generators/read.ts +4 -4
- package/dist/integrations/generators/vault.js +10 -11
- package/dist/integrations/generators/vault.ts +4 -5
- package/dist/{operations/http.d.ts → integrations/https.d.ts} +10 -6
- package/dist/integrations/https.js +170 -0
- package/dist/integrations/https.ts +216 -0
- package/dist/integrations/pglite.d.ts +26 -0
- package/dist/integrations/pglite.js +143 -0
- package/dist/integrations/pglite.ts +206 -0
- package/dist/integrations/secret.d.ts +8 -2
- package/dist/integrations/secret.js +3 -5
- package/dist/integrations/secret.ts +10 -6
- package/dist/integrations/target.d.ts +155 -14
- package/dist/integrations/target.js +171 -50
- package/dist/integrations/target.ts +377 -61
- package/dist/integrations/vault.d.ts +1 -0
- package/dist/integrations/vault.js +20 -5
- package/dist/integrations/vault.ts +17 -5
- package/dist/integrity/attach.js +8 -77
- package/dist/integrity/attach.ts +7 -76
- package/dist/integrity/check-threads.js +5 -5
- package/dist/integrity/check-threads.ts +2 -2
- package/dist/integrity/constraint.d.ts +0 -1
- package/dist/integrity/constraint.js +267 -366
- package/dist/integrity/constraint.ts +267 -375
- package/dist/integrity/generators/compiler.js +14 -17
- package/dist/integrity/generators/compiler.ts +10 -15
- package/dist/integrity/generators/gate.js +15 -15
- package/dist/integrity/generators/gate.ts +10 -10
- package/dist/integrity/generators/issues.js +7 -7
- package/dist/integrity/generators/publish.js +39 -57
- package/dist/integrity/generators/publish.ts +44 -55
- package/dist/integrity/generators/trial.d.ts +3 -3
- package/dist/integrity/generators/trial.js +133 -165
- package/dist/integrity/generators/trial.ts +145 -169
- package/dist/integrity/lint.js +9 -13
- package/dist/integrity/lint.ts +7 -10
- package/dist/integrity/lsp/bin.js +5 -4
- package/dist/integrity/lsp/bin.ts +3 -1
- package/dist/integrity/lsp/diagnostics.js +3 -3
- package/dist/integrity/lsp/diagnostics.ts +1 -1
- package/dist/integrity/lsp/lint.js +19 -30
- package/dist/integrity/lsp/lint.ts +16 -32
- package/dist/integrity/lsp/server.js +3 -3
- package/dist/integrity/slopnator.d.ts +3 -13
- package/dist/integrity/slopnator.js +59 -38
- package/dist/integrity/slopnator.ts +54 -38
- package/dist/integrity/slopnators/sl_broken_lineage.js +2 -2
- package/dist/integrity/slopnators/sl_declared_elsewhere.js +1 -1
- package/dist/integrity/slopnators/sl_derived_drift.js +4 -4
- package/dist/integrity/slopnators/sl_derived_drift.ts +1 -1
- package/dist/integrity/slopnators/sl_door_in_a_node.js +220 -0
- package/dist/integrity/slopnators/sl_door_in_a_node.ts +250 -0
- package/dist/integrity/slopnators/sl_inert_island.js +10 -8
- package/dist/integrity/slopnators/sl_inert_island.ts +8 -6
- package/dist/integrity/slopnators/sl_missing_row.js +6 -51
- package/dist/integrity/slopnators/sl_missing_row.ts +4 -50
- package/dist/integrity/slopnators/sl_no_barrel.js +1 -1
- package/dist/integrity/slopnators/sl_no_child_process.js +36 -18
- package/dist/integrity/slopnators/sl_no_child_process.ts +44 -18
- package/dist/integrity/slopnators/sl_no_dispatch_bypass.js +80 -149
- package/dist/integrity/slopnators/sl_no_dispatch_bypass.ts +95 -147
- package/dist/integrity/slopnators/sl_no_import_cycle.js +15 -4
- package/dist/integrity/slopnators/sl_no_import_cycle.ts +20 -4
- package/dist/integrity/slopnators/sl_no_such_command.js +2 -2
- package/dist/integrity/slopnators/sl_no_such_command.ts +1 -1
- package/dist/integrity/slopnators/sl_outside_an_operation.js +20 -0
- package/dist/integrity/slopnators/sl_outside_an_operation.ts +25 -0
- package/dist/integrity/slopnators/sl_screen_holds_only_declared.d.ts +2 -0
- package/dist/integrity/slopnators/sl_screen_holds_only_declared.js +61 -0
- package/dist/integrity/slopnators/sl_screen_holds_only_declared.ts +70 -0
- package/dist/integrity/slopnators/sl_secret_literal.js +1 -33
- package/dist/integrity/slopnators/sl_secret_literal.ts +1 -33
- package/dist/integrity/slopnators/sl_stale_path.js +5 -22
- package/dist/integrity/slopnators/sl_stale_path.ts +4 -20
- package/dist/integrity/slopnators/sl_twice_meant.js +1 -1
- package/dist/integrity/slopnators/sl_twice_parented.js +29 -5
- package/dist/integrity/slopnators/sl_twice_parented.ts +28 -4
- package/dist/integrity/slopnators/sl_undeclared_crossing.d.ts +4 -1
- package/dist/integrity/slopnators/sl_undeclared_crossing.js +426 -62
- package/dist/integrity/slopnators/sl_undeclared_crossing.ts +454 -70
- package/dist/integrity/slopnators/sl_undeclared_destination.js +59 -25
- package/dist/integrity/slopnators/sl_undeclared_destination.ts +69 -21
- package/dist/integrity/slopnators/sl_undeclared_list.d.ts +2 -0
- package/dist/integrity/slopnators/sl_undeclared_list.js +363 -0
- package/dist/integrity/slopnators/sl_undeclared_list.ts +358 -0
- package/dist/integrity/slopnators/sl_undeclared_node.js +1 -11
- package/dist/integrity/slopnators/sl_undeclared_node.ts +0 -10
- package/dist/integrity/slopnators/sl_undeclared_operation.js +111 -29
- package/dist/integrity/slopnators/sl_undeclared_operation.ts +134 -26
- package/dist/integrity/slopnators/sl_undeclared_variant.js +2 -2
- package/dist/integrity/slopnators/sl_undeclared_webhook.d.ts +2 -0
- package/dist/integrity/slopnators/sl_undeclared_webhook.js +90 -0
- package/dist/integrity/slopnators/sl_undeclared_webhook.ts +108 -0
- package/dist/integrity/slopnators/sl_underived_route.d.ts +2 -0
- package/dist/integrity/slopnators/sl_underived_route.js +61 -0
- package/dist/integrity/slopnators/sl_underived_route.ts +72 -0
- package/dist/integrity/slopnators/sl_ungoverned_island.js +3 -3
- package/dist/integrity/slopnators/sl_ungoverned_island.ts +1 -1
- package/dist/integrity/slopnators/sl_unlisted_program.d.ts +2 -0
- package/dist/integrity/slopnators/sl_unlisted_program.js +39 -0
- package/dist/integrity/slopnators/sl_unlisted_program.ts +40 -0
- package/dist/integrity/slopnators/sl_unnamed_island.js +1 -1
- package/dist/integrity/slopnators/sl_unpaired_member.js +3 -3
- package/dist/integrity/slopnators/sl_unpaired_member.ts +1 -1
- package/dist/integrity/slopnators/sl_unpaired_slopnator.js +4 -4
- package/dist/integrity/slopnators/sl_unpaired_slopnator.ts +1 -1
- package/dist/integrity/slopnators/sl_unprefixed_member.js +5 -31
- package/dist/integrity/slopnators/sl_unprefixed_member.ts +2 -28
- package/dist/integrity/slopnators/sl_unthreaded.js +11 -7
- package/dist/integrity/slopnators/sl_unthreaded.ts +6 -7
- package/dist/integrity/slopnators/sl_untranslated_key.js +2 -25
- package/dist/integrity/slopnators/sl_untranslated_key.ts +1 -25
- package/dist/integrity/slopnators/sl_unvaulted_secret.d.ts +2 -0
- package/dist/integrity/slopnators/sl_unvaulted_secret.js +107 -0
- package/dist/integrity/slopnators/sl_unvaulted_secret.ts +132 -0
- package/dist/integrity/slopnators/sl_unversioned.js +6 -4
- package/dist/integrity/slopnators/sl_unversioned.ts +5 -3
- package/dist/integrity/sweep.d.ts +1 -0
- package/dist/integrity/sweep.js +105 -42
- package/dist/integrity/sweep.ts +115 -42
- package/dist/knowledge/attach.js +4 -3
- package/dist/knowledge/attach.ts +3 -2
- package/dist/knowledge/generators/docsgen.js +8 -6
- package/dist/knowledge/generators/docsgen.ts +4 -2
- package/dist/knowledge/generators/glossary.js +4 -4
- package/dist/knowledge/generators/glossary.ts +1 -1
- package/dist/operations/access.d.ts +23 -0
- package/dist/operations/access.js +28 -1
- package/dist/operations/access.ts +43 -0
- package/dist/operations/attach.js +33 -113
- package/dist/operations/attach.ts +51 -117
- package/dist/operations/capabilities.d.ts +14 -5
- package/dist/operations/capabilities.js +13 -4
- package/dist/operations/capabilities.ts +27 -8
- package/dist/operations/dispatch.d.ts +8 -2
- package/dist/operations/dispatch.js +128 -185
- package/dist/operations/dispatch.ts +138 -191
- package/dist/operations/error-results.d.ts +1 -1
- package/dist/operations/error-results.js +2 -2
- package/dist/operations/error-results.ts +2 -2
- package/dist/operations/generators/capability.d.ts +11 -1
- package/dist/operations/generators/capability.js +481 -224
- package/dist/operations/generators/capability.ts +562 -233
- package/dist/operations/generators/compile.js +66 -39
- package/dist/operations/generators/compile.ts +78 -39
- package/dist/operations/generators/permits.js +11 -12
- package/dist/operations/generators/permits.ts +3 -4
- package/dist/operations/generators/seed.d.ts +1 -0
- package/dist/operations/generators/seed.js +19 -17
- package/dist/operations/generators/seed.ts +22 -14
- package/dist/operations/generators/trial.d.ts +6 -8
- package/dist/operations/generators/trial.js +200 -70
- package/dist/operations/generators/trial.ts +230 -93
- package/dist/operations/nodes.d.ts +15 -16
- package/dist/operations/nodes.ts +16 -17
- package/dist/operations/operations.d.ts +40 -4
- package/dist/operations/operations.js +1 -0
- package/dist/operations/operations.ts +61 -4
- package/dist/operations/result.d.ts +2 -2
- package/dist/operations/result.ts +2 -2
- package/package.json +1 -4
- package/dist/core/answers.d.ts +0 -171
- package/dist/core/answers.js +0 -789
- package/dist/core/answers.ts +0 -999
- package/dist/core/client.d.ts +0 -63
- package/dist/core/client.js +0 -249
- package/dist/core/client.ts +0 -289
- package/dist/core/files.js +0 -171
- package/dist/core/files.ts +0 -222
- package/dist/integrations/module.d.ts +0 -6
- package/dist/integrations/module.js +0 -153
- package/dist/integrations/module.ts +0 -191
- package/dist/integrity/slopnators/sl_unkept_rows.js +0 -104
- package/dist/integrity/slopnators/sl_unkept_rows.ts +0 -111
- package/dist/integrity/slopnators/sl_unseamed_reach.js +0 -73
- package/dist/integrity/slopnators/sl_unseamed_reach.ts +0 -79
- package/dist/operations/cost.d.ts +0 -14
- package/dist/operations/cost.js +0 -37
- package/dist/operations/cost.ts +0 -58
- package/dist/operations/errors/errors.d.ts +0 -52
- package/dist/operations/http.js +0 -124
- package/dist/operations/http.ts +0 -169
- package/dist/operations/memory.d.ts +0 -104
- package/dist/operations/memory.js +0 -365
- package/dist/operations/memory.ts +0 -470
- package/dist/operations/metering.d.ts +0 -55
- package/dist/operations/metering.js +0 -247
- package/dist/operations/metering.ts +0 -328
- package/dist/operations/queue-policy.d.ts +0 -3
- package/dist/operations/queue-policy.js +0 -8
- package/dist/operations/queue-policy.ts +0 -10
- package/dist/operations/seams.d.ts +0 -239
- package/dist/operations/seams.js +0 -45
- package/dist/operations/seams.ts +0 -364
- package/dist/operations/store.d.ts +0 -14
- package/dist/operations/store.js +0 -1
- package/dist/operations/store.ts +0 -29
- /package/dist/{operations → core}/errors/classes.d.ts +0 -0
- /package/dist/{operations → core}/errors/classes.js +0 -0
- /package/dist/{operations → core}/errors/classes.ts +0 -0
- /package/dist/integrity/slopnators/{sl_unkept_rows.d.ts → sl_door_in_a_node.d.ts} +0 -0
- /package/dist/integrity/slopnators/{sl_unseamed_reach.d.ts → sl_outside_an_operation.d.ts} +0 -0
|
@@ -1,38 +1,71 @@
|
|
|
1
1
|
import type { Attaching } from '../core/attach.ts'
|
|
2
|
-
import {
|
|
2
|
+
import { SHAPED } from '../core/init.ts'
|
|
3
|
+
import { NAMED, named } from '../core/scope.ts'
|
|
3
4
|
|
|
4
5
|
const VERSION = 1
|
|
5
6
|
|
|
6
7
|
const DESCRIBES =
|
|
7
|
-
'The system that states every place this app reaches and every credential it reaches with. A target is a destination and the prefix on its id is how it is reached; what it accepts is entities if it keeps them, calls if it is called over https,
|
|
8
|
+
'The system that states every place this app reaches and every credential it reaches with. A target is a destination and the prefix on its id is how it is reached; what it accepts is entities if it keeps them, and calls if it is called: an endpoint over https, a subcommand of a program, a method of a package; a disk accepts nothing, because every disk answers the same orders; what it requires is secrets, and the target it is reached through when the place can only be got at by way of another one; where it is goes on the row as its address when anybody may read it, and is one of the secrets when it carries a password. Nothing else in this app names a host, a connection string or an environment variable, so an operation says which place it needs and the rest is worked out from the declaration.'
|
|
8
9
|
|
|
9
10
|
const TARGETS =
|
|
10
|
-
'Where this app states
|
|
11
|
+
'Where this app states everything outside itself that it deals with, and every way in. An integration is one outside thing — a vendor, a service, a program on the machine — and nothing is reached that is not part of one; declare it with `thread create integration`. A target is one way out of this app into an integration: `thread create target` prints every way a place can be reached, asks which, and puts that prefix on the id, so how it is reached is the prefix and no field says so. A call is one thing a target can be asked to do, declared beside it with `thread create target call`. A webhook is the way back in: `thread create webhook` asks which integration it sits under, the path something outside posts to, and the operation it invokes, and that operation names the webhook back, so neither half opens a door on its own. Nobody writes the file that answers that address, because `thread capabilities` derives it from those two rows. What a target accepts goes in `takes` — entities where it keeps things, calls where it is called, and nothing for a disk. What it needs goes in `requires`: its credentials, and the target it is reached through; where it is goes in address, and a header every call carries goes in headers. This is the one place the split between what reaches a server and what stays local is written down.'
|
|
11
12
|
|
|
12
13
|
const SECRETS =
|
|
13
|
-
'Where this app states every value it must be given and may not hold. A row here is a name and a sentence and never a value
|
|
14
|
+
'Where this app states every value it must be given and may not hold. A row here is a name and a sentence and never a value, and every id wears sec_, because only a server may ever hold a secret: a value anybody may read is not one, and goes on the row that needs it instead, as the address of a target or a header it sends. A secret with a sends goes into a header on every call, one with a signs is the key a body is signed with, and one with neither is the connection string of a database, the one address that carries a password.'
|
|
14
15
|
|
|
15
16
|
const VAULT =
|
|
16
17
|
'What opens a secret\'s value at the moment of use, written once and then yours. It reads the names off _threads/secrets.ts and opens the values sealed beside the tree, refusing any other name; add a secret with `thread create secret`, which is the only thing that ever takes a value. To open values from somewhere else in production, replace what opens them here.'
|
|
17
18
|
|
|
18
19
|
const SECRET =
|
|
19
|
-
'A value this app must be given and may never hold
|
|
20
|
+
'A value this app must be given and may never hold: a key, a token, a connection string. The row names it and says what it is for, and there is no field on it for the value, because a row is read by everything and a credential is read by one thing at one moment. Every id wears sec_, and that prefix says only a server may ever hold it: everything a browser bundle reaches is in the bundle, so a target requiring a secret is refused a browser entry when it is built. A value anybody may read is not a secret and is never sealed; it is written on the row that needs it, as the address of a target or a header every call carries.'
|
|
20
21
|
|
|
21
22
|
const CALL =
|
|
22
|
-
'One thing a target can be asked to do
|
|
23
|
+
'One thing a target can be asked to do, named so that a node names the call and never writes a url, a subcommand or a method. Over https it is a verb and a path; on a program it is a subcommand; on a package it is a method. It is a row rather than a field because it is a thing with a name and a sentence like everything else here, and because what a place offers is a list that grows: an app reaches one more endpoint, subcommand or method by declaring one more of these, not by editing a body.'
|
|
23
24
|
|
|
24
25
|
const REACH =
|
|
25
|
-
'How a target is got at — over a network to a postgres, inside this process, in the browser\'s own memory, over https, as
|
|
26
|
+
'How a target is got at — over a network to a postgres, inside this process, in the browser\'s own memory, over https, as a package this app calls in its own process, as a program run at a command line, or as the disk under it. It is the prefix on the target\'s id and never a field, because how a thing is reached decides everything else that may be said about it: what it accepts, whether it can be reached from a page at all, and whether anything has to say where it is. A field beside the id would be a second answer to a question the id already answers.'
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const INTEGRATION =
|
|
29
|
+
'Something outside this app that it reaches into: a vendor, a service, a program on the machine. Every target says which integration it is part of, so supabase is one thing made of its postgres, its https endpoint, the calls on each and the secrets they need, rather than five rows that happen to share a word. Declare it before the first target that reaches into it.'
|
|
30
|
+
|
|
31
|
+
const WEBHOOK =
|
|
32
|
+
'A way in that something outside uses: it posts to one address this app declares, and that address is the whole of what anybody out there is given. It sits under an integration beside the targets that reach the other way, and it names the operation it runs and the secret its signature is checked against, so what arrives is refused or dispatched and never anything else. Declare one with `thread create webhook`.'
|
|
33
|
+
|
|
34
|
+
const INVOKES =
|
|
35
|
+
'Which operation a webhook runs when something posts to it. That operation names the webhook back, so both halves agree before anything outside reaches it, and a pairing only one of them states is refused.'
|
|
36
|
+
|
|
37
|
+
const ARRIVES =
|
|
38
|
+
'Which header a value comes in on. A webhook says which one carries its signature, and an entity that names its callers says which one carries their token — one word, because it answers the same question about a request.'
|
|
39
|
+
|
|
40
|
+
const SIGNS =
|
|
41
|
+
'What a secret does to a body on its way out: its value is the key a signature is computed with, and the digest goes on the header named here. It is `sends` turned around — `sends` puts the value itself on a header, and this puts the value nowhere at all.'
|
|
42
|
+
|
|
43
|
+
const ADDRESS =
|
|
44
|
+
'Where a target reached over https is: the one absolute url every call on it is written from, stated on the row because a place is a fact anybody may read. Only the address of a database is sealed instead, because a connection string carries a password.'
|
|
45
|
+
|
|
46
|
+
const HEADERS =
|
|
47
|
+
'The headers every call on a target carries, stated on its row as name and value: the version of an API this app is written against, or a fixed way of asking. A credential never goes here, because anybody may read a row; a value that has to be withheld is a secret with a sends.'
|
|
48
|
+
|
|
49
|
+
const SSOT = { on: '2026-08-29', said: 'SSOT for the integrations, as a whole meta inside thread core' }
|
|
50
|
+
|
|
51
|
+
const RULED = { on: '2026-09-22', said: 'remove pub then as an acceptable thing, that\'s definitely slop and it\'s not the first time such a fucking thing has surfaced. Delete and redo it properly.' }
|
|
52
|
+
|
|
53
|
+
export const CONCEPTS: readonly { readonly id: string; readonly describes: string; readonly cites: readonly { readonly on: string; readonly said: string }[] }[] = [
|
|
54
|
+
{ id: 'secret', describes: SECRET, cites: [SSOT] },
|
|
55
|
+
{ id: 'webhook', describes: WEBHOOK, cites: [SSOT] },
|
|
56
|
+
{ id: 'invokes', describes: INVOKES, cites: [SSOT] },
|
|
57
|
+
{ id: 'arrives', describes: ARRIVES, cites: [SSOT] },
|
|
58
|
+
{ id: 'signs', describes: SIGNS, cites: [SSOT] },
|
|
59
|
+
{ id: 'address', describes: ADDRESS, cites: [RULED] },
|
|
60
|
+
{ id: 'headers', describes: HEADERS, cites: [RULED] },
|
|
61
|
+
{ id: 'call', describes: CALL, cites: [SSOT] },
|
|
62
|
+
{ id: 'reach', describes: REACH, cites: [SSOT] },
|
|
63
|
+
{ id: 'integration', describes: INTEGRATION, cites: [SSOT] },
|
|
31
64
|
]
|
|
32
65
|
|
|
33
66
|
import { quoted } from '../core/rows.ts'
|
|
34
67
|
|
|
35
|
-
const concept = (one:
|
|
68
|
+
const concept = (one: (typeof CONCEPTS)[number]): string =>
|
|
36
69
|
[
|
|
37
70
|
' {',
|
|
38
71
|
` id: '${one.id}',`,
|
|
@@ -40,13 +73,12 @@ const concept = (one: { readonly id: string; readonly describes: string }): stri
|
|
|
40
73
|
` describes: ${quoted(one.describes)},`,
|
|
41
74
|
` version: ${String(VERSION)},`,
|
|
42
75
|
' cites: [',
|
|
43
|
-
" { on: '
|
|
44
|
-
" { on: '2026-08-29', said: 'seams declare BOTH target AND secrets' },",
|
|
76
|
+
...one.cites.map((each) => " { on: '" + each.on + "', said: " + quoted(each.said) + ' },'),
|
|
45
77
|
' ],',
|
|
46
78
|
' },',
|
|
47
79
|
].join('\n')
|
|
48
80
|
|
|
49
|
-
const INTEGRATIONS_SOURCE = `import type { Threaded } from '
|
|
81
|
+
const INTEGRATIONS_SOURCE = `import type { Threaded } from '${SHAPED}'
|
|
50
82
|
|
|
51
83
|
export const INTEGRATIONS: Threaded = {
|
|
52
84
|
id: 'integrations',
|
|
@@ -70,14 +102,18 @@ export const INTEGRATIONS: Threaded = {
|
|
|
70
102
|
}
|
|
71
103
|
`
|
|
72
104
|
|
|
73
|
-
const TARGETS_SOURCE = `import type { Call, Target } from '
|
|
105
|
+
const TARGETS_SOURCE = `import type { Call, Integration, Target, Webhook } from '${NAMED}/integrations/target'
|
|
106
|
+
|
|
107
|
+
export const INTEGRATIONS: readonly Integration[] = []
|
|
74
108
|
|
|
75
109
|
export const TARGETS: readonly Target[] = []
|
|
76
110
|
|
|
77
111
|
export const CALLS: readonly Call[] = []
|
|
112
|
+
|
|
113
|
+
export const WEBHOOKS: readonly Webhook[] = []
|
|
78
114
|
`
|
|
79
115
|
|
|
80
|
-
const SECRETS_SOURCE = `import type { Secret } from '
|
|
116
|
+
const SECRETS_SOURCE = `import type { Secret } from '${NAMED}/integrations/secret'
|
|
81
117
|
|
|
82
118
|
export const SECRETS: readonly Secret[] = []
|
|
83
119
|
`
|
|
@@ -113,7 +149,7 @@ const SEEDED = {
|
|
|
113
149
|
' {',
|
|
114
150
|
' id: \'integrations\',',
|
|
115
151
|
' at: \'_threads/integrations.ts\',',
|
|
116
|
-
' describes: \'The system that states every place this app reaches and every credential it reaches with. A target is a destination and the prefix on its id is how it is reached; what it accepts is entities if it keeps them, calls if it is called over https,
|
|
152
|
+
' describes: \'The system that states every place this app reaches and every credential it reaches with. A target is a destination and the prefix on its id is how it is reached; what it accepts is entities if it keeps them, and calls if it is called: an endpoint over https, a subcommand of a program, a method of a package; a disk accepts nothing, because every disk answers the same orders; what it requires is secrets, and the target it is reached through when the place can only be got at by way of another one; where it is goes on the row as its address when anybody may read it, and is one of the secrets when it carries a password. Nothing else in this app names a host, a connection string or an environment variable, so an operation says which place it needs and the rest is worked out from the declaration.\',',
|
|
117
153
|
' version: 1,',
|
|
118
154
|
' },',
|
|
119
155
|
].join('\n'),
|
|
@@ -144,46 +180,4 @@ export const ATTACH: Attaching = {
|
|
|
144
180
|
],
|
|
145
181
|
rows: [...OWN, ...SHIPPED],
|
|
146
182
|
|
|
147
|
-
retires: [
|
|
148
|
-
{
|
|
149
|
-
into: 'derivation.ts',
|
|
150
|
-
list: 'GENERATORS',
|
|
151
|
-
id: 'read-generator',
|
|
152
|
-
why: 'renamed to `inspect-generator`. `thread read` is a verb of the CLI itself now — it reads FILES, and this package reads ROWS, which is `thread inspect`. Both were called read, and only one of them could answer.',
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
into: 'integrations.ts',
|
|
156
|
-
list: 'declares',
|
|
157
|
-
id: 'trace',
|
|
158
|
-
made: `src/integrations.trace.${'jsonl'}`,
|
|
159
|
-
why: 'the record of what went out through an integration is gone. It sealed every line against the one before it, and a chain nobody reads guards nothing. What an integration did is what the tool itself reports, at the moment it runs',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
into: 'derivation.ts',
|
|
163
|
-
list: 'GENERATORS',
|
|
164
|
-
id: 'trace-generator',
|
|
165
|
-
why: 'the record it wrote is gone, so there is nothing for it to make and nothing for `--check` to read',
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
{
|
|
169
|
-
into: 'derivation.ts',
|
|
170
|
-
list: 'GENERATORS',
|
|
171
|
-
id: 'sdk-generator',
|
|
172
|
-
why:
|
|
173
|
-
'`sdk` is a way a target is reached now, not a noun beside one — `thread create target` declares an SDK with ' +
|
|
174
|
-
'`--reach sdk`, which installs it, reads what it answers to, and writes one row instead of three. The noun ' +
|
|
175
|
-
'also raised the collision guard against any app declaring a meta called `sdk`, which made every other ' +
|
|
176
|
-
'withdrawal this package ships undeliverable to the trees that needed them.',
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
into: 'concepts.ts',
|
|
180
|
-
list: 'CONCEPTS',
|
|
181
|
-
id: 'sdk',
|
|
182
|
-
why:
|
|
183
|
-
'`sdk` is no longer a noun beside a target — it is one of the ways a target is reached, and its meaning is ' +
|
|
184
|
-
`now \`SAID.module\` in \`${named('integrations')}/target\`, beside \`https\` and every other reach, none of which is ` +
|
|
185
|
-
'coined here either. It also collided with an app declaring a meta called `sdk`, which coins the word: two ' +
|
|
186
|
-
'meanings for one word is what `twice-meant` refuses, and it was holding the glossary and the docs red.',
|
|
187
|
-
},
|
|
188
|
-
],
|
|
189
183
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LOCKFILES, type Call, type Ran, type Running, type Target } from '../integrations/target.ts';
|
|
2
|
+
export interface Starting {
|
|
3
|
+
readonly at?: string;
|
|
4
|
+
readonly shows?: boolean | 'errors' | 'tee';
|
|
5
|
+
readonly hears?: string;
|
|
6
|
+
readonly within?: number;
|
|
7
|
+
readonly holds?: NodeJS.ProcessEnv;
|
|
8
|
+
}
|
|
9
|
+
export declare function starts(program: string, words: readonly string[], how?: Starting): Ran;
|
|
10
|
+
export declare function started(program: string, words: readonly string[], how?: Starting): Promise<Ran>;
|
|
11
|
+
export declare function handed(at: string, program: string, passed: readonly string[], shows?: boolean | 'errors' | 'tee', within?: number, hears?: string): Ran;
|
|
12
|
+
export interface Holding {
|
|
13
|
+
readonly pid: number;
|
|
14
|
+
readonly runs: string;
|
|
15
|
+
readonly since: number;
|
|
16
|
+
}
|
|
17
|
+
export interface Held {
|
|
18
|
+
readonly by?: Holding;
|
|
19
|
+
}
|
|
20
|
+
export declare function releases(): void;
|
|
21
|
+
export declare function claims(root: string, runs: string): Held;
|
|
22
|
+
export declare function programFor(name: string, at: string): string;
|
|
23
|
+
export declare const SIGNING = "THREAD_RECEIPTS_KEY";
|
|
24
|
+
export declare function signing(): string;
|
|
25
|
+
export declare function running(name: string, subcommands: Readonly<Record<string, string>>, at: string): Running;
|
|
26
|
+
export interface Expansion {
|
|
27
|
+
readonly program: string;
|
|
28
|
+
readonly target: Target;
|
|
29
|
+
readonly calls: readonly Call[];
|
|
30
|
+
}
|
|
31
|
+
export declare function expansions(at: string): readonly Expansion[];
|
|
32
|
+
export declare function calls(target: string, at: string): Running;
|
|
33
|
+
export { LOCKFILES };
|
|
34
|
+
export declare const manager: (into: string) => string;
|
|
35
|
+
export declare function adding(into: string): readonly [string, string];
|
|
36
|
+
export declare function needing(into: string, needs: Readonly<Record<string, string>>): readonly string[];
|
|
37
|
+
export declare function installing(at: string): string;
|