@plurnk/plurnk-schemes-http 1.14.2 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -8
- package/SPEC.md +16 -16
- package/dist/Http.d.ts.map +1 -1
- package/dist/Http.js +95 -466
- package/dist/Http.js.map +1 -1
- package/dist/HttpGet.d.ts +35 -0
- package/dist/HttpGet.d.ts.map +1 -0
- package/dist/HttpGet.js +299 -0
- package/dist/HttpGet.js.map +1 -0
- package/dist/HttpRequester.d.ts +23 -0
- package/dist/HttpRequester.d.ts.map +1 -0
- package/dist/HttpRequester.js +171 -0
- package/dist/HttpRequester.js.map +1 -0
- package/dist/LiveAcquisitions.d.ts +8 -0
- package/dist/LiveAcquisitions.d.ts.map +1 -0
- package/dist/LiveAcquisitions.js +27 -0
- package/dist/LiveAcquisitions.js.map +1 -0
- package/dist/WebFetcher.d.ts +2 -2
- package/dist/WebFetcher.d.ts.map +1 -1
- package/dist/WebFetcher.js +1 -1
- package/dist/WebFetcher.js.map +1 -1
- package/dist/Ws.d.ts.map +1 -1
- package/dist/Ws.js +7 -9
- package/dist/Ws.js.map +1 -1
- package/dist/http-names.d.ts +5 -0
- package/dist/http-names.d.ts.map +1 -0
- package/dist/http-names.js +6 -0
- package/dist/http-names.js.map +1 -0
- package/docs/https.md +13 -12
- package/docs/wss.md +4 -5
- package/package.json +3 -2
package/docs/https.md
CHANGED
|
@@ -15,11 +15,12 @@ are never presented by default.
|
|
|
15
15
|
|
|
16
16
|
| Operation | Remote action | Effect |
|
|
17
17
|
| ---------------------------------------------- | ------------- | ------------------------------------------------------------------------- |
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
18
|
+
| `### READ0 (https://…) <scope?>` | GET if needed | Acquire/reuse the complete response, then return the selected scoped text |
|
|
19
|
+
| `### FIND0 (https://…)` with matcher body | GET if needed | Prepare an exact URL, then return flat match locations |
|
|
20
|
+
| `### SEND0 (https://…)` with body | POST | Submit the body and stream the response |
|
|
21
|
+
| `### EDIT0 (https://…)` with body | PUT | Replace the whole remote resource; do not use a line scope |
|
|
22
|
+
| `### KILL0 (https://…)` | none | Cancel a live acquisition of the address, or forget its stored response |
|
|
23
|
+
| `### KILL0 (https://…) {remote}` | DELETE | Delete the remote resource and stream the response |
|
|
23
24
|
|
|
24
25
|
A path-pattern FIND searches only web entries already materialized in the
|
|
25
26
|
workspace; a pattern cannot discover the remote web. FIND returns navigation
|
|
@@ -98,10 +99,10 @@ forms therefore have identical selection and scope semantics.
|
|
|
98
99
|
Request headers are ordered `{Key: value}` metadata blocks after the complete
|
|
99
100
|
target, one header per block:
|
|
100
101
|
|
|
101
|
-
```
|
|
102
|
-
|
|
102
|
+
```example
|
|
103
|
+
### READ0 (https://api.example.com/v1/me) {Authorization: Bearer TOKEN} {Accept: application/json}
|
|
103
104
|
|
|
104
|
-
|
|
105
|
+
### EDIT0 (https://api.example.com/v1/thing/42) {Authorization: Bearer TOKEN} {Content-Type: application/json}
|
|
105
106
|
{"done":true}
|
|
106
107
|
```
|
|
107
108
|
|
|
@@ -116,9 +117,9 @@ GET acquisition of a GitHub `…/blob/…` URL uses its
|
|
|
116
117
|
`raw.githubusercontent.com` source. The addressed GitHub URL remains entry
|
|
117
118
|
identity. POST, PUT, and DELETE never use that rewrite.
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
A `KILL` of an https:// address never reaches the remote unless it carries the `{remote}`
|
|
121
|
+
block: while an acquisition is in flight it cancels that acquisition, otherwise it forgets
|
|
122
|
+
the stored response so the next READ must acquire it again. With `{remote}`, any other
|
|
123
|
+
metadata blocks are the DELETE request's headers.
|
|
123
124
|
|
|
124
125
|
For a persistent bidirectional connection, use `wss://`.
|
package/docs/wss.md
CHANGED
|
@@ -11,12 +11,11 @@ that owner.
|
|
|
11
11
|
|
|
12
12
|
| Operation | Effect |
|
|
13
13
|
| ---------------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
14
|
-
|
|
|
14
|
+
| `### READ0 (wss://host/path)` | Claim the address, connect, mark `messages` active on `open`, and stream inbound frames |
|
|
15
15
|
| A second READ of the same address | Return `409` until the existing owner's terminal cleanup releases the claim |
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
| `## KILL0 (wss://host/path)` | Close or cancel the claimed owner; an address with no owner is `404` |
|
|
16
|
+
| `### EDIT0 (wss://host/path)` with body | Send one whole text frame through an already-open owner; ranges and batches are invalid |
|
|
17
|
+
| `### SEND0 (wss://host/path)` with body | Send one whole text frame; it may follow the opening READ in the same turn |
|
|
18
|
+
| `### KILL0 (wss://host/path)` | Close or cancel the claimed owner; an address with no owner is `404` |
|
|
20
19
|
|
|
21
20
|
| Owner state | Meaning | EDIT or SEND with signal `200` |
|
|
22
21
|
| ------------ | ---------------------------------------------------- | ------------------------------------------------ |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-schemes-http",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "HTTP(S) request/response and WebSocket scheme handlers for the plurnk agent runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -74,9 +74,10 @@
|
|
|
74
74
|
"prepack": "npm run build"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@plurnk/plurnk-schemes": "^1.
|
|
77
|
+
"@plurnk/plurnk-schemes": "^1.16.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
+
"@plurnk/plurnk-meta": "1.16.0",
|
|
80
81
|
"eventsource-parser": "^4.0.0"
|
|
81
82
|
}
|
|
82
83
|
}
|