@hasna/skills 0.9.2 → 0.9.3
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 +10 -7
- package/bin/maintenance.js +4913 -0
- package/bin/mcp.js +3 -2
- package/bin/migrate.js +55 -2
- package/bin/server.js +173 -10
- package/bin/worker.js +173 -10
- package/dist/index.js +8 -5
- package/dist/lib/agent-integration.d.ts +1 -0
- package/dist/lib/codex-hook-rpc.d.ts +1 -1
- package/dist/sdk/index.js +178 -13
- package/dist/server/maintenance-entry.d.ts +2 -0
- package/dist/server/maintenance.d.ts +1 -0
- package/dist/server/sqlite-store.d.ts +3 -1
- package/dist/server/store.d.ts +7 -1
- package/dist/server/types.d.ts +44 -0
- package/migrations/postgres/0005_operator_scope_receipts.sql +9 -0
- package/migrations/sqlite/0005_operator_scope_receipts.sql +7 -0
- package/package.json +3 -2
package/bin/index.js
CHANGED
|
@@ -36868,7 +36868,7 @@ var package_default;
|
|
|
36868
36868
|
var init_package = __esm(() => {
|
|
36869
36869
|
package_default = {
|
|
36870
36870
|
name: "@hasna/skills",
|
|
36871
|
-
version: "0.9.
|
|
36871
|
+
version: "0.9.3",
|
|
36872
36872
|
description: "Skills library for AI coding agents",
|
|
36873
36873
|
type: "module",
|
|
36874
36874
|
bin: {
|
|
@@ -36877,6 +36877,7 @@ var init_package = __esm(() => {
|
|
|
36877
36877
|
"skills-serve": "bin/server.js",
|
|
36878
36878
|
"skills-server": "bin/server.js",
|
|
36879
36879
|
"skills-worker": "bin/worker.js",
|
|
36880
|
+
"skills-maintenance": "bin/maintenance.js",
|
|
36880
36881
|
"skills-migrate": "bin/migrate.js"
|
|
36881
36882
|
},
|
|
36882
36883
|
exports: {
|
|
@@ -36917,7 +36918,7 @@ var init_package = __esm(() => {
|
|
|
36917
36918
|
types: "./dist/index.d.ts",
|
|
36918
36919
|
scripts: {
|
|
36919
36920
|
clean: "rm -rf bin/ dist/",
|
|
36920
|
-
build: "bun run clean && bun build ./src/cli/index.tsx --outdir ./bin --target bun && bun build ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build ./src/server/migrate.ts --outfile ./bin/migrate.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",
|
|
36921
|
+
build: "bun run clean && bun build ./src/cli/index.tsx --outdir ./bin --target bun && bun build ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build ./src/server/index.ts --outfile ./bin/server.js --target bun && bun build ./src/server/worker.ts --outfile ./bin/worker.js --target bun && bun build ./src/server/migrate.ts --outfile ./bin/migrate.js --target bun && bun build ./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",
|
|
36921
36922
|
"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",
|
|
36922
36923
|
test: "bun test --timeout 30000",
|
|
36923
36924
|
dev: "bun run ./src/cli/index.tsx",
|
|
@@ -55451,10 +55452,12 @@ function projectAncestorDirectories(projects) {
|
|
|
55451
55452
|
}
|
|
55452
55453
|
function inventoryNativeSkills(home = homedir4(), options = {}) {
|
|
55453
55454
|
const aliases = rootAliases(home, options.allowRootAliases);
|
|
55454
|
-
const
|
|
55455
|
+
const selectedAgents = options.agents ? new Set(options.agents) : undefined;
|
|
55456
|
+
const rootDefinitions = selectedAgents ? ROOTS.filter(([agent, path]) => selectedAgents.has(agent) || selectedAgents.has("hermes") && agent === "codex" && path === ".agents/skills") : ROOTS;
|
|
55457
|
+
const roots = rootDefinitions.map(([agent, path]) => [agent, canonicalAgentPath(join29(home, path), aliases)]);
|
|
55455
55458
|
const bridgePaths = Object.values(AGENT_ADAPTERS).map((adapter) => canonicalAgentPath(join29(home, adapter.root, CLI_BRIDGE_NAME), aliases));
|
|
55456
55459
|
for (const project of projectAncestorDirectories([...options.projectDirs ?? [], ...options.projectDir ? [options.projectDir] : []])) {
|
|
55457
|
-
for (const [agent, path] of
|
|
55460
|
+
for (const [agent, path] of rootDefinitions)
|
|
55458
55461
|
roots.push([agent, canonicalAgentPath(join29(project, path), aliases)]);
|
|
55459
55462
|
}
|
|
55460
55463
|
const entries = [], seen = new Set;
|
|
@@ -55710,7 +55713,7 @@ function planAgentIntegration(options) {
|
|
|
55710
55713
|
return [agent, { command, profileId: profileId2 }];
|
|
55711
55714
|
}));
|
|
55712
55715
|
const discoveries = [...new Set(options.agents)].map((agent) => resolveAgentDiscovery({ home, agent, reviewed: options.discoveryInputs, canonical: (path) => canonicalAgentPath(path, aliases) }));
|
|
55713
|
-
const nativeSkills = inventoryNativeSkills(home, { includeVendor: true, guardHermes: options.agents.includes("hermes"), projectDir: options.projectDir, agentRoots: discoveries.flatMap((binding) => binding.roots.map((path) => ({ agent: binding.agent, path }))), allowRootAliases: options.allowRootAliases });
|
|
55716
|
+
const nativeSkills = inventoryNativeSkills(home, { includeVendor: true, guardHermes: options.agents.includes("hermes"), agents: options.agents, projectDir: options.projectDir, agentRoots: discoveries.flatMap((binding) => binding.roots.map((path) => ({ agent: binding.agent, path }))), allowRootAliases: options.allowRootAliases });
|
|
55714
55717
|
const changes = [];
|
|
55715
55718
|
for (const agent of [...new Set(options.agents)]) {
|
|
55716
55719
|
if (!INTEGRATION_AGENTS.includes(agent))
|
|
@@ -56110,7 +56113,7 @@ function assertManagedAgentBridge(agent, options = {}) {
|
|
|
56110
56113
|
} catch (error) {
|
|
56111
56114
|
throw new Error(`NATIVE_SKILL_DRIFT: ${error.message}`);
|
|
56112
56115
|
}
|
|
56113
|
-
const inventory = inventoryNativeSkills(home, { includeVendor: true, guardHermes: agent === "hermes", projectDirs: [...roots], agentRoots: discovery.roots.map((path) => ({ agent, path })), allowRootAliases: aliases.length > 0 });
|
|
56116
|
+
const inventory = inventoryNativeSkills(home, { includeVendor: true, guardHermes: agent === "hermes", agents: [agent], projectDirs: [...roots], agentRoots: discovery.roots.map((path) => ({ agent, path })), allowRootAliases: aliases.length > 0 });
|
|
56114
56117
|
const unexpected = inventory.filter((entry) => visible(entry) && !entry.bridge && !disabledBuiltin(entry));
|
|
56115
56118
|
if (unexpected.length) {
|
|
56116
56119
|
const paths = unexpected.slice(0, 3).map((entry) => {
|
|
@@ -108021,7 +108024,7 @@ async function connectCodexHookRpc(options) {
|
|
|
108021
108024
|
}
|
|
108022
108025
|
var SUPPORTED_CODEX_HOOK_VERSIONS;
|
|
108023
108026
|
var init_codex_hook_rpc = __esm(() => {
|
|
108024
|
-
SUPPORTED_CODEX_HOOK_VERSIONS = ["codex-cli 0.153.0", "codex-cli 0.154.0", "codex-cli 0.155.0"];
|
|
108027
|
+
SUPPORTED_CODEX_HOOK_VERSIONS = ["codex-cli 0.153.0", "codex-cli 0.154.0", "codex-cli 0.155.0", "codex-cli 0.155.1"];
|
|
108025
108028
|
});
|
|
108026
108029
|
|
|
108027
108030
|
// src/lib/codex-hook-trust-layout.ts
|