yeka-skills 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. package/README.md +4 -1
  2. package/dist/cli.js +23 -9
  3. package/package.json +1 -4
package/README.md CHANGED
@@ -6,7 +6,10 @@ Install and update private Gemography agent skills from Yeka Skills.
6
6
  npx yeka-skills add ste100-session
7
7
  ```
8
8
 
9
- The CLI opens Cloudflare Access in your browser when it needs a session. It stores the short session in macOS Keychain.
9
+ The CLI tries to open Cloudflare Access in your browser when it needs a session. It always prints
10
+ the same one-time address in the terminal, so you can open it yourself if the browser does not
11
+ continue. The address expires after five minutes. Run the same command again to get a new address.
12
+ The CLI stores the short session in macOS Keychain.
10
13
 
11
14
  It detects the shared local skill folders used by ChatGPT desktop, Codex, Claude Desktop, Cowork, and Claude Code. A shared skill installs into each active compatible folder.
12
15
 
package/dist/cli.js CHANGED
@@ -41,6 +41,10 @@ var ShareIdMapSchema = z.object({
41
41
  schemaVersion: z.literal(1),
42
42
  skills: z.record(SkillNameSchema, OpaqueShareIdSchema)
43
43
  });
44
+ var PublishedSkillsSchema = z.object({
45
+ schemaVersion: z.literal(1),
46
+ published: z.array(SkillNameSchema).min(1)
47
+ });
44
48
  var RegistryManifestSchema = z.object({
45
49
  schemaVersion: z.literal(1),
46
50
  generatedAt: z.iso.datetime({ offset: true }),
@@ -1076,6 +1080,7 @@ import http from "http";
1076
1080
  import { promisify } from "util";
1077
1081
  var execFileAsync = promisify(execFile);
1078
1082
  var LOGIN_TIMEOUT_MS = 5 * 60 * 1e3;
1083
+ var LOGIN_RETRY = "run the same Yeka Skills command again to get a new address.";
1079
1084
  var MAX_TOKEN_RESPONSE_BYTES = 16 * 1024;
1080
1085
  var AUTHORIZATION_CODE_PATTERN = /^[A-Za-z0-9._-]{32,4096}$/;
1081
1086
  var readBoundedJson = async (response) => {
@@ -1163,7 +1168,10 @@ var waitForCallback = async (expectedState) => {
1163
1168
  throw new CliError("login_listener_failed", "The CLI could not start its private login listener.");
1164
1169
  }
1165
1170
  const timeout = setTimeout(() => {
1166
- rejectCallback?.(new CliError("login_timeout", "The browser login did not finish within five minutes."));
1171
+ rejectCallback?.(new CliError(
1172
+ "login_timeout",
1173
+ "The one-time browser address expired after five minutes. Run the same Yeka Skills command again to get a new address."
1174
+ ));
1167
1175
  }, LOGIN_TIMEOUT_MS);
1168
1176
  timeout.unref();
1169
1177
  return {
@@ -1183,12 +1191,23 @@ var waitForCallback = async (expectedState) => {
1183
1191
  var openBrowser = async (url) => {
1184
1192
  try {
1185
1193
  await execFileAsync("/usr/bin/open", [url]);
1186
- return true;
1187
1194
  } catch (error) {
1188
1195
  void error;
1189
- return false;
1190
1196
  }
1191
1197
  };
1198
+ var launchAuthorization = async (url, dependencies = {
1199
+ openBrowser,
1200
+ write: (message) => process.stdout.write(message)
1201
+ }) => {
1202
+ dependencies.write([
1203
+ "Your browser will try to open for Gemography email verification.",
1204
+ "If it does not continue, open this one-time address:",
1205
+ url,
1206
+ `This address expires in five minutes. If it expires, ${LOGIN_RETRY}`,
1207
+ ""
1208
+ ].join("\n"));
1209
+ await dependencies.openBrowser(url);
1210
+ };
1192
1211
  var login = async () => {
1193
1212
  const verifier = randomBytes(32).toString("base64url");
1194
1213
  const challenge = createHash5("sha256").update(verifier).digest("base64url");
@@ -1199,13 +1218,8 @@ var login = async () => {
1199
1218
  authorizationUrl.searchParams.set("code_challenge_method", "S256");
1200
1219
  authorizationUrl.searchParams.set("redirect_uri", listener.authorizationUrl);
1201
1220
  authorizationUrl.searchParams.set("state", state);
1202
- process.stdout.write("Your browser will open for Gemography email verification.\n");
1203
1221
  try {
1204
- if (!await openBrowser(authorizationUrl.toString())) {
1205
- process.stdout.write(`Open this address in your browser:
1206
- ${authorizationUrl.toString()}
1207
- `);
1208
- }
1222
+ await launchAuthorization(authorizationUrl.toString());
1209
1223
  const callback = await listener.callback;
1210
1224
  const response = await fetch(new URL("/v1/auth/token", REGISTRY_ORIGIN), {
1211
1225
  method: "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeka-skills",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Install and update private Gemography agent skills",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -13,9 +13,6 @@
13
13
  "engines": {
14
14
  "node": ">=22.15.0"
15
15
  },
16
- "os": [
17
- "darwin"
18
- ],
19
16
  "bin": {
20
17
  "yeka-skills": "./dist/cli.js"
21
18
  },