matthewwong525/WongStack / .agents/plugins/access
access
VerifiedSee who can sign in and what each person may use; add, change or remove a person.
screen/seal.test.mjs
View on GitHubimport { beforeAll, expect, it } from "vitest";
import { makePair, open, seal } from "./seal.mjs";
let pair;
beforeAll(async () => { pair = await makePair(); });
it("opens a sealed key only with the matching private half, and two seals of one key differ", async () => {
const sealed = await seal("shpat_made-up-9f2c", pair.publicKey);
expect(sealed).not.toContain("shpat_made-up");
expect(Object.keys(JSON.parse(sealed))).toEqual(["v", "wrapped", "iv", "data"]);
expect(await open(sealed, pair.privateKey)).toBe("shpat_made-up-9f2c");
expect(await seal("shpat_made-up-9f2c", pair.publicKey)).not.toBe(sealed);
const other = await makePair();
await expect(open(sealed, other.privateKey)).rejects.toThrow();
await expect(open(JSON.stringify({ ...JSON.parse(sealed), v: 2 }), pair.privateKey)).rejects.toThrow("not a sealed key");
});
it("seals and opens a 4 KB key file, such as a service account's", async () => {
const file = JSON.stringify({ type: "service_account", private_key: "k".repeat(4096) });
expect(await open(await seal(file, pair.publicKey), pair.privateKey)).toBe(file);
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |