@hasna/skills 0.9.11 → 0.9.12
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 +67 -0
- package/bin/index.js +17043 -16822
- package/bin/mcp.js +11574 -9832
- package/bin/migrate.js +1 -1
- package/bin/server.js +1 -1
- package/bin/worker.js +1 -1
- package/dist/cli/commands/profile-sync.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7917 -7530
- package/dist/lib/agent-codex-trust.d.ts +15 -0
- package/dist/lib/agent-discovery.d.ts +1 -0
- package/dist/lib/agent-integration.d.ts +15 -0
- package/dist/lib/authoring-path.d.ts +10 -0
- package/dist/lib/claude-settings-witness.d.ts +6 -0
- package/dist/lib/codex-hook-additions-review.d.ts +42 -0
- package/dist/lib/native-discovery-roots.d.ts +2 -0
- package/dist/sdk/index.js +779 -395
- package/docs/skill-standard.md +7 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { connectCodexHookRpc } from "./codex-hook-rpc.js";
|
|
2
2
|
import { type ReviewedSkillsCli } from "./codex-hook-trust-identity.js";
|
|
3
3
|
import { type ClaudeDiscoveryRecovery } from "./codex-hook-policy-recovery.js";
|
|
4
|
+
import { type NativeHookAdditionsRecovery } from "./codex-hook-additions-review.js";
|
|
4
5
|
export interface CodexNativeHookTrustOptions {
|
|
5
6
|
home?: string;
|
|
6
7
|
dataDir?: string;
|
|
@@ -26,6 +27,7 @@ export interface CodexNativeHookReconcileOptions {
|
|
|
26
27
|
releaseProof?: SkillsCliReleaseProof;
|
|
27
28
|
supersedeBinding?: boolean;
|
|
28
29
|
claudeDiscoveryRecovery?: ClaudeDiscoveryRecovery;
|
|
30
|
+
nativeHookAdditionsRecovery?: NativeHookAdditionsRecovery;
|
|
29
31
|
}
|
|
30
32
|
type Connect = typeof connectCodexHookRpc;
|
|
31
33
|
/** Resolve an interrupted native write only after the native consumer and every
|
|
@@ -58,6 +60,19 @@ export declare function reconcileCodexNativeHooks(options: CodexNativeHookReconc
|
|
|
58
60
|
manifestSha256: string;
|
|
59
61
|
};
|
|
60
62
|
releaseProof: SkillsCliReleaseProof | undefined;
|
|
63
|
+
nativeHookAdditions?: {
|
|
64
|
+
reviewPath: string;
|
|
65
|
+
reviewSha256: string;
|
|
66
|
+
reason: string;
|
|
67
|
+
producerEvidence: string;
|
|
68
|
+
producerBefore: {
|
|
69
|
+
configPath: string;
|
|
70
|
+
configSha256: string;
|
|
71
|
+
hooksPath: string;
|
|
72
|
+
hooksSha256: string;
|
|
73
|
+
};
|
|
74
|
+
additions: any[];
|
|
75
|
+
} | undefined;
|
|
61
76
|
configDiscoveryRecovery?: import("./codex-hook-discovery-recovery.js").CodexHookDiscoveryRecovery | undefined;
|
|
62
77
|
version: number;
|
|
63
78
|
kind: string;
|
|
@@ -41,6 +41,7 @@ export declare function captureDiscoveryPathSources(paths: string[]): DiscoveryS
|
|
|
41
41
|
export declare function assertProjectDiscovery(agent: IntegrationAgent, directories: string[], home: string, canonical?: (path: string) => string, reviewed?: AgentDiscoveryBinding): void;
|
|
42
42
|
/** Resolve configured plugin discovery without starting an agent or loading a plugin.
|
|
43
43
|
* Unknown runtime registrations require explicit reviewed inputs, never a cache guess. */
|
|
44
|
+
export declare function agentDiscoveryConfigPath(home: string, agent: IntegrationAgent): string;
|
|
44
45
|
export declare function resolveAgentDiscovery(options: {
|
|
45
46
|
home: string;
|
|
46
47
|
agent: IntegrationAgent;
|
|
@@ -51,6 +51,10 @@ export interface AgentIntegrationPlan {
|
|
|
51
51
|
discoveryBefore?: AgentDiscoveryBinding[];
|
|
52
52
|
discoveryAfter?: AgentDiscoveryBinding[];
|
|
53
53
|
rootAliases?: AgentRootAlias[];
|
|
54
|
+
managedAgentChecks?: {
|
|
55
|
+
home: string;
|
|
56
|
+
agents: IntegrationAgent[];
|
|
57
|
+
};
|
|
54
58
|
}
|
|
55
59
|
/** Parse the reviewed exact-target binding used by native migration. Paths are
|
|
56
60
|
* deliberately project-relative so a manifest cannot silently select another
|
|
@@ -87,6 +91,17 @@ export declare function planAgentIntegration(options: {
|
|
|
87
91
|
discoveryInputs?: ReviewedDiscoveryInputs;
|
|
88
92
|
allowRootAliases?: boolean;
|
|
89
93
|
}): AgentIntegrationPlan;
|
|
94
|
+
/** Plan an explicitly authorized Stop hook replacement without adopting drift.
|
|
95
|
+
* The caller owns authorization of its exact Stop hook delta; Skills refuses
|
|
96
|
+
* every other settings change and owns discovery witnesses and guarded writes.
|
|
97
|
+
* No policy means this installer has no Skills integration to update.
|
|
98
|
+
*/
|
|
99
|
+
export declare function planClaudeStopHookUpdate(options: {
|
|
100
|
+
home?: string;
|
|
101
|
+
dataDir?: string;
|
|
102
|
+
expectedSettingsSha256: string;
|
|
103
|
+
replacement: string;
|
|
104
|
+
}): AgentIntegrationPlan | null;
|
|
90
105
|
export declare function applyAgentIntegration(plan: AgentIntegrationPlan): {
|
|
91
106
|
changed: string[];
|
|
92
107
|
backups: string[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface PortableAuthoringPathOptions {
|
|
2
|
+
/** The account whose native discovery must remain free of authored payloads. */
|
|
3
|
+
homeDir?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Refuse a write target that is, or physically aliases, an agent discovery
|
|
7
|
+
* root. Read-only inventory and archive operations deliberately do not call
|
|
8
|
+
* this guard; they must remain able to inspect and migrate native copies.
|
|
9
|
+
*/
|
|
10
|
+
export declare function assertPortableAuthoringPath(path: string, options?: PortableAuthoringPathOptions): void;
|
|
@@ -9,6 +9,12 @@ export declare const CLAUDE_SETTINGS_WITNESS_LIMITS: Readonly<{
|
|
|
9
9
|
export interface ClaudeSettingsWitnessBudget {
|
|
10
10
|
remaining: number;
|
|
11
11
|
}
|
|
12
|
+
/** Cooperating installers may replace Stop only. Compare the strict syntax
|
|
13
|
+
* trees, not JSON.parse values or the preference-tolerant witness digest: all
|
|
14
|
+
* other hooks, discovery settings, unknown values and number spellings remain
|
|
15
|
+
* identical. Whitespace and object-key order have no configuration meaning.
|
|
16
|
+
*/
|
|
17
|
+
export declare function assertClaudeStopHookReplacement(before: string | null, replacement: string): void;
|
|
12
18
|
/** Hash only reviewed installer-rendered settings after the disk preimage has been verified. */
|
|
13
19
|
export declare function hashClaudeSettingsReplacement(text: string, budget: ClaudeSettingsWitnessBudget): string;
|
|
14
20
|
/** Explicit capture never converts a stored legacy raw witness or changes settings. */
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { snapshot } from "./codex-hook-trust-files.js";
|
|
2
|
+
type Snapshot = ReturnType<typeof snapshot>;
|
|
3
|
+
export interface NativeHookAdditionsRecovery {
|
|
4
|
+
path: string;
|
|
5
|
+
reviewedPlanDigest?: string;
|
|
6
|
+
}
|
|
7
|
+
/** An explicit, private review of a later producer's append-only hook change.
|
|
8
|
+
* The producer backups must themselves describe exactly the completed journal
|
|
9
|
+
* operation. Neither a claimed receipt nor a matching raw hash grants authority
|
|
10
|
+
* to replace an original hook or accept unrelated configuration changes. */
|
|
11
|
+
export declare function reviewNativeHookAdditions(options: {
|
|
12
|
+
path: string;
|
|
13
|
+
intent: Snapshot;
|
|
14
|
+
policy: Snapshot;
|
|
15
|
+
configBefore: Snapshot;
|
|
16
|
+
configCurrent: Snapshot;
|
|
17
|
+
hooksBefore: Snapshot;
|
|
18
|
+
hooksCurrent: Snapshot;
|
|
19
|
+
nativeHooksPath: string;
|
|
20
|
+
journalHooks: Array<{
|
|
21
|
+
key: string;
|
|
22
|
+
currentHash: string;
|
|
23
|
+
}>;
|
|
24
|
+
recordedNativeHooks: any[];
|
|
25
|
+
}): {
|
|
26
|
+
hooks: any[];
|
|
27
|
+
recheck: () => void;
|
|
28
|
+
receipt: {
|
|
29
|
+
reviewPath: string;
|
|
30
|
+
reviewSha256: string;
|
|
31
|
+
reason: string;
|
|
32
|
+
producerEvidence: string;
|
|
33
|
+
producerBefore: {
|
|
34
|
+
configPath: string;
|
|
35
|
+
configSha256: string;
|
|
36
|
+
hooksPath: string;
|
|
37
|
+
hooksSha256: string;
|
|
38
|
+
};
|
|
39
|
+
additions: any[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** Shared default discovery roots for inventory and authoring exclusion. */
|
|
2
|
+
export declare const NATIVE_SKILL_ROOTS: readonly [readonly ["claude", ".claude/skills"], readonly ["codex", ".codex/skills"], readonly ["codex", ".agents/skills"], readonly ["gemini", ".gemini/skills"], readonly ["codewith", ".codewith/skills"], readonly ["opencode", ".config/opencode/skills"], readonly ["opencode", ".opencode/skills"], readonly ["cursor", ".cursor/skills"], readonly ["hermes", ".hermes/skills"], readonly ["windsurf", ".windsurf/skills"], readonly ["pi", ".pi/agent/skills"], readonly ["amp", ".amp/skills"], readonly ["cline", ".cline/skills"], readonly ["roo", ".roo/skills"], readonly ["copilot", ".github/skills"]];
|