@hasna/skills 0.10.76 → 0.10.78
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 +45 -3
- package/bin/index.js +748 -339
- package/bin/mcp.js +200 -32
- package/bin/migrate.js +1 -1
- package/bin/server.js +36 -33
- package/bin/worker.js +4 -1
- package/dist/cli/commands/runtime-mcp.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +113 -21
- 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/mcp-registration-environment.d.ts +2 -0
- package/dist/lib/private-publication-customer.d.ts +6 -2
- package/dist/lib/registry-types.d.ts +2 -0
- package/dist/lib/remote-private-publications.d.ts +22 -0
- package/dist/lib/sign-in.d.ts +1 -1
- package/dist/runtime-prerequisites.js +3 -2
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +215 -127
- package/package.json +1 -1
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.78",
|
|
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.78",
|
|
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.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export { WorkspaceLeaveInputError, RemoteWorkspaceLeaveError, RemoteWorkspaceLea
|
|
|
53
53
|
export type { RemoteWorkspaceInvitation, RemoteWorkspaceInvitationsPage, RemoteWorkspaceInvitationResult, RemoteWorkspaceInvitationAcceptance, ListRemoteWorkspaceInvitations, IssueRemoteWorkspaceInvitation, ResendRemoteWorkspaceInvitation, RevokeRemoteWorkspaceInvitation, AcceptRemoteWorkspaceInvitation, RemoteWorkspaceInvitationErrorCode } from "./lib/remote-invitations.js";
|
|
54
54
|
export { WorkspaceInvitationInputError, RemoteWorkspaceInvitationError, RemoteWorkspaceInvitationUnconfirmedError, RemoteWorkspaceInvitationReadError } from "./lib/remote-invitations.js";
|
|
55
55
|
export { InvitationEmailInputError, RemoteInvitationEmailError, RemoteInvitationEmailUnconfirmedError, type RequestInvitationEmailChallenge, type AcceptInvitationEmailChallenge, type RemoteInvitationEmailChallenge, type RemoteInvitationEmailAcceptance, type RemoteInvitationEmailErrorCode } from "./lib/remote-invitation-recovery.js";
|
|
56
|
-
export { RemotePrivatePublicationsClient, PrivatePublicationError, PRIVATE_PUBLICATION_MAX_BYTES, type PrivatePublicationDeclaration, type PrivatePublicationView, type PrivatePublicationState, type PrivatePublishingCapability } from "./lib/remote-private-publications.js";
|
|
56
|
+
export { RemotePrivatePublicationsClient, PrivatePublicationError, PRIVATE_PUBLICATION_MAX_BYTES, type CreatePrivateSkillInput, type CreatedPrivateSkill, type PrivatePublicationDeclaration, type PrivatePublicationView, type PrivatePublicationState, type PrivatePublishingCapability } from "./lib/remote-private-publications.js";
|
|
57
57
|
export { preparePrivatePublication, readPrivatePublicationRecovery, continuePrivatePublication, inspectPrivatePublication, type PrivatePublicationRecovery, type PrivatePublicationResult } from "./lib/private-publication-recovery.js";
|
|
58
58
|
export { HttpProfileClient, createProfileClient, type ProfileClient, type AuthenticatedProfilePrincipal, type AuthenticatedProfileRole } from "./lib/profile-client.js";
|
|
59
59
|
export type { SkillSelection, SkillProfile, ResolvedSkillSelection, ResolvedSkillProfile, StationSkillStateInput, StationSkillState } from "./types/skill-selection.js";
|
package/dist/index.js
CHANGED
|
@@ -9405,7 +9405,8 @@ var MEASURED_CODEX_CAPABILITIES = {
|
|
|
9405
9405
|
"codex-cli 0.160.1": ["hooks", "qualified-skill-catalog", "installed-plugin-review"],
|
|
9406
9406
|
"codex-cli 0.161.0": ["hooks", "qualified-skill-catalog", "installed-plugin-review"],
|
|
9407
9407
|
"codex-cli 0.162.0": ["hooks", "qualified-skill-catalog", "installed-plugin-review"],
|
|
9408
|
-
"codex-cli 0.162.1": ["hooks", "qualified-skill-catalog", "installed-plugin-review"]
|
|
9408
|
+
"codex-cli 0.162.1": ["hooks", "qualified-skill-catalog", "installed-plugin-review"],
|
|
9409
|
+
"codex-cli 0.163.0": ["hooks", "qualified-skill-catalog", "installed-plugin-review"]
|
|
9409
9410
|
};
|
|
9410
9411
|
function supportsCodexNativeCapability(version, capability) {
|
|
9411
9412
|
return typeof version === "string" && Object.hasOwn(MEASURED_CODEX_CAPABILITIES, version) && MEASURED_CODEX_CAPABILITIES[version].includes(capability);
|
|
@@ -12462,6 +12463,39 @@ function captureCodexSettings(path, budget2 = { remaining: 256 * 1024 * 1024 })
|
|
|
12462
12463
|
// src/lib/codex-hook-mcp-dependencies.ts
|
|
12463
12464
|
import { createHash as createHash13 } from "crypto";
|
|
12464
12465
|
import { basename as basename6, dirname as dirname11, isAbsolute as isAbsolute11, join as join13, resolve as resolve11, sep as sep4 } from "path";
|
|
12466
|
+
|
|
12467
|
+
// src/lib/codex-plugin-capability-paths.ts
|
|
12468
|
+
var CODEX_PLUGIN_MANIFEST_LOCATIONS = Object.freeze([
|
|
12469
|
+
"plugin.json",
|
|
12470
|
+
".codex-plugin/plugin.json",
|
|
12471
|
+
".claude-plugin/plugin.json",
|
|
12472
|
+
".cursor-plugin/plugin.json"
|
|
12473
|
+
]);
|
|
12474
|
+
var CODEX_PLUGIN_MANIFEST_DIRECTORIES = Object.freeze([".codex-plugin", ".claude-plugin", ".cursor-plugin"]);
|
|
12475
|
+
var CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES = Object.freeze([
|
|
12476
|
+
"plugin.json",
|
|
12477
|
+
".codex-plugin",
|
|
12478
|
+
".claude-plugin",
|
|
12479
|
+
".cursor-plugin",
|
|
12480
|
+
"hooks",
|
|
12481
|
+
"hooks.json",
|
|
12482
|
+
".mcp.json",
|
|
12483
|
+
".app.json",
|
|
12484
|
+
"commands",
|
|
12485
|
+
"agents"
|
|
12486
|
+
]);
|
|
12487
|
+
function foldCodexPluginEntryName(name) {
|
|
12488
|
+
return name.toUpperCase().toLowerCase();
|
|
12489
|
+
}
|
|
12490
|
+
function codexPluginRootCapabilityEntry(name) {
|
|
12491
|
+
const folded = foldCodexPluginEntryName(name);
|
|
12492
|
+
return CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.includes(folded) ? folded : null;
|
|
12493
|
+
}
|
|
12494
|
+
function isCodexSkillDocumentName(name) {
|
|
12495
|
+
return foldCodexPluginEntryName(name) === "skill.md";
|
|
12496
|
+
}
|
|
12497
|
+
|
|
12498
|
+
// src/lib/codex-hook-mcp-dependencies.ts
|
|
12465
12499
|
var need5 = (value) => {
|
|
12466
12500
|
if (!value)
|
|
12467
12501
|
throw new Error("Incomplete or unsupported reviewed Codex hook dependency");
|
|
@@ -12610,15 +12644,13 @@ function captureCodexHookMcpDependencies(configPath, reviewed, configText, chang
|
|
|
12610
12644
|
}
|
|
12611
12645
|
};
|
|
12612
12646
|
const root = join13(cacheRoot, identity2, selectCodexPluginVersion(versions, selectionBudget));
|
|
12613
|
-
const
|
|
12647
|
+
const [agentPluginManifest, ...legacyManifests] = CODEX_PLUGIN_MANIFEST_LOCATIONS;
|
|
12648
|
+
const agent = read2(join13(root, agentPluginManifest));
|
|
12614
12649
|
if (agent !== null) {
|
|
12615
12650
|
const schema = JSON.parse(agent).$schema;
|
|
12616
12651
|
need5(typeof schema !== "string" || !schema.startsWith("https://agent-plugins.org/schemas/"));
|
|
12617
12652
|
}
|
|
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;
|
|
12653
|
+
const text2 = legacyManifests.map((location) => read2(join13(root, location))).find((value) => value !== null) ?? null;
|
|
12622
12654
|
if (text2 === null)
|
|
12623
12655
|
continue;
|
|
12624
12656
|
const manifest = JSON.parse(text2);
|
|
@@ -15065,16 +15097,16 @@ function codexVendorMarketplace(cache, path) {
|
|
|
15065
15097
|
return null;
|
|
15066
15098
|
return CODEX_VENDOR_MARKETPLACES.includes(parts[0]) ? parts[0] : null;
|
|
15067
15099
|
}
|
|
15068
|
-
var OTHER_PLUGIN_CONTROLS = Object.freeze(
|
|
15100
|
+
var OTHER_PLUGIN_CONTROLS = Object.freeze(CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.filter((entry) => entry !== ".codex-plugin" && entry !== ".app.json"));
|
|
15069
15101
|
var VENDOR_MANIFEST_KEYS = Object.freeze(["name", "version", "description", "author", "homepage", "repository", "license", "keywords", "interface", "skills", "apps"]);
|
|
15070
15102
|
var DEFAULT_SKILLS_PATHS = Object.freeze(["./skills", "./skills/"]);
|
|
15071
15103
|
var VENDOR_APP_DECLARATION = "./.app.json";
|
|
15072
15104
|
var MAX_SUBTREE_ENTRIES = 20000;
|
|
15073
15105
|
var MAX_SUBTREE_DEPTH = 32;
|
|
15074
15106
|
var hiddenName = (name) => name.startsWith(".") || name === "node_modules";
|
|
15075
|
-
var isSkillDocument =
|
|
15107
|
+
var isSkillDocument = isCodexSkillDocumentName;
|
|
15076
15108
|
var present = (path) => lstatSync15(path, { throwIfNoEntry: false }) !== undefined;
|
|
15077
|
-
var holdsOtherControl = (path) => readdirSync7(path).some((name) => OTHER_PLUGIN_CONTROLS.includes(name
|
|
15109
|
+
var holdsOtherControl = (path) => readdirSync7(path).some((name) => OTHER_PLUGIN_CONTROLS.includes(codexPluginRootCapabilityEntry(name) ?? ""));
|
|
15078
15110
|
function pluginTreeVisible(path, hidden, insideSkill, depth, budget2) {
|
|
15079
15111
|
if (depth > MAX_SUBTREE_DEPTH)
|
|
15080
15112
|
return false;
|
|
@@ -15415,7 +15447,7 @@ import { basename as basename13, dirname as dirname24, isAbsolute as isAbsolute2
|
|
|
15415
15447
|
import { homedir as homedir5 } from "os";
|
|
15416
15448
|
import { isAbsolute as isAbsolute25, join as join36, resolve as resolve24 } from "path";
|
|
15417
15449
|
// package.json
|
|
15418
|
-
var version = "0.10.
|
|
15450
|
+
var version = "0.10.78";
|
|
15419
15451
|
var package_default = {
|
|
15420
15452
|
name: "@hasna/skills",
|
|
15421
15453
|
version,
|
|
@@ -16503,6 +16535,9 @@ function selectsSkillsLocalMode(env = process.env) {
|
|
|
16503
16535
|
return !hasSkillsEnvAuthorityIntent(env) && isSkillsLocalOptIn(env);
|
|
16504
16536
|
}
|
|
16505
16537
|
|
|
16538
|
+
// src/lib/credential-profile-command.ts
|
|
16539
|
+
var urlKeys = clientTransportEnvKeys("skills").apiUrlKeys;
|
|
16540
|
+
|
|
16506
16541
|
// src/lib/fleet-credentials.ts
|
|
16507
16542
|
var SKILLS_APP = "skills";
|
|
16508
16543
|
var ENV_KEYS = clientTransportEnvKeys(SKILLS_APP);
|
|
@@ -17886,6 +17921,7 @@ import { createHash as createHash22 } from "crypto";
|
|
|
17886
17921
|
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
17922
|
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
17923
|
var CODEX_SEMANTIC_CACHE_WITNESS_SCHEMA = "hasna.codex-semantic-cache-witness.v1";
|
|
17924
|
+
var SEMANTIC_BOUND_ROOT_ENTRIES = Object.freeze([".codex-plugin", ".app.json", ".mcp.json", "hooks"]);
|
|
17889
17925
|
var identifier5 = (value) => typeof value === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(value);
|
|
17890
17926
|
var digest = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
|
|
17891
17927
|
var refuse4 = () => {
|
|
@@ -18395,14 +18431,23 @@ function assertParents(cacheRoot, controls, appOnlyParents, hookParents, files,
|
|
|
18395
18431
|
continue;
|
|
18396
18432
|
const parent = join25(cacheRoot, parts[0], parts[1]);
|
|
18397
18433
|
const root = join25(parent, parts[2]);
|
|
18398
|
-
const base = parts[parts.length - 1];
|
|
18399
|
-
if (parts.
|
|
18434
|
+
const base = parts[parts.length - 1], folded = foldCodexPluginEntryName(base);
|
|
18435
|
+
if (parts.length === 3 && (codexPluginRootCapabilityEntry(base) !== null || isCodexSkillDocumentName(base)))
|
|
18400
18436
|
refuse4();
|
|
18401
|
-
|
|
18437
|
+
const rootEntry = parts.length >= 4 ? codexPluginRootCapabilityEntry(parts[3]) : null;
|
|
18438
|
+
if (rootEntry !== null && rootEntry !== parts[3])
|
|
18402
18439
|
refuse4();
|
|
18403
|
-
if (
|
|
18440
|
+
if (rootEntry !== null && !SEMANTIC_BOUND_ROOT_ENTRIES.includes(rootEntry))
|
|
18404
18441
|
refuse4();
|
|
18405
|
-
if ((
|
|
18442
|
+
if (isCodexSkillDocumentName(base) && base !== "SKILL.md")
|
|
18443
|
+
refuse4();
|
|
18444
|
+
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")))
|
|
18445
|
+
refuse4();
|
|
18446
|
+
if ([".app.json", ".mcp.json"].includes(folded) && (parts.length !== 4 || dirname18(member) !== root))
|
|
18447
|
+
refuse4();
|
|
18448
|
+
if ([".app.json", ".mcp.json"].includes(folded) && hookParents.some((reviewed) => reviewed.pluginParent === parent))
|
|
18449
|
+
refuse4();
|
|
18450
|
+
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
18451
|
refuse4();
|
|
18407
18452
|
}
|
|
18408
18453
|
}
|
|
@@ -44799,11 +44844,12 @@ var remoteAvailabilitySchema = exports_external.object({
|
|
|
44799
44844
|
details: exports_external.array(exports_external.string()).optional()
|
|
44800
44845
|
}).passthrough();
|
|
44801
44846
|
var remoteSkillSchema = exports_external.object({
|
|
44847
|
+
id: exports_external.string().regex(/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/).optional(),
|
|
44802
44848
|
name: exports_external.string().min(1).optional(),
|
|
44803
44849
|
slug: exports_external.string().min(1).optional(),
|
|
44804
44850
|
displayName: exports_external.string().optional(),
|
|
44805
44851
|
description: exports_external.string().optional(),
|
|
44806
|
-
category: exports_external.string().optional(),
|
|
44852
|
+
category: exports_external.string().nullable().optional(),
|
|
44807
44853
|
tags: exports_external.array(exports_external.string()).optional(),
|
|
44808
44854
|
dependencies: exports_external.array(exports_external.string()).optional(),
|
|
44809
44855
|
version: exports_external.string().optional(),
|
|
@@ -44864,6 +44910,7 @@ function normalizeRemoteSkill(skill) {
|
|
|
44864
44910
|
if (!name)
|
|
44865
44911
|
throw new Error("Remote skill requires name or slug");
|
|
44866
44912
|
return {
|
|
44913
|
+
...skill.id !== undefined ? { id: skill.id } : {},
|
|
44867
44914
|
name,
|
|
44868
44915
|
displayName: skill.displayName || titleize(name),
|
|
44869
44916
|
description: skill.description || "",
|
|
@@ -48341,6 +48388,16 @@ async function requestInvitationEmail(origin, action, input2) {
|
|
|
48341
48388
|
// src/lib/remote-private-publications.ts
|
|
48342
48389
|
import { createHash as createHash34 } from "crypto";
|
|
48343
48390
|
var PRIVATE_PUBLICATION_MAX_BYTES = 16 * 1024 * 1024;
|
|
48391
|
+
var skillCreateFailures = {
|
|
48392
|
+
INVALID_SLUG: [400, "Provide a lowercase kebab-case skill slug."],
|
|
48393
|
+
INVALID_DISPLAY_NAME: [400, "Provide a nonempty skill display name."],
|
|
48394
|
+
INVALID_VISIBILITY: [400, "Use private or team visibility for source publication."],
|
|
48395
|
+
SESSION_EXPIRED: [401, "Sign in again before creating a private skill."],
|
|
48396
|
+
INTERACTIVE_SESSION_REQUIRED: [403, "An interactive account session is required to create a private skill."],
|
|
48397
|
+
ACCOUNT_UNAVAILABLE: [403, "The current account membership cannot create a private skill."],
|
|
48398
|
+
PLAN_REQUIRED: [403, "Private and team skills require the Pro plan."],
|
|
48399
|
+
SLUG_CONFLICT: [409, "This skill slug already exists. Inspect the existing skill before publishing."]
|
|
48400
|
+
};
|
|
48344
48401
|
var failures2 = {
|
|
48345
48402
|
INVALID_REQUEST: [400, "The publication request is invalid."],
|
|
48346
48403
|
SESSION_EXPIRED: [401, "Sign in again to manage this publication."],
|
|
@@ -48387,6 +48444,24 @@ var record11 = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
|
48387
48444
|
var exact = (v, keys2) => record11(v) && Object.keys(v).sort().join(",") === keys2.sort().join(",");
|
|
48388
48445
|
var date5 = (v) => typeof v === "string" && /^\d{4}-\d\d-\d\dT[0-9:.]+(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/.test(v) && Number.isFinite(Date.parse(v));
|
|
48389
48446
|
var publicationSha256 = (bytes) => createHash34("sha256").update(bytes).digest("hex");
|
|
48447
|
+
function checkedPrivateSkillCreate(value) {
|
|
48448
|
+
const refuse6 = (field3, accepted) => {
|
|
48449
|
+
throw new PrivatePublicationError("INVALID_SKILL_CREATE_INPUT", `Invalid ${field3}. ${accepted}`);
|
|
48450
|
+
};
|
|
48451
|
+
if (!record11(value) || !Object.keys(value).every((key2) => ["slug", "displayName", "description", "visibility", "confirm"].includes(key2)))
|
|
48452
|
+
return refuse6("create input", "Provide only slug, displayName, description, visibility and confirm.");
|
|
48453
|
+
if (value.confirm !== true)
|
|
48454
|
+
throw new PrivatePublicationError("SKILL_CREATE_CONFIRM_REQUIRED", "Explicit confirmation is required to create this skill.");
|
|
48455
|
+
if (typeof value.slug !== "string" || value.slug.length > 128 || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(value.slug))
|
|
48456
|
+
return refuse6("slug", "Use lowercase kebab-case, at most 128 characters.");
|
|
48457
|
+
if (typeof value.displayName !== "string" || !value.displayName.trim() || value.displayName.length > 256 || /[\p{Cc}\p{Cs}\u2028\u2029]/u.test(value.displayName))
|
|
48458
|
+
return refuse6("displayName", "Use nonempty text, at most 256 characters, without control characters.");
|
|
48459
|
+
if (value.description !== undefined && (typeof value.description !== "string" || Buffer.byteLength(value.description) > 8192 || /[\p{Cc}\p{Cs}]/u.test(value.description.replace(/[\r\n\t]/g, ""))))
|
|
48460
|
+
return refuse6("description", "Use text of at most 8192 UTF-8 bytes, without control characters other than tabs and newlines.");
|
|
48461
|
+
if (value.visibility !== undefined && value.visibility !== "private" && value.visibility !== "team")
|
|
48462
|
+
return refuse6("visibility", "Use private or team.");
|
|
48463
|
+
return Object.freeze({ slug: value.slug, displayName: value.displayName.trim(), description: value.description ?? "", visibility: value.visibility ?? "private" });
|
|
48464
|
+
}
|
|
48390
48465
|
function checkedPublicationDeclaration(value) {
|
|
48391
48466
|
if (!exact(value, ["idempotencyKey", "version", "expectedCurrentVersionId", "manifestText", "archiveSha256", "archiveByteSize"]) || !publicationUuid(value.idempotencyKey) || !(value.expectedCurrentVersionId === null || publicationUuid(value.expectedCurrentVersionId)) || typeof value.version !== "string" || !value.version || value.version.length > 128 || /[\p{Cc}\p{Cs}]/u.test(value.version) || typeof value.manifestText !== "string" || Buffer.byteLength(value.manifestText) > 16384 || !hash4(value.archiveSha256) || !Number.isSafeInteger(value.archiveByteSize) || Number(value.archiveByteSize) < 1 || Number(value.archiveByteSize) > PRIVATE_PUBLICATION_MAX_BYTES)
|
|
48392
48467
|
return bad();
|
|
@@ -48406,11 +48481,11 @@ function checkedPublicationView(value, skillId, intentId, declaration) {
|
|
|
48406
48481
|
return invalid4();
|
|
48407
48482
|
return Object.freeze({ ...value });
|
|
48408
48483
|
}
|
|
48409
|
-
async function boundedJson(url2, init, token, mutation, budget3 = 15000, signal) {
|
|
48484
|
+
async function boundedJson(url2, init, token, mutation, budget3 = 15000, signal, create = false) {
|
|
48410
48485
|
const controller = new AbortController;
|
|
48411
48486
|
let reader;
|
|
48412
48487
|
let response;
|
|
48413
|
-
const timeout2 = new PrivatePublicationError("PUBLICATION_UNCONFIRMED", "No confirmed publication result. Inspect the saved intent before retrying.", mutation);
|
|
48488
|
+
const timeout2 = new PrivatePublicationError(create ? "SKILL_CREATE_UNCONFIRMED" : "PUBLICATION_UNCONFIRMED", create ? "Skill creation could not be confirmed. Inspect the workspace for this slug before another create; do not retry automatically." : "No confirmed publication result. Inspect the saved intent before retrying.", mutation);
|
|
48414
48489
|
let timer;
|
|
48415
48490
|
let abort;
|
|
48416
48491
|
try {
|
|
@@ -48450,11 +48525,19 @@ async function boundedJson(url2, init, token, mutation, budget3 = 15000, signal)
|
|
|
48450
48525
|
return invalid4();
|
|
48451
48526
|
}
|
|
48452
48527
|
if (!response.ok) {
|
|
48453
|
-
const
|
|
48454
|
-
|
|
48455
|
-
|
|
48528
|
+
const known = create ? skillCreateFailures : failures2;
|
|
48529
|
+
const code = record11(body) && typeof body.code === "string" && Object.hasOwn(known, body.code) ? body.code : null;
|
|
48530
|
+
if (code && known[code][0] === response.status)
|
|
48531
|
+
throw new PrivatePublicationError(code, known[code][1], mutation && code === "PUBLICATION_UNCERTAIN", response.status);
|
|
48532
|
+
if (create) {
|
|
48533
|
+
if (response.status >= 500)
|
|
48534
|
+
throw timeout2;
|
|
48535
|
+
throw new PrivatePublicationError("SKILL_CREATE_REQUEST_FAILED", "The server refused skill creation.", false, response.status);
|
|
48536
|
+
}
|
|
48456
48537
|
throw new PrivatePublicationError("PUBLICATION_REQUEST_FAILED", "The publication request was refused. Inspect its status before retrying.", mutation && response.status >= 500, response.status);
|
|
48457
48538
|
}
|
|
48539
|
+
if (create && response.status !== 201)
|
|
48540
|
+
return invalid4();
|
|
48458
48541
|
return body;
|
|
48459
48542
|
})(), new Promise((_, reject) => {
|
|
48460
48543
|
abort = () => {
|
|
@@ -48501,6 +48584,15 @@ class RemotePrivatePublicationsClient {
|
|
|
48501
48584
|
this.membershipId = checked.user.membershipId;
|
|
48502
48585
|
Object.freeze(this);
|
|
48503
48586
|
}
|
|
48587
|
+
async createSkill(input2, options = {}) {
|
|
48588
|
+
const body = checkedPrivateSkillCreate(input2);
|
|
48589
|
+
if (options.timeoutMs !== undefined && (!Number.isSafeInteger(options.timeoutMs) || options.timeoutMs < 1 || options.timeoutMs > 15000))
|
|
48590
|
+
throw new PrivatePublicationError("INVALID_SKILL_CREATE_INPUT", "Invalid timeoutMs. Use an integer from 1 to 15000.");
|
|
48591
|
+
const value = await boundedJson(skillsApiRequestUrl(this.apiOrigin, "/api/v1/skills"), { method: "POST", body: JSON.stringify(body) }, this.#token, true, options.timeoutMs, options.signal, true);
|
|
48592
|
+
if (!record11(value) || !publicationUuid(value.id) || value.slug !== body.slug || value.displayName !== body.displayName || value.description !== body.description || value.visibility !== body.visibility || value.sourceType !== "private_hosted" || !record11(value.metadata) || value.metadata.ownerOrganizationId !== this.organizationId)
|
|
48593
|
+
throw new PrivatePublicationError("SKILL_CREATE_UNCONFIRMED", "Skill creation returned an unbound result. Inspect the workspace for this slug before another create; do not retry automatically.", true);
|
|
48594
|
+
return Object.freeze({ id: value.id, slug: body.slug, visibility: body.visibility, sourceType: "private_hosted", ownerOrganizationId: this.organizationId });
|
|
48595
|
+
}
|
|
48504
48596
|
async getCapability(options = {}) {
|
|
48505
48597
|
if (options.timeoutMs !== undefined && (!Number.isSafeInteger(options.timeoutMs) || options.timeoutMs < 1 || options.timeoutMs > 15000))
|
|
48506
48598
|
return bad();
|
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
|
|
@@ -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 {};
|