@hasna/skills 0.10.91 → 0.10.93
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/THIRD_PARTY_NOTICES +1 -1
- package/bin/index.js +1051 -725
- package/bin/mcp.js +333 -46
- package/bin/migrate.js +1 -1
- package/bin/server.js +1 -1
- package/bin/worker.js +1 -1
- package/dist/cli/commands/portable-skills.d.ts +1 -0
- package/dist/index.js +381 -67
- package/dist/lib/agent-discovery.d.ts +27 -1
- package/dist/lib/authoring-path.d.ts +5 -0
- package/dist/lib/linux-access-acl.d.ts +55 -0
- package/dist/runtime-prerequisites.js +1 -1
- package/dist/sdk/index.js +671 -357
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IntegrationAgent } from "./agent-adapters.js";
|
|
2
2
|
import { type DiscoveryDirectory } from "./agent-discovery-directories.js";
|
|
3
3
|
import { type CodexReviewedHookSource } from "./codex-hook-mcp-dependencies.js";
|
|
4
4
|
import { CLAUDE_ORPHAN_MARKER_MODE } from "./claude-plugin-cache-marker.js";
|
|
@@ -65,6 +65,19 @@ export interface AgentDiscoveryBinding {
|
|
|
65
65
|
export declare const DISCOVERY_ROOT_UNRESOLVED = "DISCOVERY_ROOT_UNRESOLVED";
|
|
66
66
|
export declare function discoveryRootUnresolved(agent: IntegrationAgent, command: string, detail: string): Error;
|
|
67
67
|
export declare function isDiscoveryRootUnresolved(error: unknown): error is Error;
|
|
68
|
+
/** A native configuration Skills cannot resolve. The message names the
|
|
69
|
+
* --discovery-inputs option of the native commands that accept it (hook
|
|
70
|
+
* install, migrate native). Portable authoring takes no such option and
|
|
71
|
+
* rewrites the remedy from these fields: `reviewable` marks a hook, plugin hook
|
|
72
|
+
* or plugin option check that a current discovery review satisfies, and
|
|
73
|
+
* `source` names the configuration or hook file it checked (a path only). */
|
|
74
|
+
export declare class NativeDiscoveryUnresolved extends Error {
|
|
75
|
+
readonly agent: IntegrationAgent;
|
|
76
|
+
readonly detail: string;
|
|
77
|
+
source?: string | undefined;
|
|
78
|
+
reviewable: boolean;
|
|
79
|
+
constructor(agent: IntegrationAgent, detail: string, source?: string | undefined);
|
|
80
|
+
}
|
|
68
81
|
/** The runtime executable a discovery review resolved through PATH, with the
|
|
69
82
|
* realpath its launcher led to. The policy stores it beside the binding
|
|
70
83
|
* (bridge.discoveryExecutables), not inside it, so a consumer that compares
|
|
@@ -214,8 +227,21 @@ export declare function resolveAgentDiscoveryExclusionRoots(options: Omit<Discov
|
|
|
214
227
|
retained?: AgentDiscoveryBinding;
|
|
215
228
|
narrowed?: NarrowedWitnessLedger;
|
|
216
229
|
nativeHome?: string;
|
|
230
|
+
managedHook?: ManagedBridgeHook;
|
|
217
231
|
}): readonly string[];
|
|
218
232
|
/** Metadata-only closure of aliases inside the selected native discovery
|
|
219
233
|
* trees. Never search the account generally or load a payload/plugin. Each
|
|
220
234
|
* resolved alias remains excluded while unrelated portable paths stay usable. */
|
|
221
235
|
export declare function nativeDiscoveryAliasTargets(roots: readonly string[], home: string): string[];
|
|
236
|
+
/** The Skills bridge command and selection profile the policy records for an
|
|
237
|
+
* agent (`bridge.commands` and `bridge.profiles`), from which hook install
|
|
238
|
+
* renders its managed hook commands. */
|
|
239
|
+
export interface ManagedBridgeHook {
|
|
240
|
+
command: string;
|
|
241
|
+
profile: string;
|
|
242
|
+
supervisor?: {
|
|
243
|
+
path: string;
|
|
244
|
+
runtime: string;
|
|
245
|
+
sha256: string;
|
|
246
|
+
};
|
|
247
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { NativeDiscoveryUnresolved } from "./agent-discovery.js";
|
|
1
2
|
export interface PortableAuthoringPathOptions {
|
|
2
3
|
/** The account whose native discovery must remain free of authored payloads. */
|
|
3
4
|
homeDir?: string;
|
|
4
5
|
}
|
|
6
|
+
/** The authoring form of a native discovery refusal. Authoring commands take
|
|
7
|
+
* no --discovery-inputs option, so name the command that does, or say that a
|
|
8
|
+
* review does not resolve it. Names and paths only, never file content. */
|
|
9
|
+
export declare function portableAuthoringDiscoveryRefusal(error: NativeDiscoveryUnresolved, destination: string): string;
|
|
5
10
|
/**
|
|
6
11
|
* Refuse a write target that is, or physically aliases, an agent discovery
|
|
7
12
|
* root. Read-only inventory and archive operations deliberately do not call
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linux POSIX ACL absence check (SH-00084).
|
|
3
|
+
*
|
|
4
|
+
* Access ACLs change effective permissions independently of mode and group.
|
|
5
|
+
* The guarded writers do not copy ACLs, so they require verified absence on
|
|
6
|
+
* supported Linux/glibc. A default ACL initializes direct children at
|
|
7
|
+
* creation, not existing descendants: query it only for directories where the
|
|
8
|
+
* caller will create an object.
|
|
9
|
+
*
|
|
10
|
+
* Presence is queried only (size 0); no attribute value is read or copied.
|
|
11
|
+
*
|
|
12
|
+
* errno is thread-local and any later libc call on this thread, or a signal
|
|
13
|
+
* handler that does not preserve it, can overwrite it. The probe therefore:
|
|
14
|
+
* - resets errno before each query where the layer can write it,
|
|
15
|
+
* - reads it as the very next step after the call, with nothing allocated in
|
|
16
|
+
* between (the call returns an immediate number, not a BigInt, and errno is
|
|
17
|
+
* read with bun:ffi's read.i32, which allocates nothing),
|
|
18
|
+
* - re-queries a bounded number of times when the result is -1 with an errno
|
|
19
|
+
* other than the two "absent" answers, since a stray overwrite does not
|
|
20
|
+
* repeat while a genuine failure does. A persistent failure refuses.
|
|
21
|
+
* A result other than -1 (the attribute exists, or an anomalous value) always
|
|
22
|
+
* refuses at once and never depends on errno.
|
|
23
|
+
*/
|
|
24
|
+
/** ENODATA on the asm-generic errno table (Linux x86_64 and aarch64). */
|
|
25
|
+
export declare const LINUX_ENODATA = 61;
|
|
26
|
+
/** EOPNOTSUPP, which glibc also names ENOTSUP, on the asm-generic table. */
|
|
27
|
+
export declare const LINUX_EOPNOTSUPP = 95;
|
|
28
|
+
/** Queries per attribute before an unexplained failure refuses. */
|
|
29
|
+
export declare const LINUX_ACL_QUERY_ATTEMPTS = 4;
|
|
30
|
+
/**
|
|
31
|
+
* Filesystems where an unsupported POSIX ACL attribute means the kernel
|
|
32
|
+
* enforces no ACL at all (support compiled out, or mounted with noacl), so
|
|
33
|
+
* mode and ownership are the whole access model. Network and FUSE filesystems
|
|
34
|
+
* (NFSv4, SMB, 9p, FUSE and others) also answer EOPNOTSUPP while enforcing
|
|
35
|
+
* their own ACLs or server-side access, so they stay unverified.
|
|
36
|
+
*/
|
|
37
|
+
export declare const LINUX_ACL_FREE_WHEN_UNSUPPORTED: ReadonlySet<bigint>;
|
|
38
|
+
/** The raw operations, separable so tests can drive every errno path. */
|
|
39
|
+
export interface LinuxAclProbe {
|
|
40
|
+
/** process.arch of the running binary; only asm-generic errno tables are admitted. */
|
|
41
|
+
readonly arch: string;
|
|
42
|
+
/** Thread-local errno of the calling thread, or null when it cannot be located. */
|
|
43
|
+
readonly errno: {
|
|
44
|
+
get(): number;
|
|
45
|
+
set?(value: number): void;
|
|
46
|
+
} | null;
|
|
47
|
+
/** fgetxattr(fd, name, NULL, 0): the attribute size, or -1. */
|
|
48
|
+
fgetxattr(fd: number, attribute: string): number | bigint;
|
|
49
|
+
/** fstatfs(fd).f_type, or null when fstatfs fails. */
|
|
50
|
+
filesystemType(fd: number): bigint | null;
|
|
51
|
+
}
|
|
52
|
+
/** True only when every queried POSIX ACL attribute is verifiably absent. */
|
|
53
|
+
export declare function linuxAccessAclAbsent(probe: LinuxAclProbe, fd: number, creationParent: boolean): boolean;
|
|
54
|
+
/** Run with the glibc probe; any loading or ABI failure refuses (false). */
|
|
55
|
+
export declare function withGlibcAclProbe(use: (probe: LinuxAclProbe) => boolean): boolean;
|
|
@@ -49,7 +49,7 @@ var __require = import.meta.require;
|
|
|
49
49
|
// src/runtime-prerequisites.ts
|
|
50
50
|
import { isAbsolute as isAbsolute7 } from "path";
|
|
51
51
|
// package.json
|
|
52
|
-
var version = "0.10.
|
|
52
|
+
var version = "0.10.93";
|
|
53
53
|
var package_default = {
|
|
54
54
|
name: "@hasna/skills",
|
|
55
55
|
version,
|