@plurnk/plurnk-contracts 3.1.0 → 3.2.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schemas.plurnk.xyz/v0/FunctionalityMutationResult.json",
|
|
4
|
-
"description": "The outcome of add, enable, disable, or remove:
|
|
4
|
+
"description": "The committed resource outcome of add, replace, enable, disable, or remove ({§functionality-mutation-status}): 202 when the resulting definition requires authorization; otherwise 201 when add or replace creates a local definition (including an inherited override), or 200 for assignment to an existing local definition and settled enable/disable/remove. Only replace may change a different local definition.",
|
|
5
5
|
"title": "FunctionalityMutationResult",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
@@ -15,6 +15,9 @@ export interface FunctionalityDefinitionSource {
|
|
|
15
15
|
readonly alias: string;
|
|
16
16
|
readonly definition: object;
|
|
17
17
|
}
|
|
18
|
+
export interface FunctionalityAdmission extends FunctionalityDefinitionSource {
|
|
19
|
+
readonly preparation?: unknown;
|
|
20
|
+
}
|
|
18
21
|
export interface FunctionalityServiceDefinition extends FunctionalityDefinitionSource {
|
|
19
22
|
readonly enabled: boolean;
|
|
20
23
|
readonly provenance?: FunctionalityProvenance;
|
|
@@ -43,6 +46,7 @@ export interface FunctionalityDocument {
|
|
|
43
46
|
export interface FunctionalityPreparation extends WorkspaceCapabilityIdentity {
|
|
44
47
|
readonly enabled: ReadonlyMap<string, FunctionalityPreparedDefinition>;
|
|
45
48
|
readonly previous: unknown | null;
|
|
49
|
+
readonly admission?: FunctionalityAdmission;
|
|
46
50
|
readonly failure: "publish-unavailable" | "reject";
|
|
47
51
|
readonly force?: string;
|
|
48
52
|
progress(alias: string): void;
|
|
@@ -58,7 +62,7 @@ export interface FunctionalityPrepared<Runtime = never> {
|
|
|
58
62
|
}
|
|
59
63
|
export type WorkspaceCapabilityGate = "none" | "try" | "wait";
|
|
60
64
|
export interface FunctionalityFamilyHandle {
|
|
61
|
-
invoke(verb: "list" | "discover" | "add" | "enable" | "disable" | "remove", params: unknown, identity: FunctionalityIdentity): Promise<{
|
|
65
|
+
invoke(verb: "list" | "discover" | "add" | "replace" | "enable" | "disable" | "remove", params: unknown, identity: FunctionalityIdentity): Promise<{
|
|
62
66
|
readonly status: number;
|
|
63
67
|
readonly body: unknown;
|
|
64
68
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Functionality.d.ts","sourceRoot":"","sources":["../../src/Functionality.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEtG,MAAM,WAAW,2BAA2B;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAChC;AAKD,MAAM,WAAW,qBAAsB,SAAQ,2BAA2B;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACnD;AAGD,MAAM,MAAM,0BAA0B,GAAG,MAAM,0BAA0B,CAAC;AAI1E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzD,MAAM,WAAW,6BAA6B;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAID,MAAM,WAAW,8BAA+B,SAAQ,6BAA6B;IACjF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,uBAAuB,CAAC;IAE9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,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAGhE,OAAO,CACH,QAAQ,EAAE,2BAA2B,EACrC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,uBAAuB,CAAC;QAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GACpF,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-contracts",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Canonical PLURNK language contract, schemas, generated types, and runtime-neutral wire contracts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"json-schema-to-typescript": "^16.0.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "f96502a26d62a6f87b22950a9e2006348ac8a6bc"
|
|
72
72
|
}
|
package/plurnk.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# Plurnk
|
|
1
|
+
# Plurnk Operation Protocol
|
|
2
2
|
|
|
3
3
|
> [!IMPORTANT]
|
|
4
4
|
> YOU MUST ONLY emit fenced operations; with the parameters, pattern, and terse aside on the fenced Operation line.
|
|
5
5
|
|
|
6
6
|
> [!IMPORTANT]
|
|
7
|
-
> YOU MUST
|
|
7
|
+
> YOU MUST record at least one NOTE along with other operations.
|
|
8
8
|
|
|
9
9
|
> [!TIP]
|
|
10
|
-
> All operations except
|
|
10
|
+
> All operations (except NOTE) are converted into log items.
|
|
11
11
|
|
|
12
12
|
## Syntax
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ body?
|
|
|
17
17
|
|
|
18
18
|
## Core Operations
|
|
19
19
|
|
|
20
|
-
* NOTE: Persistent Internal
|
|
20
|
+
* NOTE: Persistent Detailed Internal Register. Emit NOTE for every summary, finding, decision, and plan (and why).
|
|
21
21
|
* FIND: List matching paths, or the match locations inside one path.
|
|
22
22
|
* READ: Read files, entries, streams, or only the lines a pattern selects.
|
|
23
23
|
* EDIT: Create a file or entry; replace existing text by scope or by pattern.
|
|
@@ -26,34 +26,40 @@ body?
|
|
|
26
26
|
* KILL: Delete an entry, stop a process, or retire log items.
|
|
27
27
|
* WORK: Delegate to a child worker (fresh log).
|
|
28
28
|
* FORK: Delegate to a child worker (copied log).
|
|
29
|
-
* WAIT: Yield to child workers and streams (You may include `[60]` to check in after 60 seconds
|
|
30
|
-
* SEND: Message endpoints, workers, or
|
|
29
|
+
* WAIT: Yield to child workers and streams (not the user). You may include `[60]` to check in after 60 seconds.
|
|
30
|
+
* SEND: Message endpoints, workers, or Open Messages (when the path is omitted, the oldest Open Message).
|
|
31
31
|
|
|
32
32
|
## Loop Protocol
|
|
33
33
|
|
|
34
|
-
```NOTE
|
|
35
|
-
exampleLoader.py
|
|
34
|
+
```NOTE <!-- summary -->
|
|
35
|
+
Configuration exampleLoader.py load-order bug identified; fix and regression test pending.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```NOTE <!-- finding -->
|
|
39
|
+
exampleLoader.py:58 reads the config before exampleInit() sets its path, so every test sees the defaults.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```NOTE <!-- decision -->
|
|
43
|
+
Move configuration reading in exampleLoader.py into exampleInit() so it uses the initialized path. Plugin dependence on the old order is still unverified.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```NOTE <!-- plan -->
|
|
47
|
+
Edit exampleLoader.py, then rerun exampleTest.py.
|
|
36
48
|
```
|
|
37
49
|
|
|
38
50
|
```SEND
|
|
39
|
-
This is an example of a continuing
|
|
51
|
+
This is an example of a continuing progress update response.
|
|
40
52
|
```
|
|
41
53
|
|
|
42
54
|
```SEND [200]
|
|
43
|
-
This is an example of
|
|
55
|
+
This is an example of a final deliverable response.
|
|
44
56
|
```
|
|
45
57
|
|
|
46
58
|
> [!TIP]
|
|
47
|
-
>
|
|
48
|
-
|
|
49
|
-
> [!TIP]
|
|
50
|
-
> Don't include a code (`[200]` or `[499]`) with a SEND unless it's the final deliverable response.
|
|
59
|
+
> YOU SHOULD include the Open Message's (path) to complete `[200]` or cancel `[499]` specific Open Messages.
|
|
51
60
|
|
|
52
|
-
> [!
|
|
53
|
-
> The loop continues until
|
|
54
|
-
> * Every Open Message has received a `[200]` completion or `[499]` cancellation reply.
|
|
55
|
-
> * All required operation results have been observed.
|
|
56
|
-
> * All work held by the loop has settled.
|
|
61
|
+
> [!CAUTION]
|
|
62
|
+
> The loop continues until every Open Message has a `[200]` or `[499]` reply, operation results have been observed, and work held by the loop has settled.
|
|
57
63
|
|
|
58
64
|
## Delegation (worker:///_plurnk/plurnk/delegation.md)
|
|
59
65
|
|