@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
package/bin/mcp.js
CHANGED
|
@@ -23,7 +23,7 @@ var package_default;
|
|
|
23
23
|
var init_package = __esm(() => {
|
|
24
24
|
package_default = {
|
|
25
25
|
name: "@hasna/skills",
|
|
26
|
-
version: "0.10.
|
|
26
|
+
version: "0.10.77",
|
|
27
27
|
description: "Skills library for AI coding agents",
|
|
28
28
|
type: "module",
|
|
29
29
|
bin: {
|
|
@@ -1087,6 +1087,10 @@ function skillsFileHasCredential(file) {
|
|
|
1087
1087
|
return false;
|
|
1088
1088
|
return /^\s*(?:export\s+)?(?:HASNA_SKILLS_API_KEY|SKILLS_API_KEY|HASNA_SKILLS_API_KEY_REF)\s*=\s*\S/m.test(text);
|
|
1089
1089
|
}
|
|
1090
|
+
function skillsFileHasVaultReference(file) {
|
|
1091
|
+
const text = readMetadataText(file);
|
|
1092
|
+
return text !== null && /^\s*(?:export\s+)?HASNA_SKILLS_API_KEY_REF\s*=\s*\S/m.test(text);
|
|
1093
|
+
}
|
|
1090
1094
|
var SKILLS_BOUND_API_URL = "HASNA_SKILLS_BOUND_API_URL";
|
|
1091
1095
|
var init_instance_credentials = __esm(() => {
|
|
1092
1096
|
init_transport();
|
|
@@ -1121,6 +1125,20 @@ var init_local_opt_in = __esm(() => {
|
|
|
1121
1125
|
// src/lib/product-default.ts
|
|
1122
1126
|
var SKILLS_PRODUCT_DEFAULT_ORIGIN = "https://skills.md";
|
|
1123
1127
|
|
|
1128
|
+
// src/lib/credential-profile-command.ts
|
|
1129
|
+
function skillsShellArgument(value) {
|
|
1130
|
+
return /^[A-Za-z0-9._:/-]+$/.test(value) ? value : `'${value.replace(/'/g, "'\\''")}'`;
|
|
1131
|
+
}
|
|
1132
|
+
function skillsApiUrlEnvironment(origin) {
|
|
1133
|
+
return urlKeys.map((name) => `${name}=${skillsShellArgument(origin)}`).join(" ");
|
|
1134
|
+
}
|
|
1135
|
+
var urlKeys;
|
|
1136
|
+
var init_credential_profile_command = __esm(() => {
|
|
1137
|
+
init_instance_credentials();
|
|
1138
|
+
init_transport();
|
|
1139
|
+
urlKeys = clientTransportEnvKeys("skills").apiUrlKeys;
|
|
1140
|
+
});
|
|
1141
|
+
|
|
1124
1142
|
// src/lib/fleet-credentials.ts
|
|
1125
1143
|
var exports_fleet_credentials = {};
|
|
1126
1144
|
__export(exports_fleet_credentials, {
|
|
@@ -1145,6 +1163,8 @@ __export(exports_fleet_credentials, {
|
|
|
1145
1163
|
gatewaySignInRefusal: () => gatewaySignInRefusal,
|
|
1146
1164
|
credentialPairing: () => credentialPairing,
|
|
1147
1165
|
configuredSkillsApiUrl: () => configuredSkillsApiUrl,
|
|
1166
|
+
captureSkillsSignInTarget: () => captureSkillsSignInTarget,
|
|
1167
|
+
assertSkillsSignInCredentialReplaceable: () => assertSkillsSignInCredentialReplaceable,
|
|
1148
1168
|
SkillsFleetCredentialError: () => SkillsFleetCredentialError,
|
|
1149
1169
|
SKILLS_LOCAL_OPT_IN_ENV_KEYS: () => SKILLS_LOCAL_OPT_IN_ENV_KEYS,
|
|
1150
1170
|
SKILLS_CREDENTIAL_TIERS: () => SKILLS_CREDENTIAL_TIERS,
|
|
@@ -1450,8 +1470,24 @@ function gatewaySignInRefusal(target) {
|
|
|
1450
1470
|
if (normalizeSkillsApiOrigin(target.origin) !== normalizeSkillsApiOrigin(defaultFleetGatewayBaseUrl(SKILLS_APP)))
|
|
1451
1471
|
return null;
|
|
1452
1472
|
const cause = target.credentialSource ? `${target.credentialSource} holds a Skills credential for the internal gateway` : target.source === "--url" ? "--url names the internal gateway" : `${target.source} selects the internal gateway`;
|
|
1453
|
-
const
|
|
1454
|
-
return new SkillsFleetCredentialError(`${cause}, which has no sign-in service. Nothing was sent
|
|
1473
|
+
const command = (SKILLS_API_URL_ENV_KEYS.includes(target.source) ? `${skillsApiUrlEnvironment(SKILLS_PRODUCT_DEFAULT_ORIGIN)} ` : "") + "skills --profile <new-profile> login";
|
|
1474
|
+
return new SkillsFleetCredentialError(`${cause}, which has no sign-in service. Nothing was sent. ` + `Keep the fleet configuration and use a separate profile for product sign-in: ${command}.`, "GATEWAY_AUTH_UNAVAILABLE", [command]);
|
|
1475
|
+
}
|
|
1476
|
+
function assertSkillsSignInCredentialReplaceable(env = process.env, profile) {
|
|
1477
|
+
const files = skillsProfileCredentialFiles(env, profile);
|
|
1478
|
+
const verifyUnchanged = captureSkillsCredentialFiles(files);
|
|
1479
|
+
const gateway = normalizeSkillsApiOrigin(defaultFleetGatewayBaseUrl(SKILLS_APP));
|
|
1480
|
+
const command = (SKILLS_API_URL_ENV_KEYS.some((name) => env[name]?.trim()) ? `${skillsApiUrlEnvironment(SKILLS_PRODUCT_DEFAULT_ORIGIN)} ` : "") + "skills --profile <new-profile> login";
|
|
1481
|
+
for (const file of files) {
|
|
1482
|
+
if (!skillsFileHasCredential(file))
|
|
1483
|
+
continue;
|
|
1484
|
+
const metadata = readSkillsInstanceMetadata(file);
|
|
1485
|
+
const instance = metadata.binding ?? metadata.apiUrl;
|
|
1486
|
+
if (skillsFileHasVaultReference(file) || !instance || normalizeSkillsApiOrigin(instance) === gateway) {
|
|
1487
|
+
throw new SkillsFleetCredentialError("The selected profile contains a protected fleet credential or vault reference. Nothing was sent or changed. " + `Use a separate profile for product sign-in: ${command}.`, "STORED_CREDENTIAL_PROTECTED", [command]);
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
verifyUnchanged();
|
|
1455
1491
|
}
|
|
1456
1492
|
function explicitSignInOrigin(url) {
|
|
1457
1493
|
if (!url.trim() || /[\x00-\x1f\x7f]/.test(url)) {
|
|
@@ -1479,13 +1515,15 @@ function resolveSkillsSignInOrigin(env = process.env, options = {}, explicitUrl)
|
|
|
1479
1515
|
const snapshot = snapshotSkillsEnvironment(env);
|
|
1480
1516
|
const resolvedOptions = snapshotSkillsOptions(env, options);
|
|
1481
1517
|
const profile = resolvedOptions.credentials?.profile;
|
|
1518
|
+
assertSkillsSignInCredentialReplaceable(snapshot, profile);
|
|
1482
1519
|
const configured = configuredSkillsApiUrl(snapshot, resolvedOptions.credentials?.keychain, profile);
|
|
1483
1520
|
const declared = configured && configured.source !== "default" ? configured : null;
|
|
1484
1521
|
if (explicitUrl !== undefined) {
|
|
1485
1522
|
const origin = explicitSignInOrigin(explicitUrl);
|
|
1486
1523
|
const storedHere = declared ? skillsProfileCredentialFiles(snapshot, profile).includes(declared.source) : false;
|
|
1487
1524
|
if (declared && !storedHere && normalizeSkillsApiOrigin(declared.value) !== origin) {
|
|
1488
|
-
|
|
1525
|
+
const command = `${skillsApiUrlEnvironment(origin)} skills --profile <new-profile> login`;
|
|
1526
|
+
throw new SkillsFleetCredentialError(`--url ${origin} conflicts with ${declared.source}, which outranks the saved configuration and would ` + `shadow the key this sign-in stores. Keep the existing configuration and use a separate process and profile: ${command}.`, "INVALID_API_URL", [command]);
|
|
1489
1527
|
}
|
|
1490
1528
|
return { origin, source: "--url" };
|
|
1491
1529
|
}
|
|
@@ -1517,6 +1555,14 @@ function resolveSkillsSignInOrigin(env = process.env, options = {}, explicitUrl)
|
|
|
1517
1555
|
throw error;
|
|
1518
1556
|
}
|
|
1519
1557
|
}
|
|
1558
|
+
function captureSkillsSignInTarget(env = process.env, options = {}, explicitUrl) {
|
|
1559
|
+
const snapshot = snapshotSkillsEnvironment(env);
|
|
1560
|
+
const profile = options.credentials?.profile ?? selectedCliSkillsCredentialProfile();
|
|
1561
|
+
const unchanged2 = captureSkillsCredentialFiles(skillsProfileCredentialFiles(snapshot, profile));
|
|
1562
|
+
const target = resolveSkillsSignInOrigin(env, options, explicitUrl);
|
|
1563
|
+
unchanged2();
|
|
1564
|
+
return { ...target, unchanged: unchanged2 };
|
|
1565
|
+
}
|
|
1520
1566
|
function requireSkillsFleet(action = "This command", env = process.env, options = {}) {
|
|
1521
1567
|
const fleet = resolveSkillsFleet(env, options);
|
|
1522
1568
|
if (fleet.mode === "hosted")
|
|
@@ -1528,6 +1574,7 @@ var init_fleet_credentials = __esm(() => {
|
|
|
1528
1574
|
init_transport();
|
|
1529
1575
|
init_instance_credentials();
|
|
1530
1576
|
init_local_opt_in();
|
|
1577
|
+
init_credential_profile_command();
|
|
1531
1578
|
init_local_opt_in();
|
|
1532
1579
|
ENV_KEYS = clientTransportEnvKeys(SKILLS_APP);
|
|
1533
1580
|
SKILLS_API_URL_ENV_KEYS = ENV_KEYS.apiUrlKeys;
|
|
@@ -32251,6 +32298,40 @@ var init_codex_settings_witness_v1 = __esm(() => {
|
|
|
32251
32298
|
VERBOSITY = new Set(["low", "medium", "high"]);
|
|
32252
32299
|
});
|
|
32253
32300
|
|
|
32301
|
+
// src/lib/codex-plugin-capability-paths.ts
|
|
32302
|
+
function foldCodexPluginEntryName(name) {
|
|
32303
|
+
return name.toUpperCase().toLowerCase();
|
|
32304
|
+
}
|
|
32305
|
+
function codexPluginRootCapabilityEntry(name) {
|
|
32306
|
+
const folded = foldCodexPluginEntryName(name);
|
|
32307
|
+
return CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.includes(folded) ? folded : null;
|
|
32308
|
+
}
|
|
32309
|
+
function isCodexSkillDocumentName(name) {
|
|
32310
|
+
return foldCodexPluginEntryName(name) === "skill.md";
|
|
32311
|
+
}
|
|
32312
|
+
var CODEX_PLUGIN_MANIFEST_LOCATIONS, CODEX_PLUGIN_MANIFEST_DIRECTORIES, CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES;
|
|
32313
|
+
var init_codex_plugin_capability_paths = __esm(() => {
|
|
32314
|
+
CODEX_PLUGIN_MANIFEST_LOCATIONS = Object.freeze([
|
|
32315
|
+
"plugin.json",
|
|
32316
|
+
".codex-plugin/plugin.json",
|
|
32317
|
+
".claude-plugin/plugin.json",
|
|
32318
|
+
".cursor-plugin/plugin.json"
|
|
32319
|
+
]);
|
|
32320
|
+
CODEX_PLUGIN_MANIFEST_DIRECTORIES = Object.freeze([".codex-plugin", ".claude-plugin", ".cursor-plugin"]);
|
|
32321
|
+
CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES = Object.freeze([
|
|
32322
|
+
"plugin.json",
|
|
32323
|
+
".codex-plugin",
|
|
32324
|
+
".claude-plugin",
|
|
32325
|
+
".cursor-plugin",
|
|
32326
|
+
"hooks",
|
|
32327
|
+
"hooks.json",
|
|
32328
|
+
".mcp.json",
|
|
32329
|
+
".app.json",
|
|
32330
|
+
"commands",
|
|
32331
|
+
"agents"
|
|
32332
|
+
]);
|
|
32333
|
+
});
|
|
32334
|
+
|
|
32254
32335
|
// src/lib/codex-hook-mcp-dependencies.ts
|
|
32255
32336
|
import { createHash as createHash12 } from "crypto";
|
|
32256
32337
|
import { basename as basename7, dirname as dirname12, isAbsolute as isAbsolute12, join as join16, resolve as resolve11, sep as sep5 } from "path";
|
|
@@ -32395,15 +32476,13 @@ function captureCodexHookMcpDependencies(configPath, reviewed, configText, chang
|
|
|
32395
32476
|
}
|
|
32396
32477
|
};
|
|
32397
32478
|
const root = join16(cacheRoot, identity2, selectCodexPluginVersion(versions2, selectionBudget));
|
|
32398
|
-
const
|
|
32479
|
+
const [agentPluginManifest, ...legacyManifests] = CODEX_PLUGIN_MANIFEST_LOCATIONS;
|
|
32480
|
+
const agent = read(join16(root, agentPluginManifest));
|
|
32399
32481
|
if (agent !== null) {
|
|
32400
32482
|
const schema = JSON.parse(agent).$schema;
|
|
32401
32483
|
need5(typeof schema !== "string" || !schema.startsWith("https://agent-plugins.org/schemas/"));
|
|
32402
32484
|
}
|
|
32403
|
-
const
|
|
32404
|
-
const claude = read(join16(root, ".claude-plugin/plugin.json"));
|
|
32405
|
-
const cursor = read(join16(root, ".cursor-plugin/plugin.json"));
|
|
32406
|
-
const text2 = codex ?? claude ?? cursor;
|
|
32485
|
+
const text2 = legacyManifests.map((location) => read(join16(root, location))).find((value) => value !== null) ?? null;
|
|
32407
32486
|
if (text2 === null)
|
|
32408
32487
|
continue;
|
|
32409
32488
|
const manifest = JSON.parse(text2);
|
|
@@ -32425,6 +32504,7 @@ var init_codex_hook_mcp_dependencies = __esm(() => {
|
|
|
32425
32504
|
init_claude_settings_witness();
|
|
32426
32505
|
init_agent_discovery_directories();
|
|
32427
32506
|
init_agent_discovery_bytes();
|
|
32507
|
+
init_codex_plugin_capability_paths();
|
|
32428
32508
|
events = new Set(["PreToolUse", "PermissionRequest", "PostToolUse", "PreCompact", "PostCompact", "SessionStart", "SessionEnd", "UserPromptSubmit", "SubagentStart", "SubagentStop", "Stop", "Interrupt"]);
|
|
32429
32509
|
});
|
|
32430
32510
|
|
|
@@ -34007,9 +34087,10 @@ var CODEX_VENDOR_MARKETPLACES, CODEX_REMOTE_VENDOR_MARKETPLACES, OTHER_PLUGIN_CO
|
|
|
34007
34087
|
var init_codex_vendor_refresh = __esm(() => {
|
|
34008
34088
|
init_claude_settings_witness();
|
|
34009
34089
|
init_codex_plugin_skill_controls();
|
|
34090
|
+
init_codex_plugin_capability_paths();
|
|
34010
34091
|
CODEX_VENDOR_MARKETPLACES = Object.freeze(["openai-bundled", "openai-curated", "openai-curated-remote"]);
|
|
34011
34092
|
CODEX_REMOTE_VENDOR_MARKETPLACES = Object.freeze(["openai-curated-remote"]);
|
|
34012
|
-
OTHER_PLUGIN_CONTROLS = Object.freeze(
|
|
34093
|
+
OTHER_PLUGIN_CONTROLS = Object.freeze(CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.filter((entry) => entry !== ".codex-plugin" && entry !== ".app.json"));
|
|
34013
34094
|
VENDOR_MANIFEST_KEYS = Object.freeze(["name", "version", "description", "author", "homepage", "repository", "license", "keywords", "interface", "skills", "apps"]);
|
|
34014
34095
|
DEFAULT_SKILLS_PATHS = Object.freeze(["./skills", "./skills/"]);
|
|
34015
34096
|
});
|
|
@@ -35114,14 +35195,23 @@ function assertParents(cacheRoot, controls, appOnlyParents, hookParents, files,
|
|
|
35114
35195
|
continue;
|
|
35115
35196
|
const parent = join21(cacheRoot, parts[0], parts[1]);
|
|
35116
35197
|
const root = join21(parent, parts[2]);
|
|
35117
|
-
const base = parts[parts.length - 1];
|
|
35118
|
-
if (parts.
|
|
35198
|
+
const base = parts[parts.length - 1], folded = foldCodexPluginEntryName(base);
|
|
35199
|
+
if (parts.length === 3 && (codexPluginRootCapabilityEntry(base) !== null || isCodexSkillDocumentName(base)))
|
|
35200
|
+
refuse3();
|
|
35201
|
+
const rootEntry = parts.length >= 4 ? codexPluginRootCapabilityEntry(parts[3]) : null;
|
|
35202
|
+
if (rootEntry !== null && rootEntry !== parts[3])
|
|
35203
|
+
refuse3();
|
|
35204
|
+
if (rootEntry !== null && !SEMANTIC_BOUND_ROOT_ENTRIES.includes(rootEntry))
|
|
35205
|
+
refuse3();
|
|
35206
|
+
if (isCodexSkillDocumentName(base) && base !== "SKILL.md")
|
|
35207
|
+
refuse3();
|
|
35208
|
+
if (parts.some((part) => CODEX_PLUGIN_MANIFEST_DIRECTORIES.includes(foldCodexPluginEntryName(part))) && (parts.length < 4 || parts[3] !== ".codex-plugin" || (parts.length === 4 ? base !== ".codex-plugin" : parts.length !== 5 || base !== "plugin.json")))
|
|
35119
35209
|
refuse3();
|
|
35120
|
-
if ([".app.json", ".mcp.json"].includes(
|
|
35210
|
+
if ([".app.json", ".mcp.json"].includes(folded) && (parts.length !== 4 || dirname16(member) !== root))
|
|
35121
35211
|
refuse3();
|
|
35122
|
-
if ([".app.json", ".mcp.json"].includes(
|
|
35212
|
+
if ([".app.json", ".mcp.json"].includes(folded) && hookParents.some((reviewed) => reviewed.pluginParent === parent))
|
|
35123
35213
|
refuse3();
|
|
35124
|
-
if ((
|
|
35214
|
+
if ((rootEntry === "hooks" || folded === "hooks.json") && (![4, 5].includes(parts.length) || parts[3] !== "hooks" || (parts.length === 4 ? base !== "hooks" : base !== "hooks.json") || !hookParents.some((reviewed) => reviewed.pluginParent === join21(cacheRoot, parts[0], parts[1]))))
|
|
35125
35215
|
refuse3();
|
|
35126
35216
|
}
|
|
35127
35217
|
}
|
|
@@ -35343,13 +35433,15 @@ function assertCodexSemanticCacheWitnessUnchanged(previous, current) {
|
|
|
35343
35433
|
if (hash3(priorProjection) !== previous.sha256 || hash3(currentProjection) !== current.sha256 || canonical8(comparable(priorProjection)) !== canonical8(comparable(currentProjection)))
|
|
35344
35434
|
refuse3();
|
|
35345
35435
|
}
|
|
35346
|
-
var CODEX_SEMANTIC_CACHE_WITNESS_SCHEMA = "hasna.codex-semantic-cache-witness.v1", identifier4 = (value) => typeof value === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(value), digest = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value), refuse3 = () => {
|
|
35436
|
+
var CODEX_SEMANTIC_CACHE_WITNESS_SCHEMA = "hasna.codex-semantic-cache-witness.v1", SEMANTIC_BOUND_ROOT_ENTRIES, identifier4 = (value) => typeof value === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(value), digest = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value), refuse3 = () => {
|
|
35347
35437
|
throw new Error("CODEX_SEMANTIC_CACHE_WITNESS_UNSUPPORTED: review Codex plugin cache identity and controls");
|
|
35348
35438
|
}, MAX_DOCUMENT_BYTES, MAX_RECEIPT_BYTES, codexHookEvents;
|
|
35349
35439
|
var init_codex_semantic_cache_witness = __esm(() => {
|
|
35350
35440
|
init_claude_settings_witness();
|
|
35351
35441
|
init_codex_plugin_skill_controls();
|
|
35352
35442
|
init_codex_native_skill_catalog();
|
|
35443
|
+
init_codex_plugin_capability_paths();
|
|
35444
|
+
SEMANTIC_BOUND_ROOT_ENTRIES = Object.freeze([".codex-plugin", ".app.json", ".mcp.json", "hooks"]);
|
|
35353
35445
|
MAX_DOCUMENT_BYTES = 1024 * 1024;
|
|
35354
35446
|
MAX_RECEIPT_BYTES = 16 * 1024;
|
|
35355
35447
|
codexHookEvents = new Set([
|
package/bin/migrate.js
CHANGED
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.77",
|
|
24144
24144
|
description: "Skills library for AI coding agents",
|
|
24145
24145
|
type: "module",
|
|
24146
24146
|
bin: {
|
|
@@ -36934,6 +36934,9 @@ var AUTHORITY_OVERRIDE_HEADERS3 = new Set([
|
|
|
36934
36934
|
"x-original-host"
|
|
36935
36935
|
]);
|
|
36936
36936
|
|
|
36937
|
+
// src/lib/credential-profile-command.ts
|
|
36938
|
+
var urlKeys = clientTransportEnvKeys("skills").apiUrlKeys;
|
|
36939
|
+
|
|
36937
36940
|
// src/lib/fleet-credentials.ts
|
|
36938
36941
|
var SKILLS_APP = "skills";
|
|
36939
36942
|
var ENV_KEYS = clientTransportEnvKeys(SKILLS_APP);
|
|
@@ -38639,9 +38642,9 @@ function createReceiptService(store) {
|
|
|
38639
38642
|
}
|
|
38640
38643
|
|
|
38641
38644
|
// node_modules/@aws-sdk/client-ecs/dist-es/ECSClient.js
|
|
38642
|
-
var
|
|
38645
|
+
var import_client37 = __toESM(require_client2(), 1);
|
|
38643
38646
|
var import_core2 = __toESM(require_dist_cjs2(), 1);
|
|
38644
|
-
var
|
|
38647
|
+
var import_client38 = __toESM(require_client(), 1);
|
|
38645
38648
|
var import_config33 = __toESM(require_config(), 1);
|
|
38646
38649
|
var import_endpoints8 = __toESM(require_endpoints(), 1);
|
|
38647
38650
|
var import_protocols10 = __toESM(require_protocols(), 1);
|
|
@@ -38650,11 +38653,11 @@ var import_schema4 = __toESM(require_schema(), 1);
|
|
|
38650
38653
|
|
|
38651
38654
|
// node_modules/@aws-sdk/client-ecs/dist-es/auth/httpAuthSchemeProvider.js
|
|
38652
38655
|
var import_httpAuthSchemes4 = __toESM(require_httpAuthSchemes(), 1);
|
|
38653
|
-
var
|
|
38656
|
+
var import_client29 = __toESM(require_client(), 1);
|
|
38654
38657
|
var defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
38655
38658
|
return {
|
|
38656
|
-
operation:
|
|
38657
|
-
region: await
|
|
38659
|
+
operation: import_client29.getSmithyContext(context).operation,
|
|
38660
|
+
region: await import_client29.normalizeProvider(config.region)() || (() => {
|
|
38658
38661
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
38659
38662
|
})()
|
|
38660
38663
|
};
|
|
@@ -38686,7 +38689,7 @@ var defaultECSHttpAuthSchemeProvider = (authParameters) => {
|
|
|
38686
38689
|
var resolveHttpAuthSchemeConfig3 = (config) => {
|
|
38687
38690
|
const config_0 = import_httpAuthSchemes4.resolveAwsSdkSigV4Config(config);
|
|
38688
38691
|
return Object.assign(config_0, {
|
|
38689
|
-
authSchemePreference:
|
|
38692
|
+
authSchemePreference: import_client29.normalizeProvider(config.authSchemePreference ?? [])
|
|
38690
38693
|
});
|
|
38691
38694
|
};
|
|
38692
38695
|
|
|
@@ -38778,9 +38781,9 @@ var package_default3 = {
|
|
|
38778
38781
|
};
|
|
38779
38782
|
|
|
38780
38783
|
// node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.js
|
|
38781
|
-
var
|
|
38784
|
+
var import_client33 = __toESM(require_client2(), 1);
|
|
38782
38785
|
var import_httpAuthSchemes6 = __toESM(require_httpAuthSchemes(), 1);
|
|
38783
|
-
var
|
|
38786
|
+
var import_client34 = __toESM(require_client(), 1);
|
|
38784
38787
|
var import_config32 = __toESM(require_config(), 1);
|
|
38785
38788
|
var import_retry5 = __toESM(require_retry(), 1);
|
|
38786
38789
|
var import_serde6 = __toESM(require_serde(), 1);
|
|
@@ -38790,12 +38793,12 @@ var import_node_http_handler3 = __toESM(require_dist_cjs6(), 1);
|
|
|
38790
38793
|
var import_httpAuthSchemes5 = __toESM(require_httpAuthSchemes(), 1);
|
|
38791
38794
|
var import_protocols7 = __toESM(require_protocols2(), 1);
|
|
38792
38795
|
var import_checksum3 = __toESM(require_checksum(), 1);
|
|
38793
|
-
var
|
|
38796
|
+
var import_client32 = __toESM(require_client(), 1);
|
|
38794
38797
|
var import_protocols8 = __toESM(require_protocols(), 1);
|
|
38795
38798
|
var import_serde5 = __toESM(require_serde(), 1);
|
|
38796
38799
|
|
|
38797
38800
|
// node_modules/@aws-sdk/client-ecs/dist-es/endpoint/endpointResolver.js
|
|
38798
|
-
var
|
|
38801
|
+
var import_client30 = __toESM(require_client2(), 1);
|
|
38799
38802
|
var import_endpoints7 = __toESM(require_endpoints(), 1);
|
|
38800
38803
|
|
|
38801
38804
|
// node_modules/@aws-sdk/client-ecs/dist-es/endpoint/bdd.js
|
|
@@ -38892,14 +38895,14 @@ var defaultEndpointResolver3 = (endpointParams, context = {}) => {
|
|
|
38892
38895
|
logger: context.logger
|
|
38893
38896
|
}));
|
|
38894
38897
|
};
|
|
38895
|
-
import_endpoints7.customEndpointFunctions.aws =
|
|
38898
|
+
import_endpoints7.customEndpointFunctions.aws = import_client30.awsEndpointFunctions;
|
|
38896
38899
|
|
|
38897
38900
|
// node_modules/@aws-sdk/client-ecs/dist-es/schemas/schemas_0.js
|
|
38898
38901
|
var import_schema3 = __toESM(require_schema(), 1);
|
|
38899
38902
|
|
|
38900
38903
|
// node_modules/@aws-sdk/client-ecs/dist-es/models/ECSServiceException.js
|
|
38901
|
-
var
|
|
38902
|
-
class ECSServiceException extends
|
|
38904
|
+
var import_client31 = __toESM(require_client(), 1);
|
|
38905
|
+
class ECSServiceException extends import_client31.ServiceException {
|
|
38903
38906
|
constructor(options) {
|
|
38904
38907
|
super(options);
|
|
38905
38908
|
Object.setPrototypeOf(this, ECSServiceException.prototype);
|
|
@@ -41703,7 +41706,7 @@ var getRuntimeConfig4 = (config) => {
|
|
|
41703
41706
|
signer: new import_httpAuthSchemes5.AwsSdkSigV4Signer
|
|
41704
41707
|
}
|
|
41705
41708
|
],
|
|
41706
|
-
logger: config?.logger ?? new
|
|
41709
|
+
logger: config?.logger ?? new import_client32.NoOpLogger,
|
|
41707
41710
|
protocol: config?.protocol ?? import_protocols7.AwsJson1_1Protocol,
|
|
41708
41711
|
protocolSettings: config?.protocolSettings ?? {
|
|
41709
41712
|
defaultNamespace: "com.amazonaws.ecs",
|
|
@@ -41722,11 +41725,11 @@ var getRuntimeConfig4 = (config) => {
|
|
|
41722
41725
|
|
|
41723
41726
|
// node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.js
|
|
41724
41727
|
var getRuntimeConfig5 = (config) => {
|
|
41725
|
-
|
|
41728
|
+
import_client34.emitWarningIfUnsupportedVersion(process.version);
|
|
41726
41729
|
const defaultsMode = import_config32.resolveDefaultsModeConfig(config);
|
|
41727
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
41730
|
+
const defaultConfigProvider = () => defaultsMode().then(import_client34.loadConfigsForDefaultMode);
|
|
41728
41731
|
const clientSharedValues = getRuntimeConfig4(config);
|
|
41729
|
-
|
|
41732
|
+
import_client33.emitWarningIfUnsupportedVersion(process.version);
|
|
41730
41733
|
const loaderConfig = {
|
|
41731
41734
|
profile: config?.profile,
|
|
41732
41735
|
logger: clientSharedValues.logger
|
|
@@ -41739,7 +41742,7 @@ var getRuntimeConfig5 = (config) => {
|
|
|
41739
41742
|
authSchemePreference: config?.authSchemePreference ?? import_config32.loadConfig(import_httpAuthSchemes6.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
41740
41743
|
bodyLengthChecker: config?.bodyLengthChecker ?? import_serde6.calculateBodyLength,
|
|
41741
41744
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
|
|
41742
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
41745
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? import_client33.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default3.version }),
|
|
41743
41746
|
maxAttempts: config?.maxAttempts ?? import_config32.loadConfig(import_retry5.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
41744
41747
|
region: config?.region ?? import_config32.loadConfig(import_config32.NODE_REGION_CONFIG_OPTIONS, { ...import_config32.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
41745
41748
|
requestHandler: import_node_http_handler3.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
@@ -41750,13 +41753,13 @@ var getRuntimeConfig5 = (config) => {
|
|
|
41750
41753
|
streamCollector: config?.streamCollector ?? import_node_http_handler3.streamCollector,
|
|
41751
41754
|
useDualstackEndpoint: config?.useDualstackEndpoint ?? import_config32.loadConfig(import_config32.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41752
41755
|
useFipsEndpoint: config?.useFipsEndpoint ?? import_config32.loadConfig(import_config32.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41753
|
-
userAgentAppId: config?.userAgentAppId ?? import_config32.loadConfig(
|
|
41756
|
+
userAgentAppId: config?.userAgentAppId ?? import_config32.loadConfig(import_client33.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
|
|
41754
41757
|
};
|
|
41755
41758
|
};
|
|
41756
41759
|
|
|
41757
41760
|
// node_modules/@aws-sdk/client-ecs/dist-es/runtimeExtensions.js
|
|
41758
|
-
var
|
|
41759
|
-
var
|
|
41761
|
+
var import_client35 = __toESM(require_client2(), 1);
|
|
41762
|
+
var import_client36 = __toESM(require_client(), 1);
|
|
41760
41763
|
var import_protocols9 = __toESM(require_protocols(), 1);
|
|
41761
41764
|
|
|
41762
41765
|
// node_modules/@aws-sdk/client-ecs/dist-es/auth/httpAuthExtensionConfiguration.js
|
|
@@ -41800,34 +41803,34 @@ var resolveHttpAuthRuntimeConfig3 = (config) => {
|
|
|
41800
41803
|
|
|
41801
41804
|
// node_modules/@aws-sdk/client-ecs/dist-es/runtimeExtensions.js
|
|
41802
41805
|
var resolveRuntimeExtensions3 = (runtimeConfig, extensions) => {
|
|
41803
|
-
const extensionConfiguration = Object.assign(
|
|
41806
|
+
const extensionConfiguration = Object.assign(import_client35.getAwsRegionExtensionConfiguration(runtimeConfig), import_client36.getDefaultExtensionConfiguration(runtimeConfig), import_protocols9.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig));
|
|
41804
41807
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
41805
|
-
return Object.assign(runtimeConfig,
|
|
41808
|
+
return Object.assign(runtimeConfig, import_client35.resolveAwsRegionExtensionConfiguration(extensionConfiguration), import_client36.resolveDefaultRuntimeConfig(extensionConfiguration), import_protocols9.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration));
|
|
41806
41809
|
};
|
|
41807
41810
|
|
|
41808
41811
|
// node_modules/@aws-sdk/client-ecs/dist-es/ECSClient.js
|
|
41809
|
-
class ECSClient extends
|
|
41812
|
+
class ECSClient extends import_client38.Client {
|
|
41810
41813
|
config;
|
|
41811
41814
|
constructor(...[configuration]) {
|
|
41812
41815
|
const _config_0 = getRuntimeConfig5(configuration || {});
|
|
41813
41816
|
super(_config_0);
|
|
41814
41817
|
this.initConfig = _config_0;
|
|
41815
41818
|
const _config_1 = resolveClientEndpointParameters3(_config_0);
|
|
41816
|
-
const _config_2 =
|
|
41819
|
+
const _config_2 = import_client37.resolveUserAgentConfig(_config_1);
|
|
41817
41820
|
const _config_3 = import_retry6.resolveRetryConfig(_config_2);
|
|
41818
41821
|
const _config_4 = import_config33.resolveRegionConfig(_config_3);
|
|
41819
|
-
const _config_5 =
|
|
41822
|
+
const _config_5 = import_client37.resolveHostHeaderConfig(_config_4);
|
|
41820
41823
|
const _config_6 = import_endpoints8.resolveEndpointConfig(_config_5);
|
|
41821
41824
|
const _config_7 = resolveHttpAuthSchemeConfig3(_config_6);
|
|
41822
41825
|
const _config_8 = resolveRuntimeExtensions3(_config_7, configuration?.extensions || []);
|
|
41823
41826
|
this.config = _config_8;
|
|
41824
41827
|
this.middlewareStack.use(import_schema4.getSchemaSerdePlugin(this.config));
|
|
41825
|
-
this.middlewareStack.use(
|
|
41828
|
+
this.middlewareStack.use(import_client37.getUserAgentPlugin(this.config));
|
|
41826
41829
|
this.middlewareStack.use(import_retry6.getRetryPlugin(this.config));
|
|
41827
41830
|
this.middlewareStack.use(import_protocols10.getContentLengthPlugin(this.config));
|
|
41828
|
-
this.middlewareStack.use(
|
|
41829
|
-
this.middlewareStack.use(
|
|
41830
|
-
this.middlewareStack.use(
|
|
41831
|
+
this.middlewareStack.use(import_client37.getHostHeaderPlugin(this.config));
|
|
41832
|
+
this.middlewareStack.use(import_client37.getLoggerPlugin(this.config));
|
|
41833
|
+
this.middlewareStack.use(import_client37.getRecursionDetectionPlugin(this.config));
|
|
41831
41834
|
this.middlewareStack.use(import_core2.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
41832
41835
|
httpAuthSchemeParametersProvider: defaultECSHttpAuthSchemeParametersProvider,
|
|
41833
41836
|
identityProviderConfigProvider: async (config) => new import_core2.DefaultIdentityProviderConfig({
|
|
@@ -41842,9 +41845,9 @@ class ECSClient extends import_client37.Client {
|
|
|
41842
41845
|
}
|
|
41843
41846
|
|
|
41844
41847
|
// node_modules/@aws-sdk/client-ecs/dist-es/commandBuilder.js
|
|
41845
|
-
var
|
|
41848
|
+
var import_client39 = __toESM(require_client(), 1);
|
|
41846
41849
|
var import_endpoints9 = __toESM(require_endpoints(), 1);
|
|
41847
|
-
var command3 =
|
|
41850
|
+
var command3 = import_client39.makeBuilder(commonParams3, "AmazonEC2ContainerServiceV20141113", "ECSClient", import_endpoints9.getEndpointPlugin);
|
|
41848
41851
|
var _ep03 = {};
|
|
41849
41852
|
var _mw03 = (Command, cs, config, o2) => [];
|
|
41850
41853
|
|
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.77",
|
|
24147
24147
|
description: "Skills library for AI coding agents",
|
|
24148
24148
|
type: "module",
|
|
24149
24149
|
bin: {
|
|
@@ -36158,6 +36158,9 @@ var AUTHORITY_OVERRIDE_HEADERS3 = new Set([
|
|
|
36158
36158
|
"x-original-host"
|
|
36159
36159
|
]);
|
|
36160
36160
|
|
|
36161
|
+
// src/lib/credential-profile-command.ts
|
|
36162
|
+
var urlKeys = clientTransportEnvKeys("skills").apiUrlKeys;
|
|
36163
|
+
|
|
36161
36164
|
// src/lib/fleet-credentials.ts
|
|
36162
36165
|
var SKILLS_APP = "skills";
|
|
36163
36166
|
var ENV_KEYS = clientTransportEnvKeys(SKILLS_APP);
|
package/dist/index.js
CHANGED
|
@@ -12462,6 +12462,39 @@ function captureCodexSettings(path, budget2 = { remaining: 256 * 1024 * 1024 })
|
|
|
12462
12462
|
// src/lib/codex-hook-mcp-dependencies.ts
|
|
12463
12463
|
import { createHash as createHash13 } from "crypto";
|
|
12464
12464
|
import { basename as basename6, dirname as dirname11, isAbsolute as isAbsolute11, join as join13, resolve as resolve11, sep as sep4 } from "path";
|
|
12465
|
+
|
|
12466
|
+
// src/lib/codex-plugin-capability-paths.ts
|
|
12467
|
+
var CODEX_PLUGIN_MANIFEST_LOCATIONS = Object.freeze([
|
|
12468
|
+
"plugin.json",
|
|
12469
|
+
".codex-plugin/plugin.json",
|
|
12470
|
+
".claude-plugin/plugin.json",
|
|
12471
|
+
".cursor-plugin/plugin.json"
|
|
12472
|
+
]);
|
|
12473
|
+
var CODEX_PLUGIN_MANIFEST_DIRECTORIES = Object.freeze([".codex-plugin", ".claude-plugin", ".cursor-plugin"]);
|
|
12474
|
+
var CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES = Object.freeze([
|
|
12475
|
+
"plugin.json",
|
|
12476
|
+
".codex-plugin",
|
|
12477
|
+
".claude-plugin",
|
|
12478
|
+
".cursor-plugin",
|
|
12479
|
+
"hooks",
|
|
12480
|
+
"hooks.json",
|
|
12481
|
+
".mcp.json",
|
|
12482
|
+
".app.json",
|
|
12483
|
+
"commands",
|
|
12484
|
+
"agents"
|
|
12485
|
+
]);
|
|
12486
|
+
function foldCodexPluginEntryName(name) {
|
|
12487
|
+
return name.toUpperCase().toLowerCase();
|
|
12488
|
+
}
|
|
12489
|
+
function codexPluginRootCapabilityEntry(name) {
|
|
12490
|
+
const folded = foldCodexPluginEntryName(name);
|
|
12491
|
+
return CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.includes(folded) ? folded : null;
|
|
12492
|
+
}
|
|
12493
|
+
function isCodexSkillDocumentName(name) {
|
|
12494
|
+
return foldCodexPluginEntryName(name) === "skill.md";
|
|
12495
|
+
}
|
|
12496
|
+
|
|
12497
|
+
// src/lib/codex-hook-mcp-dependencies.ts
|
|
12465
12498
|
var need5 = (value) => {
|
|
12466
12499
|
if (!value)
|
|
12467
12500
|
throw new Error("Incomplete or unsupported reviewed Codex hook dependency");
|
|
@@ -12610,15 +12643,13 @@ function captureCodexHookMcpDependencies(configPath, reviewed, configText, chang
|
|
|
12610
12643
|
}
|
|
12611
12644
|
};
|
|
12612
12645
|
const root = join13(cacheRoot, identity2, selectCodexPluginVersion(versions, selectionBudget));
|
|
12613
|
-
const
|
|
12646
|
+
const [agentPluginManifest, ...legacyManifests] = CODEX_PLUGIN_MANIFEST_LOCATIONS;
|
|
12647
|
+
const agent = read2(join13(root, agentPluginManifest));
|
|
12614
12648
|
if (agent !== null) {
|
|
12615
12649
|
const schema = JSON.parse(agent).$schema;
|
|
12616
12650
|
need5(typeof schema !== "string" || !schema.startsWith("https://agent-plugins.org/schemas/"));
|
|
12617
12651
|
}
|
|
12618
|
-
const
|
|
12619
|
-
const claude = read2(join13(root, ".claude-plugin/plugin.json"));
|
|
12620
|
-
const cursor = read2(join13(root, ".cursor-plugin/plugin.json"));
|
|
12621
|
-
const text2 = codex ?? claude ?? cursor;
|
|
12652
|
+
const text2 = legacyManifests.map((location) => read2(join13(root, location))).find((value) => value !== null) ?? null;
|
|
12622
12653
|
if (text2 === null)
|
|
12623
12654
|
continue;
|
|
12624
12655
|
const manifest = JSON.parse(text2);
|
|
@@ -15065,16 +15096,16 @@ function codexVendorMarketplace(cache, path) {
|
|
|
15065
15096
|
return null;
|
|
15066
15097
|
return CODEX_VENDOR_MARKETPLACES.includes(parts[0]) ? parts[0] : null;
|
|
15067
15098
|
}
|
|
15068
|
-
var OTHER_PLUGIN_CONTROLS = Object.freeze(
|
|
15099
|
+
var OTHER_PLUGIN_CONTROLS = Object.freeze(CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.filter((entry) => entry !== ".codex-plugin" && entry !== ".app.json"));
|
|
15069
15100
|
var VENDOR_MANIFEST_KEYS = Object.freeze(["name", "version", "description", "author", "homepage", "repository", "license", "keywords", "interface", "skills", "apps"]);
|
|
15070
15101
|
var DEFAULT_SKILLS_PATHS = Object.freeze(["./skills", "./skills/"]);
|
|
15071
15102
|
var VENDOR_APP_DECLARATION = "./.app.json";
|
|
15072
15103
|
var MAX_SUBTREE_ENTRIES = 20000;
|
|
15073
15104
|
var MAX_SUBTREE_DEPTH = 32;
|
|
15074
15105
|
var hiddenName = (name) => name.startsWith(".") || name === "node_modules";
|
|
15075
|
-
var isSkillDocument =
|
|
15106
|
+
var isSkillDocument = isCodexSkillDocumentName;
|
|
15076
15107
|
var present = (path) => lstatSync15(path, { throwIfNoEntry: false }) !== undefined;
|
|
15077
|
-
var holdsOtherControl = (path) => readdirSync7(path).some((name) => OTHER_PLUGIN_CONTROLS.includes(name
|
|
15108
|
+
var holdsOtherControl = (path) => readdirSync7(path).some((name) => OTHER_PLUGIN_CONTROLS.includes(codexPluginRootCapabilityEntry(name) ?? ""));
|
|
15078
15109
|
function pluginTreeVisible(path, hidden, insideSkill, depth, budget2) {
|
|
15079
15110
|
if (depth > MAX_SUBTREE_DEPTH)
|
|
15080
15111
|
return false;
|
|
@@ -15415,7 +15446,7 @@ import { basename as basename13, dirname as dirname24, isAbsolute as isAbsolute2
|
|
|
15415
15446
|
import { homedir as homedir5 } from "os";
|
|
15416
15447
|
import { isAbsolute as isAbsolute25, join as join36, resolve as resolve24 } from "path";
|
|
15417
15448
|
// package.json
|
|
15418
|
-
var version = "0.10.
|
|
15449
|
+
var version = "0.10.77";
|
|
15419
15450
|
var package_default = {
|
|
15420
15451
|
name: "@hasna/skills",
|
|
15421
15452
|
version,
|
|
@@ -16503,6 +16534,9 @@ function selectsSkillsLocalMode(env = process.env) {
|
|
|
16503
16534
|
return !hasSkillsEnvAuthorityIntent(env) && isSkillsLocalOptIn(env);
|
|
16504
16535
|
}
|
|
16505
16536
|
|
|
16537
|
+
// src/lib/credential-profile-command.ts
|
|
16538
|
+
var urlKeys = clientTransportEnvKeys("skills").apiUrlKeys;
|
|
16539
|
+
|
|
16506
16540
|
// src/lib/fleet-credentials.ts
|
|
16507
16541
|
var SKILLS_APP = "skills";
|
|
16508
16542
|
var ENV_KEYS = clientTransportEnvKeys(SKILLS_APP);
|
|
@@ -17886,6 +17920,7 @@ import { createHash as createHash22 } from "crypto";
|
|
|
17886
17920
|
import { constants as constants12, closeSync as closeSync12, fstatSync as fstatSync12, lstatSync as lstatSync20, openSync as openSync12, readSync as readSync8, readdirSync as readdirSync9, realpathSync as realpathSync9 } from "fs";
|
|
17887
17921
|
import { basename as basename10, dirname as dirname18, isAbsolute as isAbsolute19, join as join25, relative as relative8, resolve as resolve18, sep as sep11 } from "path";
|
|
17888
17922
|
var CODEX_SEMANTIC_CACHE_WITNESS_SCHEMA = "hasna.codex-semantic-cache-witness.v1";
|
|
17923
|
+
var SEMANTIC_BOUND_ROOT_ENTRIES = Object.freeze([".codex-plugin", ".app.json", ".mcp.json", "hooks"]);
|
|
17889
17924
|
var identifier5 = (value) => typeof value === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(value);
|
|
17890
17925
|
var digest = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
|
|
17891
17926
|
var refuse4 = () => {
|
|
@@ -18395,14 +18430,23 @@ function assertParents(cacheRoot, controls, appOnlyParents, hookParents, files,
|
|
|
18395
18430
|
continue;
|
|
18396
18431
|
const parent = join25(cacheRoot, parts[0], parts[1]);
|
|
18397
18432
|
const root = join25(parent, parts[2]);
|
|
18398
|
-
const base = parts[parts.length - 1];
|
|
18399
|
-
if (parts.
|
|
18433
|
+
const base = parts[parts.length - 1], folded = foldCodexPluginEntryName(base);
|
|
18434
|
+
if (parts.length === 3 && (codexPluginRootCapabilityEntry(base) !== null || isCodexSkillDocumentName(base)))
|
|
18435
|
+
refuse4();
|
|
18436
|
+
const rootEntry = parts.length >= 4 ? codexPluginRootCapabilityEntry(parts[3]) : null;
|
|
18437
|
+
if (rootEntry !== null && rootEntry !== parts[3])
|
|
18438
|
+
refuse4();
|
|
18439
|
+
if (rootEntry !== null && !SEMANTIC_BOUND_ROOT_ENTRIES.includes(rootEntry))
|
|
18440
|
+
refuse4();
|
|
18441
|
+
if (isCodexSkillDocumentName(base) && base !== "SKILL.md")
|
|
18442
|
+
refuse4();
|
|
18443
|
+
if (parts.some((part) => CODEX_PLUGIN_MANIFEST_DIRECTORIES.includes(foldCodexPluginEntryName(part))) && (parts.length < 4 || parts[3] !== ".codex-plugin" || (parts.length === 4 ? base !== ".codex-plugin" : parts.length !== 5 || base !== "plugin.json")))
|
|
18400
18444
|
refuse4();
|
|
18401
|
-
if ([".app.json", ".mcp.json"].includes(
|
|
18445
|
+
if ([".app.json", ".mcp.json"].includes(folded) && (parts.length !== 4 || dirname18(member) !== root))
|
|
18402
18446
|
refuse4();
|
|
18403
|
-
if ([".app.json", ".mcp.json"].includes(
|
|
18447
|
+
if ([".app.json", ".mcp.json"].includes(folded) && hookParents.some((reviewed) => reviewed.pluginParent === parent))
|
|
18404
18448
|
refuse4();
|
|
18405
|
-
if ((
|
|
18449
|
+
if ((rootEntry === "hooks" || folded === "hooks.json") && (![4, 5].includes(parts.length) || parts[3] !== "hooks" || (parts.length === 4 ? base !== "hooks" : base !== "hooks.json") || !hookParents.some((reviewed) => reviewed.pluginParent === join25(cacheRoot, parts[0], parts[1]))))
|
|
18406
18450
|
refuse4();
|
|
18407
18451
|
}
|
|
18408
18452
|
}
|
package/dist/lib/auth-store.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ export declare function getAuthConfigReadOnly(env?: Env, options?: SkillsFleetOp
|
|
|
88
88
|
* forgotten locally. Recorded in identity.json (never a secret).
|
|
89
89
|
*/
|
|
90
90
|
export type StoredKeyIssuer = "sign-in" | "api-key";
|
|
91
|
-
export declare function saveAuthConfig(config: StoredAuthConfig, env?: Env, authenticatedOrigin?: string, issuedBy?: StoredKeyIssuer): string;
|
|
91
|
+
export declare function saveAuthConfig(config: StoredAuthConfig, env?: Env, authenticatedOrigin?: string, issuedBy?: StoredKeyIssuer, assertUnchanged?: () => void): string;
|
|
92
92
|
/**
|
|
93
93
|
* Who put the active profile's stored credential there — the question
|
|
94
94
|
* `skills logout` has to answer before it touches it (Instructions rule
|