@hasna/skills 0.10.60 → 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/README.md +41 -7
- package/bin/index.js +781 -454
- package/bin/mcp.js +18193 -35730
- package/bin/migrate.js +5 -4
- package/bin/server.js +5 -4
- package/bin/worker.js +5 -4
- package/dist/cli/commands/runtime-launcher.d.ts +19 -11
- package/dist/index.js +1577 -999
- package/dist/lib/agent-adapters.d.ts +2 -2
- package/dist/lib/agent-install-selection.d.ts +10 -0
- package/dist/lib/agent-sumi.d.ts +29 -3
- package/dist/lib/kernel-lock-assets.d.ts +2 -0
- package/dist/native/kernel-lock-acl-darwin +0 -0
- package/dist/sdk/index.js +1837 -1259
- package/dist/server/launcher-environment-policy.d.ts +11 -0
- package/native/kernel-lock-acl-darwin +0 -0
- package/package.json +4 -3
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.
|
|
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 @
|
|
79
|
-
"build:js": "rm -rf dist && bun build
|
|
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.
|
|
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 @
|
|
24194
|
-
"build:js": "rm -rf dist && bun build
|
|
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.
|
|
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 @
|
|
24197
|
-
"build:js": "rm -rf dist && bun build
|
|
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"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PINNED_LAUNCHER_SCHEMA = "hasna-skills-pinned-launcher-
|
|
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,
|
|
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", "
|
|
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
|
|
16
|
+
export declare function pinnedLauncherEnvironment(env: Record<string, string | undefined>, profile?: LauncherProfile): Record<string, string>;
|
|
17
17
|
export type LauncherShape = "symlink" | "pinned";
|
|
18
|
-
export
|
|
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
|
/**
|