Skip to content

Commit 12ee8d0

Browse files
committed
schemas: add SourceChannel envelope contract
1 parent 8391196 commit 12ee8d0

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

schemas/SourceChannelEnvelope.json

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.srcos.ai/v2/SourceChannelEnvelope.json",
4+
"title": "SourceChannelEnvelope",
5+
"description": "Origin-bound, profile-bound, workspace-bound, signed, auditable bridge request for privileged SourceOS operations.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"required": [
9+
"channelId",
10+
"requestId",
11+
"origin",
12+
"surface",
13+
"profileId",
14+
"deviceId",
15+
"capability",
16+
"scope",
17+
"policyBundleHash",
18+
"nonce",
19+
"issuedAt",
20+
"expiresAt",
21+
"reason",
22+
"auditId",
23+
"signature"
24+
],
25+
"properties": {
26+
"channelId": {
27+
"type": "string",
28+
"pattern": "^urn:srcos:channel:"
29+
},
30+
"requestId": {
31+
"type": "string",
32+
"pattern": "^urn:srcos:request:"
33+
},
34+
"origin": {
35+
"type": "string",
36+
"minLength": 1
37+
},
38+
"surface": {
39+
"type": "string",
40+
"enum": [
41+
"prophet-workspace",
42+
"turtleterm",
43+
"bearbrowser",
44+
"agent-term",
45+
"mcp",
46+
"daemon",
47+
"admin-console",
48+
"other"
49+
]
50+
},
51+
"profileId": {
52+
"type": "string",
53+
"pattern": "^urn:srcos:profile:"
54+
},
55+
"workspaceId": {
56+
"type": "string",
57+
"pattern": "^urn:srcos:workspace:"
58+
},
59+
"deviceId": {
60+
"type": "string",
61+
"pattern": "^urn:srcos:device:"
62+
},
63+
"agentId": {
64+
"type": "string",
65+
"pattern": "^urn:srcos:agent:"
66+
},
67+
"capability": {
68+
"type": "string",
69+
"pattern": "^[a-z0-9_.-]+$"
70+
},
71+
"scope": {
72+
"type": "object",
73+
"additionalProperties": true,
74+
"description": "Bounded operation scope. Typical keys include repo, paths, tools, memoryScopes, models, and networkZones."
75+
},
76+
"policyBundleHash": {
77+
"type": "string",
78+
"pattern": "^sha256:"
79+
},
80+
"nonce": {
81+
"type": "string",
82+
"minLength": 8
83+
},
84+
"issuedAt": {
85+
"type": "string",
86+
"format": "date-time"
87+
},
88+
"expiresAt": {
89+
"type": "string",
90+
"format": "date-time"
91+
},
92+
"reason": {
93+
"type": "string",
94+
"minLength": 1
95+
},
96+
"auditId": {
97+
"type": "string",
98+
"pattern": "^urn:srcos:audit:"
99+
},
100+
"signature": {
101+
"type": "string",
102+
"minLength": 1
103+
}
104+
}
105+
}

0 commit comments

Comments
 (0)