@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/docs/https.md CHANGED
@@ -15,11 +15,12 @@ are never presented by default.
15
15
 
16
16
  | Operation | Remote action | Effect |
17
17
  | ---------------------------------------------- | ------------- | ------------------------------------------------------------------------- |
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 [200] (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://…)` | DELETE | Delete the remote resource and stream the response |
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
- ```plurnk
102
- ## READ0 (https://api.example.com/v1/me) {Authorization: Bearer TOKEN} {Accept: application/json}
102
+ ```example
103
+ ### READ0 (https://api.example.com/v1/me) {Authorization: Bearer TOKEN} {Accept: application/json}
103
104
 
104
- ## EDIT0 (https://api.example.com/v1/thing/42) {Authorization: Bearer TOKEN} {Content-Type: application/json}
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
- | Control | Effect |
120
- | ------------------------ | --------------------------------------------------------------------- |
121
- | `## SEND0 [499] (https://…)` | Cancel the routed in-flight acquisition |
122
- | `## SEND0 [410] (https://…)` | Delete the local stored response; the next READ must acquire it again |
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
- | `## READ0 (wss://host/path)` | Claim the address, connect, mark `messages` active on `open`, and stream inbound frames |
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
- | `## EDIT0 (wss://host/path)` with body | Send one whole text frame through an already-open owner; ranges and batches are invalid |
17
- | `## SEND0 [200] (wss://host/path)` with body | Send one whole text frame; it may follow the opening READ in the same turn |
18
- | `## SEND0 [499] (wss://host/path)` | Cancel the owning READ through its routed subscription handle |
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.14.2",
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.14.2"
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
  }