@dharma-ai-labs/agent-fabric 0.2.110 → 0.2.111
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/dist/demoDeviceTransport.d.ts +33 -0
- package/dist/demoDeviceTransport.d.ts.map +1 -0
- package/dist/demoDeviceTransport.js +52 -0
- package/dist/demoDeviceTransport.js.map +1 -0
- package/dist/demoDeviceTransport.test.d.ts +2 -0
- package/dist/demoDeviceTransport.test.d.ts.map +1 -0
- package/dist/demoDeviceTransport.test.js +178 -0
- package/dist/demoDeviceTransport.test.js.map +1 -0
- package/dist/demoTransportCommand.test.d.ts +2 -0
- package/dist/demoTransportCommand.test.d.ts.map +1 -0
- package/dist/demoTransportCommand.test.js +28 -0
- package/dist/demoTransportCommand.test.js.map +1 -0
- package/dist/demoTransportContinuity.d.ts +39 -0
- package/dist/demoTransportContinuity.d.ts.map +1 -0
- package/dist/demoTransportContinuity.js +82 -0
- package/dist/demoTransportContinuity.js.map +1 -0
- package/dist/demoTransportContinuity.test.d.ts +2 -0
- package/dist/demoTransportContinuity.test.d.ts.map +1 -0
- package/dist/demoTransportContinuity.test.js +145 -0
- package/dist/demoTransportContinuity.test.js.map +1 -0
- package/dist/demoTransportFetch.d.ts +12 -0
- package/dist/demoTransportFetch.d.ts.map +1 -0
- package/dist/demoTransportFetch.js +109 -0
- package/dist/demoTransportFetch.js.map +1 -0
- package/dist/demoTransportFetch.test.d.ts +2 -0
- package/dist/demoTransportFetch.test.d.ts.map +1 -0
- package/dist/demoTransportFetch.test.js +150 -0
- package/dist/demoTransportFetch.test.js.map +1 -0
- package/dist/demoTransportRequest.d.ts +35 -0
- package/dist/demoTransportRequest.d.ts.map +1 -0
- package/dist/demoTransportRequest.js +193 -0
- package/dist/demoTransportRequest.js.map +1 -0
- package/dist/demoTransportRequest.test.d.ts +2 -0
- package/dist/demoTransportRequest.test.d.ts.map +1 -0
- package/dist/demoTransportRequest.test.js +203 -0
- package/dist/demoTransportRequest.test.js.map +1 -0
- package/dist/demoTransportState.d.ts +31 -0
- package/dist/demoTransportState.d.ts.map +1 -0
- package/dist/demoTransportState.js +204 -0
- package/dist/demoTransportState.js.map +1 -0
- package/dist/demoTransportState.test.d.ts +2 -0
- package/dist/demoTransportState.test.d.ts.map +1 -0
- package/dist/demoTransportState.test.js +192 -0
- package/dist/demoTransportState.test.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -14
- package/dist/index.js.map +1 -1
- package/dist/relaySupervisor.test.js +3 -1
- package/dist/relaySupervisor.test.js.map +1 -1
- package/dist/schemas/demo-transport-continuity.schema.json +27 -0
- package/dist/schemas/demo-transport-journal.schema.json +13 -0
- package/dist/schemas/demo-transport-request.schema.json +27 -0
- package/dist/schemas/demo-transport-state.schema.json +13 -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.js
CHANGED
|
@@ -41,13 +41,14 @@ import { demoRepositoryPackage } from './demoPackage.js';
|
|
|
41
41
|
import { demoDeviceAndPackageStatus } from './demoStatus.js';
|
|
42
42
|
import { prepareDemoSigningUpgradeProof, readDemoSigningUpgradeContext } from './demoSigningUpgradeProof.js';
|
|
43
43
|
import { submitDemoSigningUpgradeProof } from './demoSigningUpgradeSubmission.js';
|
|
44
|
+
import { createDemoDeviceTransport } from './demoDeviceTransport.js';
|
|
44
45
|
import { runDemoWatch } from './demoWatch.js';
|
|
45
46
|
import { runDemoSupervisor } from './demoSupervisor.js';
|
|
46
47
|
import { demoWatchRegistrationKey, listDemoWatchRegistrations } from './demoWatchRegistry.js';
|
|
47
48
|
import { createDemoWatchHealthRecorder } from './demoWatchHealth.js';
|
|
48
49
|
import { demoWatchStatus, disableDemoWatch, enableDemoWatch, inspectDemoWatchSupervisor } from './demoWatchControl.js';
|
|
49
50
|
export { openCooperativeInboxSession } from './cooperativeInboxSession.js';
|
|
50
|
-
const VERSION = '0.2.
|
|
51
|
+
const VERSION = '0.2.111';
|
|
51
52
|
const USAGE = CLI_USAGE;
|
|
52
53
|
const execFileAsync = promisify(execFile);
|
|
53
54
|
const LOCAL_PROVIDER_IDS = ['codex', 'claude', 'agy', 'hermes'];
|
|
@@ -1606,14 +1607,15 @@ async function supervisedDemoCycle(registration, signal) {
|
|
|
1606
1607
|
const nativeDirectory = registration.provider === 'codex' ? resolve(workspace, '.agents', 'skills')
|
|
1607
1608
|
: registration.provider === 'claude' ? resolve(workspace, '.claude', 'skills')
|
|
1608
1609
|
: nativeSkillDirectory(registration.provider);
|
|
1609
|
-
return withDemoDeviceLock(scope, () => {
|
|
1610
|
+
return withDemoDeviceLock(scope, async () => {
|
|
1610
1611
|
signal.throwIfAborted();
|
|
1611
|
-
|
|
1612
|
-
nativeSkillDirectory: nativeDirectory }, { fetcher: (url, options) => {
|
|
1612
|
+
const deps = await createDemoDeviceTransport(scope, { fetcher: (url, options) => {
|
|
1613
1613
|
signal.throwIfAborted();
|
|
1614
1614
|
return fetch(url, { ...options,
|
|
1615
1615
|
signal: options?.signal ? AbortSignal.any([options.signal, signal]) : signal });
|
|
1616
1616
|
} });
|
|
1617
|
+
return demoRepositoryPackage({ scope, workspace, provider: registration.provider,
|
|
1618
|
+
nativeSkillDirectory: nativeDirectory }, deps);
|
|
1617
1619
|
});
|
|
1618
1620
|
}
|
|
1619
1621
|
async function relaySupervise(flags) {
|
|
@@ -5899,7 +5901,7 @@ export async function run(argv) {
|
|
|
5899
5901
|
return { version: VERSION };
|
|
5900
5902
|
if (command === 'demo' && ['connect', 'status', 'role', 'peers', 'ask', 'reply', 'inbox', 'ack', 'resume',
|
|
5901
5903
|
'package', 'package-status', 'watch', 'watch-enable', 'watch-status', 'watch-disable',
|
|
5902
|
-
'signing-client-proof', 'signing-owner-proof']
|
|
5904
|
+
'signing-client-proof', 'signing-owner-proof', 'transport-connect']
|
|
5903
5905
|
.includes(String(subcommand))) {
|
|
5904
5906
|
const hqUrl = normalizeHqUrl(portalUrl(flags));
|
|
5905
5907
|
const organizationId = required(flags, 'organization-id');
|
|
@@ -5921,11 +5923,23 @@ export async function run(argv) {
|
|
|
5921
5923
|
if (watchControl && await realpath(root) !== workspace) {
|
|
5922
5924
|
throw new Error('Demo watch setup must select the exact Git repository root.');
|
|
5923
5925
|
}
|
|
5926
|
+
let transportOrigin = null;
|
|
5927
|
+
if (subcommand === 'transport-connect') {
|
|
5928
|
+
transportOrigin = required(flags, 'transport-origin');
|
|
5929
|
+
try {
|
|
5930
|
+
const target = new URL(transportOrigin);
|
|
5931
|
+
if (transportOrigin.length > 2048 || target.protocol !== 'https:' || target.origin !== transportOrigin || transportOrigin === hqUrl)
|
|
5932
|
+
throw new Error();
|
|
5933
|
+
}
|
|
5934
|
+
catch {
|
|
5935
|
+
throw new Error('Demo transport recovery target_invalid. Use the exact reviewed HTTPS origin.');
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5924
5938
|
if (flags.has('dry-run'))
|
|
5925
|
-
return { ok: true, stage: signingProof ? 'demo_signing_proof_plan'
|
|
5939
|
+
return { ok: true, stage: transportOrigin ? 'demo_transport_plan' : signingProof ? 'demo_signing_proof_plan'
|
|
5926
5940
|
: watchControl ? 'demo_watch_plan' : 'demo_device_plan',
|
|
5927
5941
|
organizationId, repositoryId, normalizedRepository, workspaceVerified: true,
|
|
5928
|
-
repositoryPackageState: 'not_connected' };
|
|
5942
|
+
repositoryPackageState: 'not_connected', ...(transportOrigin ? { transportOrigin } : {}) };
|
|
5929
5943
|
const grant = subcommand === 'connect' ? required(flags, 'grant') : null;
|
|
5930
5944
|
const scope = {
|
|
5931
5945
|
hqUrl, organizationId, repositoryId, normalizedRepository,
|
|
@@ -5934,7 +5948,7 @@ export async function run(argv) {
|
|
|
5934
5948
|
if (signingProof) {
|
|
5935
5949
|
const context = await readDemoSigningUpgradeContext(resolve(required(flags, 'review-context')));
|
|
5936
5950
|
if (flags.has('submit'))
|
|
5937
|
-
return withDemoDeviceLock(scope, () => submitDemoSigningUpgradeProof(scope, context));
|
|
5951
|
+
return withDemoDeviceLock(scope, async () => submitDemoSigningUpgradeProof(scope, context, await createDemoDeviceTransport(scope)));
|
|
5938
5952
|
return withDemoDeviceLock(scope, () => prepareDemoSigningUpgradeProof(scope, context, subcommand === 'signing-owner-proof' ? 'owner' : 'client'));
|
|
5939
5953
|
}
|
|
5940
5954
|
if (watchControl) {
|
|
@@ -5949,7 +5963,9 @@ export async function run(argv) {
|
|
|
5949
5963
|
hqUrl, organizationId, repositoryId, normalizedRepository, provider, workspace };
|
|
5950
5964
|
const input = { home: dharmaHome(), registration, version: VERSION };
|
|
5951
5965
|
const deps = {
|
|
5952
|
-
verify: async () => {
|
|
5966
|
+
verify: async () => {
|
|
5967
|
+
await withDemoDeviceLock(scope, async () => verifyDemoDevice(scope, await createDemoDeviceTransport(scope)));
|
|
5968
|
+
},
|
|
5953
5969
|
exclusive: operation => withRelayStartupMutation(operation),
|
|
5954
5970
|
prepareStartup: async () => {
|
|
5955
5971
|
const launcher = await installStableRepositoryLauncher(workspace);
|
|
@@ -5977,9 +5993,9 @@ export async function run(argv) {
|
|
|
5977
5993
|
const demoNativeSkillDirectory = provider === 'codex' ? resolve(workspace, '.agents', 'skills')
|
|
5978
5994
|
: provider === 'claude' ? resolve(workspace, '.claude', 'skills')
|
|
5979
5995
|
: nativeSkillDirectory(provider);
|
|
5980
|
-
const cycle = () => withDemoDeviceLock(scope, () => demoRepositoryPackage({ scope, workspace,
|
|
5996
|
+
const cycle = () => withDemoDeviceLock(scope, async () => demoRepositoryPackage({ scope, workspace,
|
|
5981
5997
|
statusOnly: subcommand === 'package-status', provider,
|
|
5982
|
-
nativeSkillDirectory: demoNativeSkillDirectory }));
|
|
5998
|
+
nativeSkillDirectory: demoNativeSkillDirectory }, await createDemoDeviceTransport(scope)));
|
|
5983
5999
|
if (subcommand !== 'watch')
|
|
5984
6000
|
return cycle();
|
|
5985
6001
|
const rawInterval = flags.get('interval-ms');
|
|
@@ -6002,8 +6018,6 @@ export async function run(argv) {
|
|
|
6002
6018
|
}
|
|
6003
6019
|
}
|
|
6004
6020
|
return withDemoDeviceLock(scope, async () => {
|
|
6005
|
-
if (subcommand === 'status')
|
|
6006
|
-
return demoDeviceAndPackageStatus(scope, workspace);
|
|
6007
6021
|
if (subcommand === 'connect') {
|
|
6008
6022
|
const connected = await connectDemoDevice({
|
|
6009
6023
|
...scope, grant: grant,
|
|
@@ -6017,6 +6031,11 @@ export async function run(argv) {
|
|
|
6017
6031
|
const { configPath: _configPath, ...receipt } = connected;
|
|
6018
6032
|
return receipt;
|
|
6019
6033
|
}
|
|
6034
|
+
const deps = await createDemoDeviceTransport(scope);
|
|
6035
|
+
if (transportOrigin)
|
|
6036
|
+
return deps.connectTransport(transportOrigin);
|
|
6037
|
+
if (subcommand === 'status')
|
|
6038
|
+
return demoDeviceAndPackageStatus(scope, workspace, deps);
|
|
6020
6039
|
let action = null;
|
|
6021
6040
|
if (subcommand === 'role') {
|
|
6022
6041
|
const categories = repeated.get('category') || [];
|
|
@@ -6040,7 +6059,7 @@ export async function run(argv) {
|
|
|
6040
6059
|
action = { kind: 'inbox' };
|
|
6041
6060
|
if (subcommand === 'ack')
|
|
6042
6061
|
action = { kind: 'ack', messageId: required(flags, 'message-id') };
|
|
6043
|
-
return performDemoPeerAction(scope, action);
|
|
6062
|
+
return performDemoPeerAction(scope, action, deps);
|
|
6044
6063
|
});
|
|
6045
6064
|
}
|
|
6046
6065
|
if (command === 'bootstrap')
|