@dharma-ai-labs/agent-fabric 0.1.7 → 0.1.11

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.
@@ -0,0 +1,143 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.dharma-ai.io/evidence-request/v2",
4
+ "title": "Evidence Request v2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "requestId",
10
+ "organizationId",
11
+ "deviceId",
12
+ "workspaceId",
13
+ "trajectoryId",
14
+ "purpose",
15
+ "selectors",
16
+ "maximumBytes",
17
+ "retentionClass",
18
+ "requestedBy",
19
+ "authorityDecisionId",
20
+ "createdAt",
21
+ "expiresAt",
22
+ "nonce",
23
+ "capsuleRevision",
24
+ "capsuleHash",
25
+ "keyVersion",
26
+ "signature"
27
+ ],
28
+ "properties": {
29
+ "schema": {
30
+ "const": "dharma.evidence-request/v2"
31
+ },
32
+ "requestId": {
33
+ "type": "string",
34
+ "format": "uuid"
35
+ },
36
+ "organizationId": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "deviceId": {
41
+ "type": "string",
42
+ "minLength": 1
43
+ },
44
+ "workspaceId": {
45
+ "type": "string",
46
+ "minLength": 1
47
+ },
48
+ "trajectoryId": {
49
+ "type": "string",
50
+ "format": "uuid"
51
+ },
52
+ "capsuleRevision": {
53
+ "type": "integer",
54
+ "minimum": 1
55
+ },
56
+ "capsuleHash": {
57
+ "type": "string",
58
+ "pattern": "^sha256:[a-f0-9]{64}$"
59
+ },
60
+ "purpose": {
61
+ "type": "string",
62
+ "enum": [
63
+ "evaluation",
64
+ "remediation_validation",
65
+ "incident_response",
66
+ "customer_review",
67
+ "support"
68
+ ]
69
+ },
70
+ "selectors": {
71
+ "type": "array",
72
+ "minItems": 1,
73
+ "items": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "contentId"
78
+ ],
79
+ "properties": {
80
+ "contentId": {
81
+ "type": "string",
82
+ "pattern": "^(sha256|blake3):[A-Fa-f0-9]{32,128}$"
83
+ },
84
+ "range": {
85
+ "type": [
86
+ "object",
87
+ "null"
88
+ ],
89
+ "additionalProperties": false,
90
+ "properties": {
91
+ "start": {
92
+ "type": "integer",
93
+ "minimum": 0
94
+ },
95
+ "end": {
96
+ "type": "integer",
97
+ "minimum": 0
98
+ }
99
+ }
100
+ },
101
+ "reason": {
102
+ "type": "string"
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "maximumBytes": {
108
+ "type": "integer",
109
+ "minimum": 1
110
+ },
111
+ "retentionClass": {
112
+ "type": "string"
113
+ },
114
+ "requestedBy": {
115
+ "type": "string",
116
+ "minLength": 1
117
+ },
118
+ "authorityDecisionId": {
119
+ "type": "string",
120
+ "minLength": 1
121
+ },
122
+ "createdAt": {
123
+ "type": "string",
124
+ "format": "date-time"
125
+ },
126
+ "expiresAt": {
127
+ "type": "string",
128
+ "format": "date-time"
129
+ },
130
+ "nonce": {
131
+ "type": "string",
132
+ "minLength": 1
133
+ },
134
+ "keyVersion": {
135
+ "type": "string",
136
+ "minLength": 1
137
+ },
138
+ "signature": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ }
142
+ }
143
+ }
@@ -19,7 +19,8 @@
19
19
  "authorityDecisionId",
20
20
  "createdAt",
21
21
  "expiresAt",
22
- "nonce"
22
+ "nonce",
23
+ "signature"
23
24
  ],
24
25
  "properties": {
25
26
  "schema": {
@@ -45,6 +46,14 @@
45
46
  "type": "string",
46
47
  "format": "uuid"
47
48
  },
49
+ "capsuleRevision": {
50
+ "type": "integer",
51
+ "minimum": 1
52
+ },
53
+ "capsuleHash": {
54
+ "type": "string",
55
+ "pattern": "^sha256:[a-f0-9]{64}$"
56
+ },
48
57
  "purpose": {
49
58
  "type": "string",
50
59
  "enum": [
@@ -119,6 +128,10 @@
119
128
  "type": "string",
120
129
  "minLength": 1
121
130
  },
131
+ "keyVersion": {
132
+ "type": "string",
133
+ "minLength": 1
134
+ },
122
135
  "signature": {
123
136
  "type": [
124
137
  "string",
@@ -0,0 +1,254 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.dharma-ai.io/organization-policy/v2",
4
+ "title": "Agent Fabric Organization Policy",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "organizationId",
10
+ "revision",
11
+ "evidence",
12
+ "tasks",
13
+ "skills",
14
+ "retention",
15
+ "budgets"
16
+ ],
17
+ "properties": {
18
+ "schema": {
19
+ "const": "dharma.organization-policy/v2"
20
+ },
21
+ "organizationId": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "revision": {
26
+ "type": "string"
27
+ },
28
+ "serverAuthorization": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["schema", "organizationId", "workspaceId", "policy", "issuedAt", "expiresAt", "signature", "keyVersion"],
32
+ "properties": {
33
+ "schema": { "const": "dharma.workspace-policy-authorization/v1" },
34
+ "organizationId": { "type": "string", "minLength": 1 },
35
+ "workspaceId": { "type": "string", "format": "uuid" },
36
+ "policy": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["revision", "evidence"],
40
+ "properties": {
41
+ "revision": { "type": "string", "minLength": 1 },
42
+ "evidence": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["automaticDisclosure", "maximumCapsuleBytes", "maximumDailyUploadBytes", "maximumExpansionBytes", "excludePaths", "pseudonymizeIdentity"],
46
+ "properties": {
47
+ "automaticDisclosure": { "type": "object" },
48
+ "maximumCapsuleBytes": { "type": "integer", "minimum": 1, "maximum": 1048576 },
49
+ "maximumDailyUploadBytes": { "type": "integer", "minimum": 1 },
50
+ "maximumExpansionBytes": { "type": "integer", "minimum": 1, "maximum": 262144 },
51
+ "excludePaths": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1, "maxLength": 200 } },
52
+ "pseudonymizeIdentity": { "const": true }
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "issuedAt": { "type": "string", "format": "date-time" },
58
+ "expiresAt": { "type": "string", "format": "date-time" },
59
+ "signature": { "type": "string", "minLength": 1 },
60
+ "keyVersion": { "type": "string", "minLength": 1 }
61
+ }
62
+ },
63
+ "evidence": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": [
67
+ "defaultMode",
68
+ "registeredWorkspaceOnly",
69
+ "excludePaths",
70
+ "maximumCapsuleBytes",
71
+ "maximumDailyUploadBytes",
72
+ "maximumExpansionBytes"
73
+ ],
74
+ "properties": {
75
+ "defaultMode": {
76
+ "type": "string",
77
+ "enum": [
78
+ "structured",
79
+ "deep",
80
+ "reduced_full_session",
81
+ "incident_capture"
82
+ ]
83
+ },
84
+ "automaticDisclosure": {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": ["mode"],
88
+ "properties": {
89
+ "mode": {
90
+ "type": "string",
91
+ "enum": ["metadata_only", "local_analysis", "customer_authorized_content"]
92
+ },
93
+ "consentReceiptId": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "allowedContentClasses": {
98
+ "type": "array",
99
+ "items": { "const": "native_provider_payload" },
100
+ "uniqueItems": true
101
+ }
102
+ }
103
+ },
104
+ "registeredWorkspaceOnly": {
105
+ "const": true
106
+ },
107
+ "excludePaths": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "maximumCapsuleBytes": {
114
+ "type": "integer",
115
+ "minimum": 1,
116
+ "maximum": 1048576
117
+ },
118
+ "maximumDailyUploadBytes": {
119
+ "type": "integer",
120
+ "minimum": 1
121
+ },
122
+ "maximumExpansionBytes": {
123
+ "type": "integer",
124
+ "minimum": 1
125
+ },
126
+ "pseudonymizeIdentity": {
127
+ "type": "boolean"
128
+ }
129
+ }
130
+ },
131
+ "tasks": {
132
+ "type": "object",
133
+ "additionalProperties": false,
134
+ "required": [
135
+ "defaultNetwork",
136
+ "defaultGit",
137
+ "allowedCommands",
138
+ "writePaths",
139
+ "requireLocalConfirmationFor"
140
+ ],
141
+ "properties": {
142
+ "defaultNetwork": {
143
+ "type": "string",
144
+ "enum": [
145
+ "deny",
146
+ "package_registry_only",
147
+ "allowlisted_domains",
148
+ "inherit_local_provider"
149
+ ]
150
+ },
151
+ "defaultGit": {
152
+ "type": "string",
153
+ "enum": [
154
+ "read_only",
155
+ "task_branch",
156
+ "merge_allowed",
157
+ "deploy_allowed"
158
+ ]
159
+ },
160
+ "allowedCommands": {
161
+ "type": "object"
162
+ },
163
+ "writePaths": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "string"
167
+ }
168
+ },
169
+ "requireLocalConfirmationFor": {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "string"
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "skills": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "automaticInstall",
182
+ "automaticPromotionMaxRisk",
183
+ "canaryPercent"
184
+ ],
185
+ "properties": {
186
+ "automaticInstall": {
187
+ "type": "boolean"
188
+ },
189
+ "automaticPromotionMaxRisk": {
190
+ "type": "string",
191
+ "enum": [
192
+ "R0",
193
+ "R1",
194
+ "R2",
195
+ "R3",
196
+ "R4"
197
+ ]
198
+ },
199
+ "canaryPercent": {
200
+ "type": "integer",
201
+ "minimum": 1,
202
+ "maximum": 100
203
+ }
204
+ }
205
+ },
206
+ "retention": {
207
+ "type": "object"
208
+ },
209
+ "budgets": {
210
+ "type": "object"
211
+ }
212
+ },
213
+ "allOf": [
214
+ {
215
+ "if": {
216
+ "properties": {
217
+ "evidence": {
218
+ "type": "object",
219
+ "properties": {
220
+ "automaticDisclosure": {
221
+ "type": "object",
222
+ "properties": { "mode": { "const": "customer_authorized_content" } },
223
+ "required": ["mode"]
224
+ }
225
+ },
226
+ "required": ["automaticDisclosure"]
227
+ }
228
+ }
229
+ },
230
+ "then": {
231
+ "required": ["serverAuthorization"],
232
+ "properties": {
233
+ "evidence": {
234
+ "type": "object",
235
+ "properties": {
236
+ "automaticDisclosure": {
237
+ "type": "object",
238
+ "required": ["mode", "consentReceiptId", "allowedContentClasses"],
239
+ "properties": {
240
+ "allowedContentClasses": {
241
+ "type": "array",
242
+ "minItems": 1,
243
+ "maxItems": 1,
244
+ "contains": { "const": "native_provider_payload" }
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
253
+ ]
254
+ }
@@ -105,6 +105,10 @@
105
105
  "incident_capture"
106
106
  ]
107
107
  },
108
+ "automaticDisclosureMode": {
109
+ "type": "string",
110
+ "enum": ["metadata_only", "local_analysis", "customer_authorized_content"]
111
+ },
108
112
  "coverage": {
109
113
  "type": "object",
110
114
  "additionalProperties": false,
@@ -204,12 +208,58 @@
204
208
  },
205
209
  "default": []
206
210
  },
211
+ "localAnalysis": {
212
+ "type": ["object", "null"],
213
+ "additionalProperties": false,
214
+ "required": ["schema", "analyzer", "recordCount", "recordBytes", "eventKinds", "toolDiscipline", "outcomeSignals", "durationMs", "semanticReviewRecommended", "reasonCodes"],
215
+ "properties": {
216
+ "schema": { "const": "dharma.local-trajectory-analysis/v1" },
217
+ "analyzer": { "const": "deterministic" },
218
+ "recordCount": { "type": "integer", "minimum": 0 },
219
+ "recordBytes": {
220
+ "type": "object",
221
+ "additionalProperties": false,
222
+ "required": ["total", "maximum"],
223
+ "properties": {
224
+ "total": { "type": "integer", "minimum": 0 },
225
+ "maximum": { "type": "integer", "minimum": 0 }
226
+ }
227
+ },
228
+ "eventKinds": { "type": "object", "additionalProperties": { "type": "integer", "minimum": 0 } },
229
+ "toolDiscipline": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": ["calls", "results", "unmatchedCalls", "orphanResults"],
233
+ "properties": {
234
+ "calls": { "type": "integer", "minimum": 0 },
235
+ "results": { "type": "integer", "minimum": 0 },
236
+ "unmatchedCalls": { "type": "integer", "minimum": 0 },
237
+ "orphanResults": { "type": "integer", "minimum": 0 }
238
+ }
239
+ },
240
+ "outcomeSignals": {
241
+ "type": "object",
242
+ "additionalProperties": false,
243
+ "required": ["errorRecords", "incomplete", "coverage"],
244
+ "properties": {
245
+ "errorRecords": { "type": "integer", "minimum": 0 },
246
+ "incomplete": { "type": "boolean" },
247
+ "coverage": { "type": "string", "enum": ["observed", "partial", "unavailable"] }
248
+ }
249
+ },
250
+ "durationMs": { "type": "integer", "minimum": 0 },
251
+ "semanticReviewRecommended": { "type": "boolean" },
252
+ "reasonCodes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
253
+ }
254
+ },
207
255
  "redactionReceipt": {
208
256
  "type": "object",
209
257
  "additionalProperties": false,
210
258
  "required": [
211
259
  "policyRevision",
212
260
  "disclosureClass",
261
+ "disclosureMode",
262
+ "consentReceiptId",
213
263
  "disclosedClasses",
214
264
  "excludedClasses",
215
265
  "classes",
@@ -225,6 +275,13 @@
225
275
  "disclosureClass": {
226
276
  "const": "automatic_capsule"
227
277
  },
278
+ "disclosureMode": {
279
+ "type": "string",
280
+ "enum": ["metadata_only", "local_analysis", "customer_authorized_content"]
281
+ },
282
+ "consentReceiptId": {
283
+ "type": ["string", "null"]
284
+ },
228
285
  "disclosedClasses": {
229
286
  "type": "array",
230
287
  "items": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dharma-ai-labs/agent-fabric",
3
- "version": "0.1.7",
3
+ "version": "0.1.11",
4
4
  "description": "Local-first CLI for connecting coding agents to Dharma evaluation, orchestration, and signed Skill delivery",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/dharma-ai-labs/dharma-agent-fabric/tree/main/packages/cli#readme",
@@ -15,13 +15,13 @@
15
15
  "publishConfig": { "access": "public", "provenance": true },
16
16
  "scripts": { "test": "node --test dist/*.test.js" },
17
17
  "dependencies": {
18
- "@dharma-ai-labs/agent-fabric-contracts": "0.1.2",
19
- "@dharma-ai-labs/agent-fabric-evidence-reduction": "0.1.3",
20
- "@dharma-ai-labs/agent-fabric-local-vault": "0.1.4",
21
- "@dharma-ai-labs/agent-fabric-policy": "0.1.1",
18
+ "@dharma-ai-labs/agent-fabric-contracts": "0.1.4",
19
+ "@dharma-ai-labs/agent-fabric-evidence-reduction": "0.1.6",
20
+ "@dharma-ai-labs/agent-fabric-local-vault": "0.1.5",
21
+ "@dharma-ai-labs/agent-fabric-policy": "0.1.4",
22
22
  "@dharma-ai-labs/agent-fabric-provider-adapters": "0.1.2",
23
- "@dharma-ai-labs/agent-fabric-relay-client": "0.1.1",
24
- "@dharma-ai-labs/agent-fabric-skill-manager": "0.1.1",
25
- "@dharma-ai-labs/agent-fabric-task-runner": "0.1.1"
23
+ "@dharma-ai-labs/agent-fabric-relay-client": "0.1.2",
24
+ "@dharma-ai-labs/agent-fabric-skill-manager": "0.1.2",
25
+ "@dharma-ai-labs/agent-fabric-task-runner": "0.1.2"
26
26
  }
27
27
  }