@lapxo/head 0.1.0 → 0.1.4
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/README.md +24 -0
- package/TARGET.bound +517 -54
- package/dist/src/access/contract.d.ts +2 -0
- package/dist/src/access/obtain.d.ts +7 -1
- package/dist/src/access/obtain.js +6 -6
- package/dist/src/adopt/adopt.js +5 -2
- package/dist/src/compile/pin.js +5 -5
- package/dist/src/core/act.d.ts +1 -0
- package/dist/src/core/act.js +1 -0
- package/dist/src/core/answer.d.ts +18 -4
- package/dist/src/core/answer.js +7 -4
- package/dist/src/core/lock.d.ts +2 -0
- package/dist/src/core/lock.js +2 -0
- package/dist/src/core/package.d.ts +54 -0
- package/dist/src/core/package.js +65 -0
- package/dist/src/core/read.d.ts +3 -0
- package/dist/src/core/read.js +8 -4
- package/dist/src/core/surface.d.ts +1 -40
- package/dist/src/core/surface.js +4 -29
- package/dist/src/core/trust.d.ts +7 -0
- package/dist/src/core/trust.js +19 -0
- package/dist/src/flows/call.d.ts +1 -3
- package/dist/src/flows/call.js +3 -6
- package/dist/src/flows/device.js +1 -6
- package/dist/src/flows/read.js +24 -11
- package/dist/src/flows/world.js +3 -3
- package/dist/src/index.js +45 -21
- package/dist/src/onboard/first.d.ts +9 -0
- package/dist/src/onboard/first.js +38 -0
- package/dist/src/onboard/owed.d.ts +10 -0
- package/dist/src/onboard/owed.js +28 -0
- package/dist/src/onboard/site.d.ts +12 -0
- package/dist/src/onboard/site.js +22 -0
- package/dist/src/places/admit.js +1 -1
- package/dist/src/places/found.d.ts +1 -0
- package/dist/src/places/found.js +8 -7
- package/dist/src/ports/access/authorizer.d.ts +10 -0
- package/dist/src/ports/access/authorizer.js +34 -0
- package/dist/src/ports/access/flow.js +13 -3
- package/dist/src/ports/access/person.d.ts +3 -2
- package/dist/src/ports/access/person.js +12 -5
- package/dist/src/ports/adapters/request.d.ts +3 -0
- package/dist/src/ports/adapters/request.js +5 -3
- package/dist/src/ports/bound.d.ts +12 -2
- package/dist/src/ports/bound.js +30 -13
- package/dist/src/ports/documents.d.ts +34 -0
- package/dist/src/ports/documents.js +64 -0
- package/dist/src/ports/keychain.d.ts +2 -1
- package/dist/src/ports/keychain.js +3 -2
- package/dist/src/ports/place.d.ts +1 -0
- package/dist/src/ports/place.js +7 -1
- package/dist/src/ports/process.d.ts +9 -0
- package/dist/src/ports/process.js +5 -3
- package/dist/src/ports/spare.d.ts +1 -0
- package/dist/src/ports/spare.js +33 -0
- package/dist/src/ports/surface.d.ts +130 -0
- package/dist/src/ports/surface.js +50 -0
- package/dist/src/ports/warm.d.ts +19 -0
- package/dist/src/ports/warm.js +46 -0
- package/dist/src/signer.js +1 -1
- package/dist/src/sources/access.d.ts +10 -1
- package/dist/src/sources/access.js +15 -10
- package/dist/src/sources/connect.d.ts +13 -2
- package/dist/src/sources/connect.js +69 -38
- package/dist/src/sources/refused.d.ts +7 -0
- package/dist/src/sources/refused.js +16 -0
- package/dist/src/tools/ask.d.ts +1 -0
- package/dist/src/tools/ask.js +1 -0
- package/dist/src/tools/card.d.ts +1 -1
- package/dist/src/tools/card.js +5 -4
- package/dist/src/tools/do.d.ts +1 -0
- package/dist/src/tools/do.js +1 -0
- package/dist/src/tools/look.d.ts +5 -4
- package/dist/src/tools/look.js +15 -13
- package/dist/src/tools/places.d.ts +7 -0
- package/dist/src/tools/places.js +32 -0
- package/dist/src/tools/share.d.ts +1 -0
- package/dist/src/tools/share.js +1 -0
- package/dist/src/verbs/ask.d.ts +11 -0
- package/dist/src/verbs/ask.js +35 -0
- package/dist/src/verbs/card.d.ts +11 -0
- package/dist/src/verbs/card.js +16 -0
- package/dist/src/verbs/do.d.ts +8 -0
- package/dist/src/verbs/do.js +28 -0
- package/package.json +6 -5
- /package/dist/src/{core → ports}/keys.d.ts +0 -0
- /package/dist/src/{core → ports}/keys.js +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# head
|
|
2
|
+
|
|
3
|
+
An API already says what it offers, where it is reached and how access to it is proven. head reads that document once, compiles it into lines its place pins by digest, and from then on answers by those lines: which operation reads, what it asks, what it answered. It names no kind of source and no client: what it reads is said by the worlds it adopts, and what it asks through is what the client declares. [Connect any API](docs/connect-any-api.md) shows each level of access.
|
|
4
|
+
|
|
5
|
+
A person does three things. **Found a place**: a folder whose lock is the place, its root key kept in the keychain; the first source connected with no place founds `~/place` on the same yes. **Connect a source**: hand head an API document, and an overlay beside it when it says too little; it is compiled once, pinned, and every offer is listed with its class. **Ask**: read an operation. head obtains access the first time, as the document declares it, calls only what reads, types the answer and lands a receipt.
|
|
6
|
+
|
|
7
|
+
Access comes at three levels, and the place says which. **None**: the document states that a read needs nothing, or says nothing about access at all; then head tries the read once with nothing attached, and keeps what it saw as a receipt. **A declared flow**: the document, or its overlay, declares how access is obtained, as an Arazzo profile: a form, a one-time code, a choice, a provider's page. head runs it once per issuer and keeps only the token, in the keychain. **A secret entered by hand**: a key or a password, only where the place's root allows it, entered on head's own one-time page and never through the model.
|
|
8
|
+
|
|
9
|
+
What head never does. It never guesses how access is proven: when a document does not state it, only a read is tried, with nothing attached, and nothing else is called. It never calls an operation that is not a read without the person's yes, nor past what the place allows; a place that would stand on another's lock as its parent is refused by name, since composing two places' policies is bound's. It never lets a secret reach the model, a file, an answer or an argument. And it never raises a ceiling to make room: what outgrows one is split by responsibility.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
- **As an extension:** download `head-<version>-<digest>.mcpb` from the [latest release](https://github.com/Lapxo/head/releases/latest) and open it. Its digest is in the release notes.
|
|
14
|
+
- **By command:** `npx -y @lapxo/head@0.1.4`, for an assistant that starts its servers by command.
|
|
15
|
+
|
|
16
|
+
head runs on macOS for now. Its keys live in your keychain, never in a file.
|
|
17
|
+
|
|
18
|
+
## The first minute
|
|
19
|
+
|
|
20
|
+
head connects nothing when it is installed, and names no provider: what it reads is the API you hand it.
|
|
21
|
+
|
|
22
|
+
1. Ask your assistant something. With no place yet, head says so, and asks for the address of the document of an API that answers it.
|
|
23
|
+
2. Give that address and say yes once. head founds your place in `~/place`, connects the API from its document, pinned by the digest of what it read, and lets head read it for the next 90 days.
|
|
24
|
+
3. Your assistant asks again by itself, and the answer comes back typed, with the source it came from and a receipt signed by head's key.
|