@dharma-ai-labs/agent-fabric 0.2.16 → 0.2.17
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 +3 -2
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -20
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +67 -2
- package/dist/index.test.js.map +1 -1
- package/dist/schemas/skill-bundle.schema.json +1 -1
- package/dist/schemas/task-envelope.schema.json +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ dharma repositories connect \
|
|
|
20
20
|
--repo "$PWD" \
|
|
21
21
|
--provider codex \
|
|
22
22
|
--provider claude \
|
|
23
|
+
--provider hermes \
|
|
23
24
|
--organization-id <organization-id> \
|
|
24
25
|
--policy-revision <dashboard-policy-revision>
|
|
25
26
|
dharma repositories status --repo "$PWD" --json
|
|
@@ -36,7 +37,7 @@ the same agent. The CLI derives repository identity from a credential-free
|
|
|
36
37
|
normalized Git remote. Repositories without a remote require an explicit stable
|
|
37
38
|
`--repository-key`; absolute paths are never identity.
|
|
38
39
|
|
|
39
|
-
Current provider adapters are Codex, Claude Code, and
|
|
40
|
+
Current provider adapters are Codex, Claude Code, Agy, and Hermes Agent. Run
|
|
40
41
|
`dharma providers list` because evidence, task, continuation, Skill installation,
|
|
41
42
|
activation, and usage capabilities are reported independently.
|
|
42
43
|
|
|
@@ -81,7 +82,7 @@ rejects trajectories that do not carry the installed candidate bundle ID:
|
|
|
81
82
|
```bash
|
|
82
83
|
dharma skills sync \
|
|
83
84
|
--workspace-id <workspace-id> \
|
|
84
|
-
--provider <codex|claude|agy> \
|
|
85
|
+
--provider <codex|claude|agy|hermes> \
|
|
85
86
|
--policy .dharma/approved-policy.json \
|
|
86
87
|
--approval-id <evaluation-authorization-id>
|
|
87
88
|
|
package/dist/index.d.ts
CHANGED
|
@@ -115,6 +115,21 @@ export declare function postTaskOutcome(input: {
|
|
|
115
115
|
postEvent: (taskId: string, eventType: TaskReceipt['status'], payload: Record<string, unknown>) => Promise<unknown>;
|
|
116
116
|
}): Promise<unknown>;
|
|
117
117
|
export declare function nativeSkillDirectory(provider: ProviderId, env?: NodeJS.ProcessEnv, home?: string): string;
|
|
118
|
+
type HermesSkillExecutor = (executable: string, argv: string[], options: {
|
|
119
|
+
timeout: number;
|
|
120
|
+
env: NodeJS.ProcessEnv;
|
|
121
|
+
cwd: string;
|
|
122
|
+
}) => Promise<{
|
|
123
|
+
stdout?: string | Buffer;
|
|
124
|
+
}>;
|
|
125
|
+
export declare function trustHermesProject(input: {
|
|
126
|
+
workspace: string;
|
|
127
|
+
env?: NodeJS.ProcessEnv;
|
|
128
|
+
execute?: HermesSkillExecutor;
|
|
129
|
+
}): Promise<{
|
|
130
|
+
workspace: string;
|
|
131
|
+
trusted: boolean;
|
|
132
|
+
}>;
|
|
118
133
|
export declare function installNativeAgentFabricBootstrap(input: {
|
|
119
134
|
provider: ProviderId;
|
|
120
135
|
workspace: string;
|
|
@@ -123,6 +138,7 @@ export declare function installNativeAgentFabricBootstrap(input: {
|
|
|
123
138
|
hqUrl: string;
|
|
124
139
|
env?: NodeJS.ProcessEnv;
|
|
125
140
|
home?: string;
|
|
141
|
+
executeHermes?: HermesSkillExecutor;
|
|
126
142
|
}): Promise<{
|
|
127
143
|
provider: ProviderId;
|
|
128
144
|
nativeSkillDirectory: string;
|
|
@@ -167,6 +183,7 @@ export declare function verifyAgentFabricSkillInstallation(input: {
|
|
|
167
183
|
}) => Promise<{
|
|
168
184
|
stdout: string | Buffer;
|
|
169
185
|
}>;
|
|
186
|
+
listHermesSkills?: HermesSkillExecutor;
|
|
170
187
|
}): Promise<{
|
|
171
188
|
provider: ProviderId;
|
|
172
189
|
ready: boolean;
|
|
@@ -186,6 +203,24 @@ export declare function verifyAgentFabricSkillInstallation(input: {
|
|
|
186
203
|
activation: string;
|
|
187
204
|
nextAction: string;
|
|
188
205
|
}>;
|
|
206
|
+
export declare function attestHermesSkillBundleActivation(input: {
|
|
207
|
+
bundle: SkillBundle;
|
|
208
|
+
workspace: string;
|
|
209
|
+
env?: NodeJS.ProcessEnv;
|
|
210
|
+
execute?: HermesSkillExecutor;
|
|
211
|
+
}): Promise<{
|
|
212
|
+
name: string;
|
|
213
|
+
status: "unavailable";
|
|
214
|
+
details: string;
|
|
215
|
+
} | {
|
|
216
|
+
name: string;
|
|
217
|
+
status: "fail";
|
|
218
|
+
details: string;
|
|
219
|
+
} | {
|
|
220
|
+
name: string;
|
|
221
|
+
status: "pass";
|
|
222
|
+
details: string;
|
|
223
|
+
}>;
|
|
189
224
|
type AgyPluginExecutor = (executable: string, argv: string[], options: {
|
|
190
225
|
timeout: number;
|
|
191
226
|
env: NodeJS.ProcessEnv;
|
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,EAGL,KAAK,kBAAkB,EAAE,KAAK,UAAU,EAAE,KAAK,0BAA0B,EAC1E,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAA2G,KAAK,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAClM,OAAO,EAAsE,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAClJ,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAGL,KAAK,kBAAkB,EAAE,KAAK,UAAU,EAAE,KAAK,0BAA0B,EAC1E,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAA2G,KAAK,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAClM,OAAO,EAAsE,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAClJ,OAAO,EAAkI,KAAK,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtN,OAAO,EACL,iBAAiB,EAGgD,KAAK,iBAAiB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C,KAAK,EAAE;IAC/E,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlB;AAED,wBAAsB,sDAAsD,CAAC,KAAK,EAAE;IAClF,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,GAAG,OAAO,CAAC,MAAM,CAAC,CAElB;AAiPD,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA8FzD"}
|
package/dist/index.js
CHANGED
|
@@ -10,15 +10,19 @@ import { promisify } from 'node:util';
|
|
|
10
10
|
import { canonicalize, createActionDecisionPublicKeyResolver, sha256, validateContract, validateTrustedServerSigningKeysetContract, verifyCanonicalObject, verifyInitialServerSigningKeyset, } from '@dharma-ai-labs/agent-fabric-contracts';
|
|
11
11
|
import { buildTrajectoryCapsule, redactValue, referencesExcludedPath, trajectoryCapsuleHash } from '@dharma-ai-labs/agent-fabric-evidence-reduction';
|
|
12
12
|
import { assertPolicy, loadOrganizationPolicy, verifyServerAuthorizedPolicy } from '@dharma-ai-labs/agent-fabric-policy';
|
|
13
|
-
import { agyAdapter, claudeAdapter, codexAdapter, providerAdapters, providerExecutionRecords, providerProcessEnvironment } from '@dharma-ai-labs/agent-fabric-provider-adapters';
|
|
13
|
+
import { agyAdapter, claudeAdapter, codexAdapter, hermesAdapter, providerAdapters, providerExecutionRecords, providerProcessEnvironment } from '@dharma-ai-labs/agent-fabric-provider-adapters';
|
|
14
14
|
import { AgentFabricClient, beginEnrollment, loadOrCreateDeviceIdentity, normalizeHqUrl, pollEnrollment, deleteActiveSkillAuthorizationAnchor, loadActiveSkillAuthorizationAnchor, loadDeviceEnrollmentAnchor, saveActiveSkillAuthorizationAnchor, isDefinitiveAgentFabricRejection, recoverDeviceEnrollmentConsistency, saveDeviceConfig, saveDeviceEnrollmentAnchor, } from '@dharma-ai-labs/agent-fabric-relay-client';
|
|
15
15
|
import { AgentFabricClient as AgentFabricApiClient } from '@dharma-ai-labs/agent-fabric-sdk';
|
|
16
16
|
import { getActiveSkillBundleAuthorization, getExpiredSkillBundleAuthorizationForReplacement, getLegacySkillBundleIdForUpgrade, installSkillBundle, rollbackUnconfirmedSkillBundle, verifySkillBundle } from '@dharma-ai-labs/agent-fabric-skill-manager';
|
|
17
17
|
import { executeTask, FileActionExecutionJournal, FileTaskReceiptStore, providerInstructionsForTask, } from '@dharma-ai-labs/agent-fabric-task-runner';
|
|
18
18
|
import { CLI_USAGE } from './usage.js';
|
|
19
|
-
const VERSION = '0.2.
|
|
19
|
+
const VERSION = '0.2.17';
|
|
20
20
|
const USAGE = CLI_USAGE;
|
|
21
21
|
const execFileAsync = promisify(execFile);
|
|
22
|
+
const LOCAL_PROVIDER_IDS = ['codex', 'claude', 'agy', 'hermes'];
|
|
23
|
+
function isLocalProviderId(value) {
|
|
24
|
+
return LOCAL_PROVIDER_IDS.includes(value);
|
|
25
|
+
}
|
|
22
26
|
export function parseCliOptions(args) {
|
|
23
27
|
const positional = [];
|
|
24
28
|
const flags = new Map();
|
|
@@ -319,7 +323,7 @@ export function assertCapsuleAuthorizedByCurrentPolicy(capsule, policy) {
|
|
|
319
323
|
&& captureProvenance.sourceClass === 'signed_task_execution';
|
|
320
324
|
const signedTaskBundleIds = [...new Set(events.map((event) => (event && typeof event === 'object' && !Array.isArray(event)
|
|
321
325
|
? String(event.skillBundleId || '') : '')).filter(Boolean))];
|
|
322
|
-
if (!
|
|
326
|
+
if (!isLocalProviderId(provider)
|
|
323
327
|
|| !digest.test(String(capsule.sessionId || ''))
|
|
324
328
|
|| (signedTaskCapture
|
|
325
329
|
? !uuid.test(String(capsule.taskId || ''))
|
|
@@ -740,7 +744,7 @@ export async function withWorkspacePolicyRefreshLock(workspaceId, operation) {
|
|
|
740
744
|
return withFileLock(`${workspaceAuthorizationStatePath(workspaceId)}.refresh.lock`, operation, 'Timed out waiting for the workspace policy refresh lock.');
|
|
741
745
|
}
|
|
742
746
|
export async function withWorkspaceSkillActivationLock(workspaceId, provider, operation) {
|
|
743
|
-
if (!workspaceId || !
|
|
747
|
+
if (!workspaceId || !isLocalProviderId(provider)) {
|
|
744
748
|
throw new Error('Skill activation lock requires a registered workspace and supported provider.');
|
|
745
749
|
}
|
|
746
750
|
const key = createHash('sha256').update(`${workspaceId}:${provider}`).digest('hex');
|
|
@@ -895,6 +899,8 @@ function providerAdapter(provider) {
|
|
|
895
899
|
return claudeAdapter;
|
|
896
900
|
if (provider === 'agy')
|
|
897
901
|
return agyAdapter;
|
|
902
|
+
if (provider === 'hermes')
|
|
903
|
+
return hermesAdapter;
|
|
898
904
|
return null;
|
|
899
905
|
}
|
|
900
906
|
function deterministicUuid(value) {
|
|
@@ -1763,8 +1769,8 @@ export function parseSelectedProviderIds(values) {
|
|
|
1763
1769
|
.filter(Boolean))];
|
|
1764
1770
|
if (selected.length === 0)
|
|
1765
1771
|
return null;
|
|
1766
|
-
if (selected.some((value) => !
|
|
1767
|
-
throw new Error('Repository providers must be codex, claude, or
|
|
1772
|
+
if (selected.some((value) => !isLocalProviderId(value))) {
|
|
1773
|
+
throw new Error('Repository providers must be codex, claude, agy, or hermes. Repeat --provider to select more than one.');
|
|
1768
1774
|
}
|
|
1769
1775
|
return selected;
|
|
1770
1776
|
}
|
|
@@ -2058,7 +2064,7 @@ Use the installed \`dharma\` CLI for organization-scoped agent work. Never print
|
|
|
2058
2064
|
Do not substitute a placeholder or shell variable. Stop unless the result reports \`ready: true\`. Restart the provider after the first installation so it discovers the native skill.
|
|
2059
2065
|
2. Run \`dharma providers list\` to confirm the provider's independently tested evidence, task, continuation, skill, activation, and rollback capabilities.
|
|
2060
2066
|
3. Keep \`dharma relay start --policy .dharma/approved-policy.json\` running for signed task, evidence, and skill delivery.
|
|
2061
|
-
4. Preview the exact automatic disclosure with \`dharma evidence preview --workspace . --provider codex --policy .dharma/approved-policy.json --maximum-sessions 20\` for Codex, replacing only the literal provider value with \`claude\` or \`
|
|
2067
|
+
4. Preview the exact automatic disclosure with \`dharma evidence preview --workspace . --provider codex --policy .dharma/approved-policy.json --maximum-sessions 20\` for Codex, replacing only the literal provider value with \`claude\`, \`agy\`, or \`hermes\` when that is the current agent. Confirm the policy mode and consent receipt before syncing.
|
|
2062
2068
|
5. Run local deterministic self-analysis during capture. Deliver event counts, timing, coverage, failure signals, tool-discipline results, reason codes, and content availability metadata. Do not invent a semantic judgment from metadata. Sessions flagged \`semanticReviewRecommended\` require a policy-authorized evidence request or customer-authorized content mode before server judging.
|
|
2063
2069
|
6. Use only signed tasks whose organization, device, workspace, authority, budget, and skill pin pass local validation.
|
|
2064
2070
|
7. For cross-agent help, ask the control plane for a structured, task-bound handoff. Do not open arbitrary chat, shell, file, merge, deploy, or secret authority.
|
|
@@ -2903,8 +2909,20 @@ export function nativeSkillDirectory(provider, env = process.env, home = homedir
|
|
|
2903
2909
|
return resolve(env.CODEX_HOME || resolve(home, '.codex'), 'skills');
|
|
2904
2910
|
if (provider === 'claude')
|
|
2905
2911
|
return resolve(env.CLAUDE_CONFIG_DIR || resolve(home, '.claude'), 'skills');
|
|
2912
|
+
if (provider === 'hermes')
|
|
2913
|
+
return resolve(env.HERMES_HOME || resolve(home, '.hermes'), 'skills');
|
|
2906
2914
|
return resolve(env.AGY_CONFIG_DIR || resolve(home, '.gemini', 'antigravity-cli'), 'plugins', 'dharma-agent-fabric', 'skills');
|
|
2907
2915
|
}
|
|
2916
|
+
export async function trustHermesProject(input) {
|
|
2917
|
+
const workspace = await realpath(input.workspace);
|
|
2918
|
+
const execute = input.execute || ((executable, argv, options) => execFileAsync(executable, argv, options));
|
|
2919
|
+
await execute('hermes', ['skills', 'trust', workspace], {
|
|
2920
|
+
timeout: 30_000,
|
|
2921
|
+
env: providerProcessEnvironment(input.env),
|
|
2922
|
+
cwd: workspace,
|
|
2923
|
+
});
|
|
2924
|
+
return { workspace, trusted: true };
|
|
2925
|
+
}
|
|
2908
2926
|
export async function installNativeAgentFabricBootstrap(input) {
|
|
2909
2927
|
const root = nativeSkillDirectory(input.provider, input.env, input.home);
|
|
2910
2928
|
const skillRoot = resolve(root, 'dharma-agent-fabric');
|
|
@@ -2940,6 +2958,13 @@ The repository-local skill and connection manifest are authoritative for the act
|
|
|
2940
2958
|
}, null, 2)}\n`, { mode: 0o600 });
|
|
2941
2959
|
if (input.provider === 'agy')
|
|
2942
2960
|
await activateAgyPlugin({ env: input.env, home: input.home });
|
|
2961
|
+
if (input.provider === 'hermes') {
|
|
2962
|
+
await trustHermesProject({
|
|
2963
|
+
workspace: input.workspace,
|
|
2964
|
+
env: input.env,
|
|
2965
|
+
execute: input.executeHermes,
|
|
2966
|
+
});
|
|
2967
|
+
}
|
|
2943
2968
|
return {
|
|
2944
2969
|
provider: input.provider,
|
|
2945
2970
|
nativeSkillDirectory: root,
|
|
@@ -2993,7 +3018,7 @@ export async function verifyAgentFabricSkillInstallation(input) {
|
|
|
2993
3018
|
catch { }
|
|
2994
3019
|
}
|
|
2995
3020
|
const nativeInstalled = nativeManaged;
|
|
2996
|
-
let nativeDiscovered = input.provider
|
|
3021
|
+
let nativeDiscovered = ['agy', 'hermes'].includes(input.provider) ? false : nativeInstalled;
|
|
2997
3022
|
if (input.provider === 'agy' && nativeInstalled) {
|
|
2998
3023
|
try {
|
|
2999
3024
|
const listAgyPlugins = input.listAgyPlugins
|
|
@@ -3014,6 +3039,19 @@ export async function verifyAgentFabricSkillInstallation(input) {
|
|
|
3014
3039
|
}
|
|
3015
3040
|
catch { }
|
|
3016
3041
|
}
|
|
3042
|
+
if (input.provider === 'hermes' && nativeInstalled) {
|
|
3043
|
+
try {
|
|
3044
|
+
const listHermesSkills = input.listHermesSkills
|
|
3045
|
+
|| ((executable, argv, options) => (execFileAsync(executable, argv, options)));
|
|
3046
|
+
const { stdout } = await listHermesSkills('hermes', ['skills', 'list', '--source', 'local', '--enabled-only'], {
|
|
3047
|
+
timeout: 30_000,
|
|
3048
|
+
env: providerProcessEnvironment(input.env),
|
|
3049
|
+
cwd: workspace,
|
|
3050
|
+
});
|
|
3051
|
+
nativeDiscovered = /\bdharma-agent-fabric\b/.test(String(stdout || ''));
|
|
3052
|
+
}
|
|
3053
|
+
catch { }
|
|
3054
|
+
}
|
|
3017
3055
|
const bootstrapReady = repositoryInstalled && nativeInstalled && nativeDiscovered;
|
|
3018
3056
|
let workspaceId;
|
|
3019
3057
|
let organizationAgentId;
|
|
@@ -3029,12 +3067,12 @@ export async function verifyAgentFabricSkillInstallation(input) {
|
|
|
3029
3067
|
const activeBundleId = workspaceId && organizationAgentId && config
|
|
3030
3068
|
? (await activeSkillAuthorization(input.provider, workspaceId, organizationAgentId, config))?.bundleId ?? null
|
|
3031
3069
|
: null;
|
|
3032
|
-
let activationAttested = input.provider
|
|
3033
|
-
if (input.provider
|
|
3070
|
+
let activationAttested = !['agy', 'hermes'].includes(input.provider) ? nativeInstalled : false;
|
|
3071
|
+
if (['agy', 'hermes'].includes(input.provider) && activeBundleId && workspaceId) {
|
|
3034
3072
|
try {
|
|
3035
3073
|
const receipt = JSON.parse(await readFile(resolve(nativeRoot, '.dharma-managed', 'workspaces', workspaceId, 'active', 'INSTALL_RECEIPT.json'), 'utf8'));
|
|
3036
3074
|
activationAttested = Array.isArray(receipt.checks) && receipt.checks.some((item) => (item && typeof item === 'object'
|
|
3037
|
-
&& item.name ===
|
|
3075
|
+
&& item.name === `provider:${input.provider}:activation`
|
|
3038
3076
|
&& item.status === 'pass'));
|
|
3039
3077
|
}
|
|
3040
3078
|
catch { }
|
|
@@ -3059,9 +3097,54 @@ export async function verifyAgentFabricSkillInstallation(input) {
|
|
|
3059
3097
|
activation: input.provider === 'agy' ? (activationAttested ? 'attested' : 'manual_invocation_required') : 'next_session',
|
|
3060
3098
|
nextAction: input.provider === 'agy' && bootstrapReady && !activationAttested
|
|
3061
3099
|
? 'The Agy bootstrap is installed and discoverable. A signed remediation bundle must include and pass the content-bound activation challenge before full lifecycle support is reported.'
|
|
3062
|
-
: bootstrapReady
|
|
3063
|
-
?
|
|
3064
|
-
:
|
|
3100
|
+
: input.provider === 'hermes' && bootstrapReady && !activationAttested
|
|
3101
|
+
? 'The Hermes bootstrap is installed, the project is trusted, and the skill is discoverable. A signed remediation bundle must pass Hermes discovery before full lifecycle support is reported.'
|
|
3102
|
+
: bootstrapReady
|
|
3103
|
+
? `Start a new ${input.provider} session from ${workspace} and invoke the dharma-agent-fabric skill.`
|
|
3104
|
+
: 'Run dharma onboard again from the repository root.',
|
|
3105
|
+
};
|
|
3106
|
+
}
|
|
3107
|
+
export async function attestHermesSkillBundleActivation(input) {
|
|
3108
|
+
if (input.bundle.skills.length === 0) {
|
|
3109
|
+
return {
|
|
3110
|
+
name: 'provider:hermes:activation',
|
|
3111
|
+
status: 'unavailable',
|
|
3112
|
+
details: 'The signed bundle contains no Hermes skill content to discover.',
|
|
3113
|
+
};
|
|
3114
|
+
}
|
|
3115
|
+
const workspace = await realpath(input.workspace);
|
|
3116
|
+
const execute = input.execute || ((executable, argv, options) => execFileAsync(executable, argv, options));
|
|
3117
|
+
await trustHermesProject({ workspace, env: input.env, execute });
|
|
3118
|
+
let stdout;
|
|
3119
|
+
try {
|
|
3120
|
+
({ stdout } = await execute('hermes', ['skills', 'list', '--source', 'local', '--enabled-only'], {
|
|
3121
|
+
timeout: 30_000,
|
|
3122
|
+
env: providerProcessEnvironment(input.env),
|
|
3123
|
+
cwd: workspace,
|
|
3124
|
+
}));
|
|
3125
|
+
}
|
|
3126
|
+
catch (error) {
|
|
3127
|
+
return {
|
|
3128
|
+
name: 'provider:hermes:activation',
|
|
3129
|
+
status: 'fail',
|
|
3130
|
+
details: error instanceof Error ? `Hermes skill discovery failed: ${error.message}`.slice(0, 1_000) : 'Hermes skill discovery failed.',
|
|
3131
|
+
};
|
|
3132
|
+
}
|
|
3133
|
+
const listing = String(stdout || '');
|
|
3134
|
+
const missing = input.bundle.skills
|
|
3135
|
+
.map((skill) => skill.skillId)
|
|
3136
|
+
.filter((skillId) => !listing.includes(skillId));
|
|
3137
|
+
if (missing.length) {
|
|
3138
|
+
return {
|
|
3139
|
+
name: 'provider:hermes:activation',
|
|
3140
|
+
status: 'fail',
|
|
3141
|
+
details: `Hermes did not discover the installed signed skill${missing.length === 1 ? '' : 's'}: ${missing.join(', ')}`,
|
|
3142
|
+
};
|
|
3143
|
+
}
|
|
3144
|
+
return {
|
|
3145
|
+
name: 'provider:hermes:activation',
|
|
3146
|
+
status: 'pass',
|
|
3147
|
+
details: `Hermes discovered ${input.bundle.skills.length} installed signed skill${input.bundle.skills.length === 1 ? '' : 's'} in the trusted workspace.`,
|
|
3065
3148
|
};
|
|
3066
3149
|
}
|
|
3067
3150
|
export async function activateAgyPlugin(input = {}) {
|
|
@@ -3288,8 +3371,8 @@ export async function installedBundleIdForSkillPollAfterAuthorizationFailure(inp
|
|
|
3288
3371
|
async function skillSync(flags) {
|
|
3289
3372
|
const workspaceId = required(flags, 'workspace-id');
|
|
3290
3373
|
const providerValue = required(flags, 'provider');
|
|
3291
|
-
if (!
|
|
3292
|
-
throw new Error('Skill provider must be codex, claude, or
|
|
3374
|
+
if (!isLocalProviderId(providerValue))
|
|
3375
|
+
throw new Error('Skill provider must be codex, claude, agy, or hermes.');
|
|
3293
3376
|
const provider = providerValue;
|
|
3294
3377
|
return withWorkspaceSkillActivationLock(workspaceId, provider, async () => {
|
|
3295
3378
|
const workspace = (await registry()).find((item) => item.workspaceId === workspaceId);
|
|
@@ -3382,6 +3465,11 @@ async function skillSync(flags) {
|
|
|
3382
3465
|
nativeSkillDirectory: destination,
|
|
3383
3466
|
workspace: workspace.path,
|
|
3384
3467
|
}),
|
|
3468
|
+
} : provider === 'hermes' ? {
|
|
3469
|
+
providerActivationCheck: () => attestHermesSkillBundleActivation({
|
|
3470
|
+
bundle,
|
|
3471
|
+
workspace: workspace.path,
|
|
3472
|
+
}),
|
|
3385
3473
|
} : {}),
|
|
3386
3474
|
});
|
|
3387
3475
|
const restoreAnchor = async () => {
|
|
@@ -3606,8 +3694,8 @@ export async function run(argv) {
|
|
|
3606
3694
|
return skillSync(flags);
|
|
3607
3695
|
if (command === 'skills' && subcommand === 'status') {
|
|
3608
3696
|
const providerValue = required(flags, 'provider');
|
|
3609
|
-
if (!
|
|
3610
|
-
throw new Error('Skill provider must be codex, claude, or
|
|
3697
|
+
if (!isLocalProviderId(providerValue))
|
|
3698
|
+
throw new Error('Skill provider must be codex, claude, agy, or hermes.');
|
|
3611
3699
|
const root = nativeSkillDirectory(providerValue);
|
|
3612
3700
|
const workspaceId = required(flags, 'workspace-id');
|
|
3613
3701
|
const config = JSON.parse(await readFile(configPath(), 'utf8'));
|
|
@@ -3623,8 +3711,8 @@ export async function run(argv) {
|
|
|
3623
3711
|
}
|
|
3624
3712
|
if (command === 'skills' && subcommand === 'verify') {
|
|
3625
3713
|
const providerValue = required(flags, 'provider');
|
|
3626
|
-
if (!
|
|
3627
|
-
throw new Error('Skill provider must be codex, claude, or
|
|
3714
|
+
if (!isLocalProviderId(providerValue))
|
|
3715
|
+
throw new Error('Skill provider must be codex, claude, agy, or hermes.');
|
|
3628
3716
|
const result = await verifyAgentFabricSkillInstallation({
|
|
3629
3717
|
provider: providerValue,
|
|
3630
3718
|
workspace: String(flags.get('workspace') || '.'),
|