@dharma-ai-labs/agent-fabric 0.2.99 → 0.2.100
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/AGENT_FABRIC_ONBOARDING.md +3 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +147 -8
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +16 -4
- package/dist/index.test.js.map +1 -1
- package/dist/relaySupervisor.d.ts +11 -0
- package/dist/relaySupervisor.d.ts.map +1 -0
- package/dist/relaySupervisor.js +56 -0
- package/dist/relaySupervisor.js.map +1 -0
- package/dist/relaySupervisor.test.d.ts +2 -0
- package/dist/relaySupervisor.test.d.ts.map +1 -0
- package/dist/relaySupervisor.test.js +127 -0
- package/dist/relaySupervisor.test.js.map +1 -0
- package/dist/usage.d.ts +1 -1
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +1 -1
- package/dist/usage.js.map +1 -1
- package/package.json +1 -1
package/dist/index.test.js
CHANGED
|
@@ -7,7 +7,7 @@ import { join } from 'node:path';
|
|
|
7
7
|
import test from 'node:test';
|
|
8
8
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
9
9
|
import { promisify } from 'node:util';
|
|
10
|
-
import { acceptedTrajectoryHead, activateAgyPlugin, attestAgySkillActivation, attestHermesSkillBundleActivation, actionDecisionCapabilityFreshUntil, canonicalFilesystemPath, controlAgentDecisionUrl, installAvailableNativeAgentFabricBootstraps, assertCapsuleAuthorizedByCurrentPolicy, assertRecoveredTaskWorkspacePolicy, assertTaskWorkspacePolicy, assertTaskSkillPin, installNativeAgentFabricBootstrap, installClaudeReadOnlyProjectPermissions, installRepositoryAgentFabricSkill, isDirectExecution, isTransientBootstrapError, loadAgentFabricOnboardingContract, loadOrCreateInstallationId, materializeWorkspacePolicy, applyServerEvidencePolicy, materializeInlineSkillFiles, validateSkillBundleSources, nativeSkillDirectory, nativeSkillDirectoryForWorkspace, nativeSkillRootMatchingAuthorization, normalizeGitRemoteIdentity, postTaskOutcome, parseCliOptions, parseSelectedProviderIds, pathExistsOrThrow, portalUrl, providerHintFromEnvironment, providerHintFromProcessArgv, probeRelayConnection, preflightBootstrapWorkspaceIdentity, rawLocalRetentionDays, syncPendingRetentionCapsules, requireCompletedBootstrapEvidence, retryBootstrapOnboarding, synchronizeBootstrapEvidence, deferUnavailableRelayRetention, recoverLegacySkillBundleIdAfterAuthorizationFailure, installedBundleIdForSkillPollAfterAuthorizationFailure, recoveredTaskPolicyWasSuperseded, acquireRelayProcessLease, relayProcessState, releaseDailyContentUpload, reserveDailyContentUpload, run, runAssistantCommand, sourceRepositoryFingerprint, stableRepositoryLauncherContents, summarizeBootstrapOrganizationApi, ensureAgyReadOnlyAttestationPermission, attestAgySkillBundleActivation, responseTextFromEvent, taskResponsePreview, taskReceiptSession, taskSkillPinFailureCode, verifyAgentFabricSkillInstallation, waitForRelayReadiness, withWorkspacePolicyRefreshLock, withWorkspaceSkillActivationLock, } from './index.js';
|
|
10
|
+
import { acceptedTrajectoryHead, activateAgyPlugin, attestAgySkillActivation, attestHermesSkillBundleActivation, actionDecisionCapabilityFreshUntil, canonicalFilesystemPath, controlAgentDecisionUrl, installAvailableNativeAgentFabricBootstraps, assertCapsuleAuthorizedByCurrentPolicy, assertRecoveredTaskWorkspacePolicy, assertTaskWorkspacePolicy, assertTaskSkillPin, installNativeAgentFabricBootstrap, installClaudeReadOnlyProjectPermissions, installRepositoryAgentFabricSkill, isDirectExecution, isTransientBootstrapError, loadAgentFabricOnboardingContract, loadOrCreateInstallationId, materializeWorkspacePolicy, applyServerEvidencePolicy, materializeInlineSkillFiles, validateSkillBundleSources, nativeSkillDirectory, nativeSkillDirectoryForWorkspace, nativeSkillRootMatchingAuthorization, normalizeGitRemoteIdentity, postTaskOutcome, parseCliOptions, parseSelectedProviderIds, pathExistsOrThrow, portalUrl, providerHintFromEnvironment, providerHintFromProcessArgv, probeRelayConnection, preflightBootstrapWorkspaceIdentity, rawLocalRetentionDays, syncPendingRetentionCapsules, requireCompletedBootstrapEvidence, retryBootstrapOnboarding, synchronizeBootstrapEvidence, deferUnavailableRelayRetention, recoverLegacySkillBundleIdAfterAuthorizationFailure, installedBundleIdForSkillPollAfterAuthorizationFailure, recoveredTaskPolicyWasSuperseded, acquireRelayProcessLease, acquireRelaySupervisorLease, relayProcessState, relaySupervisorProcessState, releaseDailyContentUpload, reserveDailyContentUpload, run, runAssistantCommand, sourceRepositoryFingerprint, stableRepositoryLauncherContents, summarizeBootstrapOrganizationApi, ensureAgyReadOnlyAttestationPermission, attestAgySkillBundleActivation, responseTextFromEvent, taskResponsePreview, taskReceiptSession, taskSkillPinFailureCode, verifyAgentFabricSkillInstallation, waitForRelayReadiness, withWorkspacePolicyRefreshLock, withWorkspaceSkillActivationLock, } from './index.js';
|
|
11
11
|
import { canonicalize, signCanonicalObject } from '@dharma-ai-labs/agent-fabric-contracts';
|
|
12
12
|
import { buildTrajectoryCapsule, trajectoryCapsuleHash } from '@dharma-ai-labs/agent-fabric-evidence-reduction';
|
|
13
13
|
import { CLI_USAGE } from './usage.js';
|
|
@@ -121,6 +121,18 @@ test('relay process lease rejects concurrent starts and preserves a successor PI
|
|
|
121
121
|
await nextRelease();
|
|
122
122
|
assert.equal(await relayProcessState(home), 'stopped');
|
|
123
123
|
});
|
|
124
|
+
test('relay supervisor lease rejects a second supervisor and preserves the relay lease', async () => {
|
|
125
|
+
const home = await mkdtemp(join(tmpdir(), 'dharma-relay-supervisor-lease-'));
|
|
126
|
+
const releaseSupervisor = await acquireRelaySupervisorLease(home);
|
|
127
|
+
const releaseRelay = await acquireRelayProcessLease(home);
|
|
128
|
+
assert.equal(await relaySupervisorProcessState(home), 'running');
|
|
129
|
+
assert.equal(await relayProcessState(home), 'running');
|
|
130
|
+
await assert.rejects(() => acquireRelaySupervisorLease(home), /Another relay supervisor is already running/);
|
|
131
|
+
await releaseSupervisor();
|
|
132
|
+
assert.equal(await relaySupervisorProcessState(home), 'stopped');
|
|
133
|
+
assert.equal(await relayProcessState(home), 'running');
|
|
134
|
+
await releaseRelay();
|
|
135
|
+
});
|
|
124
136
|
test('bootstrap defers policy-rejected evidence without weakening the disclosure boundary', async () => {
|
|
125
137
|
const result = await synchronizeBootstrapEvidence(async () => {
|
|
126
138
|
throw new Error('local_path_disclosure_forbidden: capsule event contains a local path');
|
|
@@ -851,7 +863,7 @@ test('status reports verified relay state and hides local identifiers by default
|
|
|
851
863
|
}));
|
|
852
864
|
const status = await run(['status']);
|
|
853
865
|
const version = await run(['version']);
|
|
854
|
-
assert.deepEqual(status, { version: version.version, enrolled: true, relay: 'running' });
|
|
866
|
+
assert.deepEqual(status, { version: version.version, enrolled: true, relay: 'running', supervisor: 'stopped' });
|
|
855
867
|
const diagnostic = await run(['status', '--verbose']);
|
|
856
868
|
assert.equal(diagnostic.organizationId, 'org_private');
|
|
857
869
|
assert.equal(diagnostic.deviceId, 'device_private');
|
|
@@ -1785,13 +1797,13 @@ test('relay probe opens an authenticated session without polling or leasing work
|
|
|
1785
1797
|
},
|
|
1786
1798
|
openSession: async (version) => {
|
|
1787
1799
|
sessions += 1;
|
|
1788
|
-
assert.equal(version, '0.2.
|
|
1800
|
+
assert.equal(version, '0.2.100');
|
|
1789
1801
|
return { ok: true };
|
|
1790
1802
|
},
|
|
1791
1803
|
}));
|
|
1792
1804
|
assert.equal(sessions, 1);
|
|
1793
1805
|
assert.deepEqual(result, {
|
|
1794
|
-
ok: true, connected: true, organizationId: 'org_test', deviceId: 'device_test', relayVersion: '0.2.
|
|
1806
|
+
ok: true, connected: true, organizationId: 'org_test', deviceId: 'device_test', relayVersion: '0.2.100',
|
|
1795
1807
|
});
|
|
1796
1808
|
});
|
|
1797
1809
|
test('relay probe fails closed when the server does not acknowledge the session', async () => {
|