@hasna/skills 0.10.58 → 0.10.60
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/bin/index.js +1225 -869
- package/bin/mcp.js +1 -1
- package/bin/migrate.js +1 -1
- package/bin/server.js +1 -1
- package/bin/worker.js +1 -1
- package/dist/cli/commands/claude-installer-capture.d.ts +28 -0
- package/dist/index.js +1 -1
- package/dist/lib/claude-plugin-manifest-witness.d.ts +6 -0
- package/dist/lib/claude-prospective-review.d.ts +14 -0
- package/dist/lib/codex-hook-trust-identity.d.ts +22 -0
- package/dist/sdk/index.js +1 -1
- package/docs/plugin-admission.md +52 -1
- package/package.json +1 -1
package/bin/mcp.js
CHANGED
|
@@ -20019,7 +20019,7 @@ var package_default;
|
|
|
20019
20019
|
var init_package = __esm(() => {
|
|
20020
20020
|
package_default = {
|
|
20021
20021
|
name: "@hasna/skills",
|
|
20022
|
-
version: "0.10.
|
|
20022
|
+
version: "0.10.60",
|
|
20023
20023
|
description: "Skills library for AI coding agents",
|
|
20024
20024
|
type: "module",
|
|
20025
20025
|
bin: {
|
package/bin/migrate.js
CHANGED
package/bin/server.js
CHANGED
|
@@ -24140,7 +24140,7 @@ restoreLaunchCwd();
|
|
|
24140
24140
|
// package.json
|
|
24141
24141
|
var package_default = {
|
|
24142
24142
|
name: "@hasna/skills",
|
|
24143
|
-
version: "0.10.
|
|
24143
|
+
version: "0.10.60",
|
|
24144
24144
|
description: "Skills library for AI coding agents",
|
|
24145
24145
|
type: "module",
|
|
24146
24146
|
bin: {
|
package/bin/worker.js
CHANGED
|
@@ -24143,7 +24143,7 @@ import { randomUUID as randomUUID6 } from "crypto";
|
|
|
24143
24143
|
// package.json
|
|
24144
24144
|
var package_default = {
|
|
24145
24145
|
name: "@hasna/skills",
|
|
24146
|
-
version: "0.10.
|
|
24146
|
+
version: "0.10.60",
|
|
24147
24147
|
description: "Skills library for AI coding agents",
|
|
24148
24148
|
type: "module",
|
|
24149
24149
|
bin: {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Execute one fixed, read-only Claude installer witness operation through this installed CLI. */
|
|
2
|
+
export declare function captureClaudeInstallerRequest(requestPath: string): {
|
|
3
|
+
schema: string;
|
|
4
|
+
producer: {
|
|
5
|
+
schema: "skills.cli-producer-identity/v1";
|
|
6
|
+
configuredCommandPath: string;
|
|
7
|
+
physicalLauncher: {
|
|
8
|
+
path: string;
|
|
9
|
+
sha256: string;
|
|
10
|
+
};
|
|
11
|
+
runtimeEntry: {
|
|
12
|
+
path: string;
|
|
13
|
+
sha256: string;
|
|
14
|
+
};
|
|
15
|
+
runtime: {
|
|
16
|
+
path: string;
|
|
17
|
+
sha256: string;
|
|
18
|
+
};
|
|
19
|
+
package: {
|
|
20
|
+
name: "@hasna/skills";
|
|
21
|
+
version: string;
|
|
22
|
+
manifestSha256: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
operation: unknown;
|
|
26
|
+
result: unknown;
|
|
27
|
+
};
|
|
28
|
+
export declare function safeClaudeInstallerCaptureError(error: unknown): string;
|
package/dist/index.js
CHANGED
|
@@ -11834,7 +11834,7 @@ function replaceSkillSession(expected, replacement, plan, options = {}, beforeCo
|
|
|
11834
11834
|
// package.json
|
|
11835
11835
|
var package_default = {
|
|
11836
11836
|
name: "@hasna/skills",
|
|
11837
|
-
version: "0.10.
|
|
11837
|
+
version: "0.10.60",
|
|
11838
11838
|
description: "Skills library for AI coding agents",
|
|
11839
11839
|
type: "module",
|
|
11840
11840
|
bin: {
|
|
@@ -5,5 +5,11 @@ export declare const CLAUDE_PLUGIN_MANIFEST_LIMITS: Readonly<{
|
|
|
5
5
|
stringCharacters: 16384;
|
|
6
6
|
}>;
|
|
7
7
|
export declare function hashClaudePluginManifest(text: string): string;
|
|
8
|
+
/** Capture a canonical plugin.json file without following a link or exposing its contents. */
|
|
9
|
+
export declare function captureClaudePluginManifestFile(path: string): {
|
|
10
|
+
path: string;
|
|
11
|
+
hashMode: "claude-plugin-manifest-v1";
|
|
12
|
+
sha256: string;
|
|
13
|
+
};
|
|
8
14
|
/** Project only the exact raw manifest bytes that the explicit review attested. */
|
|
9
15
|
export declare function projectReviewedClaudePluginManifest(text: string, reviewedSha256: string): string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReviewedDiscoveryInputs } from "./agent-discovery.js";
|
|
2
2
|
export declare const CLAUDE_PROSPECTIVE_REVIEW_SCHEMA: "skills.claude-plugin-prospective-review/v1";
|
|
3
|
+
/** Hash the exact serialized Claude discovery binding used by review requests. */
|
|
4
|
+
export declare function hashClaudeDiscoveryBinding(binding: unknown): string;
|
|
3
5
|
export interface ClaudeProspectiveReviewRequest {
|
|
4
6
|
schema: typeof CLAUDE_PROSPECTIVE_REVIEW_SCHEMA;
|
|
5
7
|
scope: {
|
|
@@ -40,6 +42,7 @@ export interface ClaudeProspectiveReviewRequest {
|
|
|
40
42
|
sha256: string;
|
|
41
43
|
};
|
|
42
44
|
functionHooksEnv?: "1";
|
|
45
|
+
settingsMarketplaceSource?: "directory";
|
|
43
46
|
};
|
|
44
47
|
preimages: {
|
|
45
48
|
settings: {
|
|
@@ -135,6 +138,17 @@ export interface ClaudeProspectiveReviewReceipt {
|
|
|
135
138
|
/** Fingerprint every file byte and directory name under the frozen candidate.
|
|
136
139
|
* Symlinks and special files refuse; the digest binds the complete closure. */
|
|
137
140
|
export declare function captureClaudeProspectiveCandidateClosure(root: string): string;
|
|
141
|
+
/** Read-only capture used by the installed Claude installer bridge. */
|
|
142
|
+
export declare function captureClaudeInstallerCandidate(root: string, policyPath: string): {
|
|
143
|
+
closureSha256: string;
|
|
144
|
+
discoverySha256: string;
|
|
145
|
+
manifests: Array<{
|
|
146
|
+
plugin: string;
|
|
147
|
+
path: string;
|
|
148
|
+
hashMode: "claude-plugin-manifest-v1";
|
|
149
|
+
sha256: string;
|
|
150
|
+
}>;
|
|
151
|
+
};
|
|
138
152
|
/** Validate a frozen candidate review against the current filesystem. This is
|
|
139
153
|
* intentionally a planner only: its receipt is not native-install authority. */
|
|
140
154
|
export declare function reviewClaudeProspectiveCandidate(request: ClaudeProspectiveReviewRequest, requestFileSha256: string): ClaudeProspectiveReviewReceipt;
|
|
@@ -25,3 +25,25 @@ export declare function bindSkillsCli(command: string, reviewed?: ReviewedSkills
|
|
|
25
25
|
};
|
|
26
26
|
recheck(): void;
|
|
27
27
|
};
|
|
28
|
+
/** A bounded, read-only producer identity for commands that must call their configured stable CLI. */
|
|
29
|
+
export declare function captureSkillsCliProducerIdentity(command: string): {
|
|
30
|
+
schema: "skills.cli-producer-identity/v1";
|
|
31
|
+
configuredCommandPath: string;
|
|
32
|
+
physicalLauncher: {
|
|
33
|
+
path: string;
|
|
34
|
+
sha256: string;
|
|
35
|
+
};
|
|
36
|
+
runtimeEntry: {
|
|
37
|
+
path: string;
|
|
38
|
+
sha256: string;
|
|
39
|
+
};
|
|
40
|
+
runtime: {
|
|
41
|
+
path: string;
|
|
42
|
+
sha256: string;
|
|
43
|
+
};
|
|
44
|
+
package: {
|
|
45
|
+
name: "@hasna/skills";
|
|
46
|
+
version: string;
|
|
47
|
+
manifestSha256: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
package/dist/sdk/index.js
CHANGED
|
@@ -32373,7 +32373,7 @@ var init_event_sink = __esm(() => {
|
|
|
32373
32373
|
// package.json
|
|
32374
32374
|
var package_default = {
|
|
32375
32375
|
name: "@hasna/skills",
|
|
32376
|
-
version: "0.10.
|
|
32376
|
+
version: "0.10.60",
|
|
32377
32377
|
description: "Skills library for AI coding agents",
|
|
32378
32378
|
type: "module",
|
|
32379
32379
|
bin: {
|
package/docs/plugin-admission.md
CHANGED
|
@@ -194,7 +194,32 @@ closure. Nontrivial `metadata.pluginRoot` values and native catalog or selected
|
|
|
194
194
|
plugin dependency declarations refuse because this validator does not resolve
|
|
195
195
|
or review unselected external plugins.
|
|
196
196
|
The request may declare `functionHooksEnv: "1"`; without that declaration the
|
|
197
|
-
environment document is preserved unchanged.
|
|
197
|
+
environment document is preserved unchanged. For a measured Claude 2.1.293
|
|
198
|
+
user-scoped install, `candidate.settingsMarketplaceSource: "directory"`
|
|
199
|
+
explicitly declares the native settings registration. Skills derives
|
|
200
|
+
`extraKnownMarketplaces[candidate.marketplace].source` from the exact frozen
|
|
201
|
+
candidate root. The measured operation accepts existing directory sources
|
|
202
|
+
only. Foreign entries may also carry a boolean `autoUpdate`; other metadata
|
|
203
|
+
refuses before writing because the native parser drops unknown fields.
|
|
204
|
+
Selected-entry metadata, including `autoUpdate`, also refuses because this
|
|
205
|
+
Claude release replaces that entire entry. The complete supplied settings
|
|
206
|
+
document must match the derived projection, preserving all foreign entries.
|
|
207
|
+
The same declared operation preflights every authoritative
|
|
208
|
+
`known_marketplaces.json` row: exact `source`, `installLocation`, `lastUpdated`
|
|
209
|
+
and optional boolean `autoUpdate`. Sources are either `{source: "directory",
|
|
210
|
+
path: <normalized absolute path>}` or `{source: "github", repo: "owner/repository"}`.
|
|
211
|
+
Other source keys and row metadata refuse before the native parser can drop them.
|
|
212
|
+
The complete `installed_plugins.json` document must contain only `version` and
|
|
213
|
+
`plugins`. Every existing row, including untouched plugins and other scopes,
|
|
214
|
+
must have `scope`, `installPath`, `version`, `installedAt` and `lastUpdated`,
|
|
215
|
+
with a project path for project/local scope and an optional 40-character
|
|
216
|
+
lowercase hexadecimal `gitCommitSha`. Unsupported metadata or malformed fields
|
|
217
|
+
refuse before installation; supported foreign rows remain exact in the required
|
|
218
|
+
after-document. Existing selected-row restrictions still apply.
|
|
219
|
+
Omission preserves the settings field unchanged; other values, versions and project scope
|
|
220
|
+
refuse. The installer must still verify the actual native executable and
|
|
221
|
+
poststate; a supplied version string does not establish consumer identity.
|
|
222
|
+
The validator shallow-merges
|
|
198
223
|
each declared options patch into the selected plugin's existing `options`;
|
|
199
224
|
the patch must explicitly bind `enabled: true`, and the validator enforces that
|
|
200
225
|
value after merging. This preserves all other selected options and unrelated
|
|
@@ -232,6 +257,32 @@ Installed consumers can use the public `captureClaudeProspectiveCandidateClosure
|
|
|
232
257
|
and `hashClaudePluginManifest` exports to prepare the exact digests without
|
|
233
258
|
copying the package's hashing algorithms.
|
|
234
259
|
|
|
260
|
+
### Claude installer witness CLI
|
|
261
|
+
|
|
262
|
+
The installed Skills command exposes a fixed read-only bridge for installer
|
|
263
|
+
evidence:
|
|
264
|
+
|
|
265
|
+
```text
|
|
266
|
+
skills hook capture-claude-installer --request /absolute/request.json --json
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The UTF-8 request is a bounded JSON object with schema
|
|
270
|
+
`skills.claude-installer-capture/v1`, the exact configured `commandPath`, one
|
|
271
|
+
fixed `operation` (`settings`, `marketplace-registry`, `managed-plugin-registry`,
|
|
272
|
+
`path-bytes`, `discovery-directories`, `plugin-manifest`, or `candidate`), and
|
|
273
|
+
only that operation's documented inputs. The result uses
|
|
274
|
+
`skills.claude-installer-capture-result/v1` and contains a Skills producer
|
|
275
|
+
receipt plus the selected existing witness result. Candidate manifests include
|
|
276
|
+
their plugin name, canonical path, `hashMode: "claude-plugin-manifest-v1"`, and
|
|
277
|
+
SHA-256; the closure and discovery digests use the existing Skills algorithms.
|
|
278
|
+
The command verifies the configured command resolves to this installed
|
|
279
|
+
`@hasna/skills` producer and rechecks producer identity around capture.
|
|
280
|
+
|
|
281
|
+
This command only captures and validates source witnesses. It does not invoke
|
|
282
|
+
Claude, install plugins, mutate settings or policy, authorize a candidate, or
|
|
283
|
+
establish installer atomicity or crash recovery. Input refusals identify the
|
|
284
|
+
fixed field or operation and its accepted form without echoing request contents.
|
|
285
|
+
|
|
235
286
|
## Reviewed plugin-hook attestation scope
|
|
236
287
|
|
|
237
288
|
A reviewed discovery input carries `pluginHooks: "reviewed-no-skill-injection"`.
|