cc-peer 0.0.0 → 1.1.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/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/bin/cc-peer.cjs +351 -0
- package/dist/bin/cc-peer.d.cts +1 -0
- package/dist/bin/cc-peer.d.mts +1 -0
- package/dist/bin/cc-peer.mjs +329 -0
- package/dist/cc-peer-BpNw-MoF.mjs +945 -0
- package/dist/cc-peer-CH38-mD2.cjs +974 -0
- package/dist/cc-peer.cjs +4 -0
- package/dist/cc-peer.d.cts +304 -0
- package/dist/cc-peer.d.mts +304 -0
- package/dist/cc-peer.mjs +2 -0
- package/docs/PROTOCOL.md +193 -0
- package/package.json +107 -2
- package/schemas/artifact-replies-yielded.schema.json +47 -0
- package/schemas/auth-line.schema.json +19 -0
- package/schemas/envelope-attributes.schema.json +38 -0
- package/schemas/notify-when-idle.schema.json +42 -0
- package/schemas/peer-idle-notice.schema.json +62 -0
- package/schemas/peer-key-file.schema.json +24 -0
- package/schemas/peer-message-status.schema.json +74 -0
- package/schemas/registry-entry.schema.json +124 -0
- package/schemas/unyield-artifact-replies.schema.json +50 -0
- package/schemas/user-frame.schema.json +95 -0
- package/schemas/yield-artifact-replies.schema.json +78 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"pid": {
|
|
6
|
+
"type": "integer",
|
|
7
|
+
"exclusiveMinimum": 0,
|
|
8
|
+
"maximum": 9007199254740991
|
|
9
|
+
},
|
|
10
|
+
"sessionId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
},
|
|
14
|
+
"cwd": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"startedAt": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": 0,
|
|
20
|
+
"maximum": 9007199254740991
|
|
21
|
+
},
|
|
22
|
+
"procStart": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"peerProtocol": {
|
|
31
|
+
"type": "integer",
|
|
32
|
+
"minimum": -9007199254740991,
|
|
33
|
+
"maximum": 9007199254740991
|
|
34
|
+
},
|
|
35
|
+
"peerFeatures": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": [
|
|
40
|
+
"notify_idle",
|
|
41
|
+
"reply_across_default_dirs",
|
|
42
|
+
"artifact_yield"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"kind": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"interactive",
|
|
50
|
+
"bg",
|
|
51
|
+
"daemon",
|
|
52
|
+
"daemon-worker"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"entrypoint": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"pidDomain": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1
|
|
61
|
+
},
|
|
62
|
+
"messagingSocketPath": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1
|
|
65
|
+
},
|
|
66
|
+
"name": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"nameSource": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": [
|
|
72
|
+
"user",
|
|
73
|
+
"peer",
|
|
74
|
+
"derived",
|
|
75
|
+
"collision",
|
|
76
|
+
"auto",
|
|
77
|
+
"hook"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"nameSince": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 0,
|
|
83
|
+
"maximum": 9007199254740991
|
|
84
|
+
},
|
|
85
|
+
"updatedAt": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 0,
|
|
88
|
+
"maximum": 9007199254740991
|
|
89
|
+
},
|
|
90
|
+
"status": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"enum": [
|
|
93
|
+
"busy",
|
|
94
|
+
"shell",
|
|
95
|
+
"idle",
|
|
96
|
+
"waiting"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"statusUpdatedAt": {
|
|
100
|
+
"type": "integer",
|
|
101
|
+
"minimum": 0,
|
|
102
|
+
"maximum": 9007199254740991
|
|
103
|
+
},
|
|
104
|
+
"bridgeSessionId": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": [
|
|
109
|
+
"pid",
|
|
110
|
+
"sessionId",
|
|
111
|
+
"cwd",
|
|
112
|
+
"startedAt",
|
|
113
|
+
"procStart",
|
|
114
|
+
"version",
|
|
115
|
+
"peerProtocol",
|
|
116
|
+
"peerFeatures",
|
|
117
|
+
"kind",
|
|
118
|
+
"entrypoint",
|
|
119
|
+
"pidDomain",
|
|
120
|
+
"messagingSocketPath",
|
|
121
|
+
"updatedAt"
|
|
122
|
+
],
|
|
123
|
+
"additionalProperties": false
|
|
124
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "control"
|
|
8
|
+
},
|
|
9
|
+
"action": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "unyield_artifact_replies"
|
|
12
|
+
},
|
|
13
|
+
"orig_msg_id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"maxLength": 128
|
|
16
|
+
},
|
|
17
|
+
"slugs": {
|
|
18
|
+
"maxItems": 16,
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"maxLength": 128
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"stopped": {
|
|
26
|
+
"type": "boolean"
|
|
27
|
+
},
|
|
28
|
+
"msgV": {
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"minimum": -9007199254740991,
|
|
31
|
+
"maximum": 9007199254740991
|
|
32
|
+
},
|
|
33
|
+
"msg_id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1
|
|
36
|
+
},
|
|
37
|
+
"from": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": [
|
|
42
|
+
"type",
|
|
43
|
+
"action",
|
|
44
|
+
"orig_msg_id",
|
|
45
|
+
"slugs",
|
|
46
|
+
"msgV",
|
|
47
|
+
"msg_id"
|
|
48
|
+
],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"msgV": {
|
|
6
|
+
"type": "integer",
|
|
7
|
+
"minimum": -9007199254740991,
|
|
8
|
+
"maximum": 9007199254740991
|
|
9
|
+
},
|
|
10
|
+
"msg_id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
},
|
|
14
|
+
"type": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"const": "user"
|
|
17
|
+
},
|
|
18
|
+
"message": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"role": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"const": "user"
|
|
24
|
+
},
|
|
25
|
+
"content": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": [
|
|
30
|
+
"role",
|
|
31
|
+
"content"
|
|
32
|
+
],
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
35
|
+
"priority": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": [
|
|
38
|
+
"next",
|
|
39
|
+
"later"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"from": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^[A-Za-z0-9%:_/.\\\\-]{1,300}$"
|
|
45
|
+
},
|
|
46
|
+
"session_id": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"file_attachments": {
|
|
50
|
+
"maxItems": 16,
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"path": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
},
|
|
59
|
+
"file_name": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1
|
|
62
|
+
},
|
|
63
|
+
"file_size": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"maximum": 9007199254740991
|
|
67
|
+
},
|
|
68
|
+
"sha256": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
71
|
+
},
|
|
72
|
+
"media_type": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"path",
|
|
78
|
+
"file_name",
|
|
79
|
+
"file_size",
|
|
80
|
+
"sha256"
|
|
81
|
+
],
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": [
|
|
87
|
+
"msgV",
|
|
88
|
+
"msg_id",
|
|
89
|
+
"type",
|
|
90
|
+
"message",
|
|
91
|
+
"priority",
|
|
92
|
+
"from"
|
|
93
|
+
],
|
|
94
|
+
"additionalProperties": false
|
|
95
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "control"
|
|
8
|
+
},
|
|
9
|
+
"action": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "yield_artifact_replies"
|
|
12
|
+
},
|
|
13
|
+
"from": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"maxLength": 512
|
|
16
|
+
},
|
|
17
|
+
"msg_id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 128
|
|
21
|
+
},
|
|
22
|
+
"session_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"maxLength": 512
|
|
25
|
+
},
|
|
26
|
+
"slugs": {
|
|
27
|
+
"maxItems": 16,
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"maxLength": 128
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"reason": {
|
|
35
|
+
"default": "claim",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": [
|
|
38
|
+
"resume",
|
|
39
|
+
"claim"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"sent_at": {
|
|
43
|
+
"type": "number"
|
|
44
|
+
},
|
|
45
|
+
"claimed_at": {
|
|
46
|
+
"type": "number"
|
|
47
|
+
},
|
|
48
|
+
"requester": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"cwd": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"tmux": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
},
|
|
60
|
+
"msgV": {
|
|
61
|
+
"type": "integer",
|
|
62
|
+
"minimum": -9007199254740991,
|
|
63
|
+
"maximum": 9007199254740991
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": [
|
|
67
|
+
"type",
|
|
68
|
+
"action",
|
|
69
|
+
"from",
|
|
70
|
+
"msg_id",
|
|
71
|
+
"session_id",
|
|
72
|
+
"slugs",
|
|
73
|
+
"reason",
|
|
74
|
+
"sent_at",
|
|
75
|
+
"msgV"
|
|
76
|
+
],
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
}
|