@dharma-ai-labs/agent-fabric 0.1.7 → 0.1.10
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/README.md +9 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +819 -47
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +303 -7
- package/dist/index.test.js.map +1 -1
- package/dist/schemas/evidence-request-v2.schema.json +143 -0
- package/dist/schemas/evidence-request.schema.json +14 -1
- package/dist/schemas/organization-policy-v2.schema.json +254 -0
- package/dist/schemas/trajectory-capsule.schema.json +57 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -22,6 +22,15 @@ Current provider adapters are Codex, Claude Code, and Agy. Run
|
|
|
22
22
|
`dharma providers list` because evidence, task, continuation, Skill installation,
|
|
23
23
|
activation, and usage capabilities are reported independently.
|
|
24
24
|
|
|
25
|
+
Signed workspace registration returns the organization-admin-approved evidence
|
|
26
|
+
policy from Dharma HQ. The CLI applies that server revision to
|
|
27
|
+
`.dharma/approved-policy.json` automatically. Without an active content grant,
|
|
28
|
+
the policy remains `local_analysis`; with a current bounded grant, it switches
|
|
29
|
+
to `customer_authorized_content` with the server-issued receipt and upload
|
|
30
|
+
limits. A local flag or hand-edited receipt cannot grant content disclosure.
|
|
31
|
+
The running relay refreshes this policy from signed workspace registration every
|
|
32
|
+
minute, so an admin grant or withdrawal does not require a manual sync command.
|
|
33
|
+
|
|
25
34
|
Local metadata analysis is operational triage, not semantic Cognitive Integrity
|
|
26
35
|
evaluation. Nuanced scoring and remediation require approved, redacted evidence;
|
|
27
36
|
missing evidence must produce `insufficient_evidence`.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { type ProviderId } from '@dharma-ai-labs/agent-fabric-contracts';
|
|
3
3
|
import { type OrganizationPolicy } from '@dharma-ai-labs/agent-fabric-policy';
|
|
4
|
+
import { type SecureSecretStore } from '@dharma-ai-labs/agent-fabric-relay-client';
|
|
4
5
|
import { type SkillBundle } from '@dharma-ai-labs/agent-fabric-skill-manager';
|
|
5
6
|
import { type TaskEnvelope, type TaskReceipt } from '@dharma-ai-labs/agent-fabric-task-runner';
|
|
6
7
|
type Output = unknown;
|
|
7
8
|
export declare function isDirectExecution(argvPath: string | undefined, moduleUrl: string): boolean;
|
|
8
9
|
export declare function rawLocalRetentionDays(policy: Pick<OrganizationPolicy, 'retention'>): number;
|
|
10
|
+
export declare function assertCapsuleIntegrity(capsule: Record<string, unknown>): void;
|
|
11
|
+
export declare function assertCapsuleAuthorizedByCurrentPolicy(capsule: Record<string, unknown>, policy: OrganizationPolicy): void;
|
|
12
|
+
export declare function reserveDailyContentUpload(capsule: Record<string, unknown>, policy: OrganizationPolicy, store?: SecureSecretStore): Promise<void>;
|
|
13
|
+
export declare function releaseDailyContentUpload(capsule: Record<string, unknown>, policy: OrganizationPolicy, _store?: SecureSecretStore): Promise<void>;
|
|
9
14
|
export declare function relayProcessState(home?: string): Promise<'running' | 'stopped' | 'unknown'>;
|
|
10
15
|
export declare function materializeWorkspacePolicy(input: {
|
|
11
16
|
workspace: string;
|
|
12
17
|
organizationId: string;
|
|
13
18
|
revision: string;
|
|
19
|
+
serverPolicyAuthorization?: unknown;
|
|
20
|
+
serverPublicKeyEd25519?: string;
|
|
21
|
+
workspaceId?: string;
|
|
22
|
+
dryRun?: boolean;
|
|
23
|
+
secureStore?: SecureSecretStore;
|
|
14
24
|
}): Promise<{
|
|
15
25
|
relativePath: string;
|
|
16
26
|
policy: OrganizationPolicy;
|
|
27
|
+
applied: boolean;
|
|
17
28
|
}>;
|
|
29
|
+
export declare function applyServerEvidencePolicy(base: OrganizationPolicy, value: unknown, serverPublicKeyEd25519: string, organizationId: string, workspaceId: string, now?: Date): OrganizationPolicy;
|
|
18
30
|
export declare function taskResponsePreview(receipt: TaskReceipt): {
|
|
19
31
|
text: string;
|
|
20
32
|
truncated: boolean;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAiE,KAAK,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAExI,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAiE,KAAK,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAExI,OAAO,EAAsE,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAElJ,OAAO,EAEgC,KAAK,iBAAiB,EAC5D,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAiE,KAAK,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAC7I,OAAO,EAAqC,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAKlI,KAAK,MAAM,GAAG,OAAO,CAAC;AAoDtB,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAO1F;AA0DD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,GAAG,MAAM,CAM3F;AA4ED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAMtE;AAED,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,kBAAkB,QAgKlH;AAoHD,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,KAAK,CAAC,EAAE,iBAAiB,iBAOxF;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,MAAM,CAAC,MAA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