@hasna/skills 0.10.59 → 0.10.61

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/migrate.js CHANGED
@@ -25,7 +25,7 @@ import { join as join5 } from "path";
25
25
  // package.json
26
26
  var package_default = {
27
27
  name: "@hasna/skills",
28
- version: "0.10.59",
28
+ version: "0.10.61",
29
29
  description: "Skills library for AI coding agents",
30
30
  type: "module",
31
31
  bin: {
@@ -62,6 +62,7 @@ var package_default = {
62
62
  "!dist/test-preload.d.ts",
63
63
  "!dist/platform",
64
64
  "bin/",
65
+ "native/kernel-lock-acl-darwin",
65
66
  "migrations/",
66
67
  "docs/skill-standard.md",
67
68
  "docs/plugin-admission.md",
@@ -75,8 +76,8 @@ var package_default = {
75
76
  types: "./dist/index.d.ts",
76
77
  scripts: {
77
78
  clean: "rm -rf bin/ dist/",
78
- build: "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @hasna/contracts/kernel-lock ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
79
- "build:js": "rm -rf dist && bun build --external @hasna/contracts/kernel-lock ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
79
+ build: "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @modelcontextprotocol/sdk ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
80
+ "build:js": "rm -rf dist && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
80
81
  test: "bun test --timeout 30000",
81
82
  dev: "bun run ./src/cli/index.tsx",
82
83
  "dev:watch": "bun --watch run ./src/cli/index.tsx",
@@ -210,7 +211,7 @@ function resolveServerConfig(env = process.env) {
210
211
  return {
211
212
  host,
212
213
  port,
213
- databaseUrl: env[DATABASE_URL_ENV] || env.DATABASE_URL || undefined,
214
+ databaseUrl: env[DATABASE_URL_ENV] || env.SKILLS_DATABASE_URL || env.DATABASE_URL || undefined,
214
215
  bootstrapApiKey: env.HASNA_SKILLS_BOOTSTRAP_API_KEY || undefined,
215
216
  artifactBucket: env.HASNA_SKILLS_S3_BUCKET || env.SKILLS_S3_BUCKET || undefined,
216
217
  artifactPrefix: normalizePrefix(env.HASNA_SKILLS_S3_PREFIX || env.SKILLS_S3_PREFIX || "skills/artifacts"),
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.59",
24143
+ version: "0.10.61",
24144
24144
  description: "Skills library for AI coding agents",
24145
24145
  type: "module",
24146
24146
  bin: {
@@ -24177,6 +24177,7 @@ var package_default = {
24177
24177
  "!dist/test-preload.d.ts",
24178
24178
  "!dist/platform",
24179
24179
  "bin/",
24180
+ "native/kernel-lock-acl-darwin",
24180
24181
  "migrations/",
24181
24182
  "docs/skill-standard.md",
24182
24183
  "docs/plugin-admission.md",
@@ -24190,8 +24191,8 @@ var package_default = {
24190
24191
  types: "./dist/index.d.ts",
24191
24192
  scripts: {
24192
24193
  clean: "rm -rf bin/ dist/",
24193
- build: "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @hasna/contracts/kernel-lock ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
24194
- "build:js": "rm -rf dist && bun build --external @hasna/contracts/kernel-lock ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
24194
+ build: "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @modelcontextprotocol/sdk ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
24195
+ "build:js": "rm -rf dist && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
24195
24196
  test: "bun test --timeout 30000",
24196
24197
  dev: "bun run ./src/cli/index.tsx",
24197
24198
  "dev:watch": "bun --watch run ./src/cli/index.tsx",
@@ -42934,7 +42935,7 @@ function resolveServerConfig(env = process.env) {
42934
42935
  return {
42935
42936
  host,
42936
42937
  port,
42937
- databaseUrl: env[DATABASE_URL_ENV] || env.DATABASE_URL || undefined,
42938
+ databaseUrl: env[DATABASE_URL_ENV] || env.SKILLS_DATABASE_URL || env.DATABASE_URL || undefined,
42938
42939
  bootstrapApiKey: env.HASNA_SKILLS_BOOTSTRAP_API_KEY || undefined,
42939
42940
  artifactBucket: env.HASNA_SKILLS_S3_BUCKET || env.SKILLS_S3_BUCKET || undefined,
42940
42941
  artifactPrefix: normalizePrefix(env.HASNA_SKILLS_S3_PREFIX || env.SKILLS_S3_PREFIX || "skills/artifacts"),
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.59",
24146
+ version: "0.10.61",
24147
24147
  description: "Skills library for AI coding agents",
24148
24148
  type: "module",
24149
24149
  bin: {
@@ -24180,6 +24180,7 @@ var package_default = {
24180
24180
  "!dist/test-preload.d.ts",
24181
24181
  "!dist/platform",
24182
24182
  "bin/",
24183
+ "native/kernel-lock-acl-darwin",
24183
24184
  "migrations/",
24184
24185
  "docs/skill-standard.md",
24185
24186
  "docs/plugin-admission.md",
@@ -24193,8 +24194,8 @@ var package_default = {
24193
24194
  types: "./dist/index.d.ts",
24194
24195
  scripts: {
24195
24196
  clean: "rm -rf bin/ dist/",
24196
- build: "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @hasna/contracts/kernel-lock ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
24197
- "build:js": "rm -rf dist && bun build --external @hasna/contracts/kernel-lock ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
24197
+ build: "bun run clean && bun build --external @hasna/contracts/kernel-lock ./src/cli/index.tsx --outdir ./bin --target bun && bun build --external @modelcontextprotocol/sdk ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build --external @hasna/contracts/kernel-lock ./src/server/maintenance.ts --outfile ./bin/maintenance.js --target bun && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
24198
+ "build:js": "rm -rf dist && bun build ./src/index.ts ./src/storage.ts ./src/sdk/index.ts ./src/admin-contract.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist && bun scripts/stage-kernel-lock-assets.ts",
24198
24199
  test: "bun test --timeout 30000",
24199
24200
  dev: "bun run ./src/cli/index.tsx",
24200
24201
  "dev:watch": "bun --watch run ./src/cli/index.tsx",
@@ -36412,7 +36413,7 @@ function resolveServerConfig(env = process.env) {
36412
36413
  return {
36413
36414
  host,
36414
36415
  port,
36415
- databaseUrl: env[DATABASE_URL_ENV] || env.DATABASE_URL || undefined,
36416
+ databaseUrl: env[DATABASE_URL_ENV] || env.SKILLS_DATABASE_URL || env.DATABASE_URL || undefined,
36416
36417
  bootstrapApiKey: env.HASNA_SKILLS_BOOTSTRAP_API_KEY || undefined,
36417
36418
  artifactBucket: env.HASNA_SKILLS_S3_BUCKET || env.SKILLS_S3_BUCKET || undefined,
36418
36419
  artifactPrefix: normalizePrefix(env.HASNA_SKILLS_S3_PREFIX || env.SKILLS_S3_PREFIX || "skills/artifacts"),
@@ -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;
@@ -1,4 +1,4 @@
1
- export declare const PINNED_LAUNCHER_SCHEMA = "hasna-skills-pinned-launcher-v1";
1
+ export declare const PINNED_LAUNCHER_SCHEMA = "hasna-skills-pinned-launcher-v2";
2
2
  /** The variable the launcher uses to hand the caller's directory to the CLI. */
3
3
  export declare const LAUNCH_CWD_VARIABLE = "HASNA_SKILLS_LAUNCH_CWD";
4
4
  /** Bun runtime flags that remove every working-directory configuration source. */
@@ -7,42 +7,50 @@ export declare const PINNED_LAUNCHER_BUN_FLAGS: readonly ["--config=/dev/null",
7
7
  * Environment names passed through `env -i`, by exact name. Everything else,
8
8
  * including `BUN_*`, `NODE_OPTIONS`, `DYLD_*`, `LD_*` and proxy settings, is
9
9
  * dropped. The handling is total on purpose: a name is either listed here,
10
- * matches a prefix below, or never reaches the runtime.
10
+ * matches a prefix below, and passes the server-owned profile policy.
11
11
  */
12
- export declare const PINNED_LAUNCHER_ENV_NAMES: readonly ["HOME", "PATH", "TMPDIR", "TERM", "TERM_PROGRAM", "TERM_PROGRAM_VERSION", "COLORTERM", "LANG", "USER", "LOGNAME", "SHELL", "TZ", "NO_COLOR", "FORCE_COLOR", "CI", "COLUMNS", "LINES", "EDITOR", "VISUAL", "PAGER", "SSH_AUTH_SOCK", "DATABASE_URL", "TERMINAL_CWD", "CODEX_HOME", "HERMES_HOME", "HERMES_ENABLE_PROJECT_PLUGINS", "HOST", "PORT", "NODE_ENV", "AGENT_ID", "ECS_CONTAINER_METADATA_URI_V4"];
12
+ export declare const PINNED_LAUNCHER_ENV_NAMES: readonly ["HOME", "PATH", "TMPDIR", "TERM", "TERM_PROGRAM", "TERM_PROGRAM_VERSION", "COLORTERM", "LANG", "USER", "LOGNAME", "SHELL", "TZ", "NO_COLOR", "FORCE_COLOR", "CI", "COLUMNS", "LINES", "EDITOR", "VISUAL", "PAGER", "SSH_AUTH_SOCK", "TERMINAL_CWD", "CODEX_HOME", "HERMES_HOME", "HERMES_ENABLE_PROJECT_PLUGINS", "HOST", "PORT", "NODE_ENV", "AGENT_ID", "ECS_CONTAINER_METADATA_URI_V4"];
13
13
  /** Environment name prefixes passed through, for the app's own documented overrides. */
14
14
  export declare const PINNED_LAUNCHER_ENV_PREFIXES: readonly ["HASNA", "SKILLS", "SKILL", "MCP", "XDG", "LC", "AWS"];
15
15
  /** The allowlisted subset of an environment, by the same rule the launcher applies. */
16
- export declare function pinnedLauncherEnvironment(env: Record<string, string | undefined>): Record<string, string>;
16
+ export declare function pinnedLauncherEnvironment(env: Record<string, string | undefined>, profile?: LauncherProfile): Record<string, string>;
17
17
  export type LauncherShape = "symlink" | "pinned";
18
- export interface PinnedLauncherBinding {
18
+ export type LauncherFormat = "v1" | "v2";
19
+ export type LauncherProfile = "client" | "server";
20
+ export interface LauncherMetadata {
21
+ format?: LauncherFormat;
22
+ profile?: LauncherProfile;
23
+ }
24
+ export interface PinnedLauncherBinding extends LauncherMetadata {
19
25
  runtime: string;
20
26
  cwd: string;
21
27
  entry: string;
22
28
  }
29
+ /** Role follows the package's public bin/entry contract, never a path substring. */
30
+ export declare function launcherProfileForBin(name: string, entry: string): LauncherProfile;
23
31
  export type LauncherState = {
24
32
  shape: "symlink";
25
33
  linkTarget: string;
26
34
  target: string;
27
- } | {
35
+ } | ({
28
36
  shape: "pinned";
29
37
  runtime: string;
30
38
  cwd: string;
31
39
  target: string;
32
40
  sha256: string;
33
- };
41
+ } & LauncherMetadata);
34
42
  export type InspectedLauncher = {
35
43
  kind: "symlink";
36
44
  linkTarget: string;
37
45
  target: string;
38
- } | {
46
+ } | ({
39
47
  kind: "pinned";
40
48
  runtime: string;
41
49
  cwd: string;
42
50
  target: string;
43
51
  sha256: string;
44
52
  text: string;
45
- } | {
53
+ } & LauncherMetadata) | {
46
54
  kind: "foreign";
47
55
  };
48
56
  /** The exact launcher text for one Bun binary, trusted directory and entry. Deterministic. */
@@ -76,9 +84,9 @@ export declare function pinnedLauncherText(state: {
76
84
  cwd: string;
77
85
  target: string;
78
86
  sha256: string;
79
- }): string;
87
+ } & LauncherMetadata): string;
80
88
  /** Build the pinned state for an entry under the given Bun binary and trusted directory. */
81
- export declare function pinnedLauncherState(runtime: string, cwd: string, target: string): Extract<LauncherState, {
89
+ export declare function pinnedLauncherState(runtime: string, cwd: string, target: string, metadata?: LauncherMetadata): Extract<LauncherState, {
82
90
  shape: "pinned";
83
91
  }>;
84
92
  /**