@hasna/skills 0.10.76 → 0.10.77
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 +6 -2
- package/bin/index.js +202 -57
- package/bin/mcp.js +108 -16
- package/bin/migrate.js +1 -1
- package/bin/server.js +36 -33
- package/bin/worker.js +4 -1
- package/dist/index.js +58 -14
- package/dist/lib/auth-store.d.ts +1 -1
- package/dist/lib/codex-plugin-capability-paths.d.ts +31 -0
- package/dist/lib/credential-profile-command.d.ts +5 -0
- package/dist/lib/fleet-credentials.d.ts +11 -5
- package/dist/lib/instance-credentials.d.ts +2 -0
- package/dist/lib/sign-in.d.ts +1 -1
- package/dist/runtime-prerequisites.js +1 -1
- package/dist/sdk/index.js +163 -121
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** The one package-owned definition of the plugin-root locations Codex reads.
|
|
2
|
+
*
|
|
3
|
+
* The vendor-refresh guard (codex-vendor-refresh.ts), the semantic cache
|
|
4
|
+
* witness (codex-semantic-cache-witness.ts) and the reviewed hook dependency
|
|
5
|
+
* closure (codex-hook-mcp-dependencies.ts) all derive their capability rules
|
|
6
|
+
* from these lists, so a location added here reaches every mode at once.
|
|
7
|
+
*/
|
|
8
|
+
/** Manifest locations in a plugin version root, in the order Codex 0.160.0 and
|
|
9
|
+
* later look them up: the Agent Plugins root `plugin.json` first, then the
|
|
10
|
+
* `.codex-plugin`, `.claude-plugin` and `.cursor-plugin` manifests. The first
|
|
11
|
+
* one present is the plugin's manifest. */
|
|
12
|
+
export declare const CODEX_PLUGIN_MANIFEST_LOCATIONS: readonly string[];
|
|
13
|
+
/** The manifest directories among CODEX_PLUGIN_MANIFEST_LOCATIONS. */
|
|
14
|
+
export declare const CODEX_PLUGIN_MANIFEST_DIRECTORIES: readonly string[];
|
|
15
|
+
/** Every direct entry of a plugin version root that carries a capability Codex
|
|
16
|
+
* reads: each manifest location, the default hooks directory and a root hooks
|
|
17
|
+
* file, the MCP and connector declarations, and the default command and agent
|
|
18
|
+
* directories. Spelled in lowercase; compare names through
|
|
19
|
+
* codexPluginRootCapabilityEntry so a case-insensitive file system cannot alias
|
|
20
|
+
* one. */
|
|
21
|
+
export declare const CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES: readonly string[];
|
|
22
|
+
/** Case-insensitive comparison form. Upper- then lower-casing also folds the
|
|
23
|
+
* Kelvin sign, long s and dotless i onto their ASCII letters, so a name a
|
|
24
|
+
* case-insensitive file system could open as a capability entry folds onto it. */
|
|
25
|
+
export declare function foldCodexPluginEntryName(name: string): string;
|
|
26
|
+
/** The lowercase CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES member a directory entry
|
|
27
|
+
* name denotes, matched without regard to case, or null. */
|
|
28
|
+
export declare function codexPluginRootCapabilityEntry(name: string): string | null;
|
|
29
|
+
/** Whether a directory entry name is a skill document (`SKILL.md`), matched
|
|
30
|
+
* without regard to case. */
|
|
31
|
+
export declare function isCodexSkillDocumentName(name: string): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function skillsShellArgument(value: string): string;
|
|
2
|
+
/** Set every supported URL alias consistently for this invocation only. */
|
|
3
|
+
export declare function skillsApiUrlEnvironment(origin: string): string;
|
|
4
|
+
/** Keep copied CLI commands on the credential profile selected by CLI or environment. */
|
|
5
|
+
export declare function skillsProfileCommand(command: string, env?: Record<string, string | undefined>, origin?: string): string;
|
|
@@ -134,7 +134,7 @@ export interface LocalSkillsFleet {
|
|
|
134
134
|
}
|
|
135
135
|
export type SkillsFleet = HostedSkillsFleet | LocalSkillsFleet;
|
|
136
136
|
/** Machine-readable reasons a hosted resolution was refused. */
|
|
137
|
-
export type SkillsFleetErrorCode = "MISSING_API_CREDENTIAL" | "INVALID_API_URL" | "INSTANCE_CREDENTIAL_MISMATCH" | "GATEWAY_AUTH_UNAVAILABLE";
|
|
137
|
+
export type SkillsFleetErrorCode = "MISSING_API_CREDENTIAL" | "INVALID_API_URL" | "INSTANCE_CREDENTIAL_MISMATCH" | "GATEWAY_AUTH_UNAVAILABLE" | "STORED_CREDENTIAL_PROTECTED";
|
|
138
138
|
/**
|
|
139
139
|
* A configured install could not produce a usable hosted client.
|
|
140
140
|
*
|
|
@@ -336,14 +336,17 @@ export interface SignInTarget {
|
|
|
336
336
|
source: string;
|
|
337
337
|
/** Set when an already-resolving credential decided the origin: its source NAME, never a value. */
|
|
338
338
|
credentialSource?: string;
|
|
339
|
+
/** A captured sign-in carries this through approval and persistence. */
|
|
340
|
+
unchanged?: () => void;
|
|
339
341
|
}
|
|
340
342
|
/**
|
|
341
343
|
* The refusal for a sign-in that would target the internal gateway, which has
|
|
342
|
-
* no sign-in service — or null.
|
|
343
|
-
*
|
|
344
|
-
* credential is still configured. Nothing is sent either way.
|
|
344
|
+
* no sign-in service — or null. Use a separate profile for product sign-in,
|
|
345
|
+
* preserving the existing fleet configuration. Nothing is sent either way.
|
|
345
346
|
*/
|
|
346
347
|
export declare function gatewaySignInRefusal(target: SignInTarget): SkillsFleetCredentialError | null;
|
|
348
|
+
/** Refuse before sign-in traffic can replace a selected fleet key or vault reference. */
|
|
349
|
+
export declare function assertSkillsSignInCredentialReplaceable(env?: Env, profile?: string): void;
|
|
347
350
|
/**
|
|
348
351
|
* The authority a SIGN-IN talks to: `skills login`, `skills auth login` /
|
|
349
352
|
* `signup`, and the TUI `/login`. Resolved on its own because signing in is how
|
|
@@ -354,7 +357,8 @@ export declare function gatewaySignInRefusal(target: SignInTarget): SkillsFleetC
|
|
|
354
357
|
* 1. `--url <origin>` — an explicit choice for this sign-in. It is refused when
|
|
355
358
|
* an outranking URL (the environment or the Keychain) names a different
|
|
356
359
|
* instance, because the key it mints would be shadowed the moment it is
|
|
357
|
-
* saved. A URL in the credentials file is
|
|
360
|
+
* saved. A URL in the credentials file is replaceable only when it does
|
|
361
|
+
* not protect a fleet credential or vault reference.
|
|
358
362
|
* 2. a configured URL — environment, profile or credentials file, Keychain.
|
|
359
363
|
* 3. the instance an already-stored credential belongs to. A legacy internal
|
|
360
364
|
* key with no recorded URL belongs to the fleet gateway, so a machine that
|
|
@@ -366,6 +370,8 @@ export declare function gatewaySignInRefusal(target: SignInTarget): SkillsFleetC
|
|
|
366
370
|
* Nothing here sends a request.
|
|
367
371
|
*/
|
|
368
372
|
export declare function resolveSkillsSignInOrigin(env?: Env, options?: SkillsFleetOptions, explicitUrl?: string): SignInTarget;
|
|
373
|
+
/** Retain the selected credential's exact file state across a multi-step sign-in. */
|
|
374
|
+
export declare function captureSkillsSignInTarget(env?: Env, options?: SkillsFleetOptions, explicitUrl?: string): SignInTarget;
|
|
369
375
|
/**
|
|
370
376
|
* The hosted resolution, or throw. Use on every auth and write path.
|
|
371
377
|
*
|
|
@@ -16,4 +16,6 @@ export declare function readSkillsInstanceMetadata(file: string): {
|
|
|
16
16
|
* profile (nothing stored yet, so it may sign in) from a broken selection.
|
|
17
17
|
*/
|
|
18
18
|
export declare function skillsFileHasCredential(file: string): boolean;
|
|
19
|
+
/** A stored vault reference must survive interactive sign-in unchanged. */
|
|
20
|
+
export declare function skillsFileHasVaultReference(file: string): boolean;
|
|
19
21
|
export {};
|
package/dist/lib/sign-in.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export declare function clearPendingDeviceSignIn(env?: Env, origin?: string): vo
|
|
|
119
119
|
* Store the key a sign-in produced, bound to the instance that issued it.
|
|
120
120
|
* A session-only answer (a token, no key) mints a CLI key first.
|
|
121
121
|
*/
|
|
122
|
-
export declare function persistSignIn(result: SignInResult, origin: string, env?: Env, issuedBy?: StoredKeyIssuer): Promise<string>;
|
|
122
|
+
export declare function persistSignIn(result: SignInResult, origin: string, env?: Env, issuedBy?: StoredKeyIssuer, assertUnchanged?: () => void): Promise<string>;
|
|
123
123
|
/**
|
|
124
124
|
* What happened to server-side revocation.
|
|
125
125
|
*
|
|
@@ -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.77";
|
|
53
53
|
var package_default = {
|
|
54
54
|
name: "@hasna/skills",
|
|
55
55
|
version,
|