joycraft 0.7.16 → 1.0.0
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 +137 -156
- package/dist/cli.js +1593 -373
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/joycraft-release.json +1 -1
- package/package.json +9 -3
- package/payload/.agents/skills/joycraft-context/SKILL.md +36 -0
- package/payload/.agents/skills/joycraft-decompose/SKILL.md +68 -0
- package/payload/.agents/skills/joycraft-entry/SKILL.md +103 -0
- package/payload/.agents/skills/joycraft-implement/SKILL.md +106 -0
- package/payload/.agents/skills/joycraft-retro/SKILL.md +54 -0
- package/payload/.agents/skills/joycraft-retro/agents/openai.yaml +5 -0
- package/payload/.agents/skills/joycraft-session-end/SKILL.md +78 -0
- package/payload/.agents/skills/joycraft-testing/SKILL.md +60 -0
- package/payload/.agents/skills/joycraft-ui-slice/SKILL.md +59 -0
- package/payload/.agents/skills/joycraft-ui-slice/scripts/serve.mjs +97 -0
- package/payload/.agents/skills/joycraft-verify/SKILL.md +103 -0
- package/payload/.claude/agents/joycraft-implementer.md +31 -0
- package/payload/.claude/agents/joycraft-reviewer.md +30 -0
- package/payload/.joycraft/assets/artifacts/kit.css +102 -0
- package/payload/.joycraft/assets/artifacts/kit.js +301 -0
- package/payload/.joycraft/assets/artifacts/transports.js +236 -0
- package/payload/.joycraft/contracts/types.d.ts +185 -0
- package/payload/.joycraft/references/architecture.md +90 -0
- package/payload/.joycraft/references/archive.md +211 -0
- package/payload/.joycraft/references/artifacts.md +176 -0
- package/payload/.joycraft/references/completion.md +109 -0
- package/payload/.joycraft/references/context.md +80 -0
- package/payload/.joycraft/references/delivery.md +32 -0
- package/payload/.joycraft/references/dispatch.md +226 -0
- package/payload/.joycraft/references/recurring-failures.md +33 -0
- package/payload/.joycraft/references/retro.md +94 -0
- package/payload/.joycraft/references/setup.md +279 -0
- package/payload/.joycraft/references/testing.md +120 -0
- package/payload/.joycraft/references/update.md +44 -0
- package/payload/.joycraft/references/workflow.md +113 -0
- package/payload/.joycraft/references/worktrees.md +148 -0
- package/payload/.joycraft/runtime/archive.mjs +463 -0
- package/payload/.joycraft/runtime/artifacts/cli.mjs +61 -0
- package/payload/.joycraft/runtime/artifacts/decisions.mjs +214 -0
- package/payload/.joycraft/runtime/artifacts/model.mjs +161 -0
- package/payload/.joycraft/runtime/artifacts/preferences.mjs +127 -0
- package/payload/.joycraft/runtime/artifacts/render.mjs +21 -0
- package/payload/.joycraft/runtime/artifacts/server.mjs +40 -0
- package/payload/.joycraft/runtime/completion.mjs +300 -0
- package/payload/.joycraft/runtime/context/cli.mjs +75 -0
- package/payload/.joycraft/runtime/context/index.mjs +29 -0
- package/payload/.joycraft/runtime/context/search.mjs +149 -0
- package/payload/.joycraft/runtime/delivery.mjs +142 -0
- package/payload/.joycraft/runtime/dispatch-preflight.mjs +535 -0
- package/payload/.joycraft/runtime/dispatch-start.mjs +98 -0
- package/payload/.joycraft/runtime/evidence.mjs +137 -0
- package/payload/.joycraft/runtime/identity.mjs +486 -0
- package/payload/.joycraft/runtime/kickoff.mjs +174 -0
- package/payload/.joycraft/runtime/redact.mjs +9 -0
- package/payload/.joycraft/runtime/retro.mjs +151 -0
- package/payload/.joycraft/runtime/review-tools.json +34 -0
- package/payload/.joycraft/runtime/review-tools.mjs +331 -0
- package/payload/.joycraft/runtime/scope.mjs +129 -0
- package/payload/.joycraft/runtime/update-check.mjs +142 -0
- package/payload/.joycraft/templates/README.md +7 -0
- package/payload/.joycraft/templates/artifact.json +33 -0
- package/payload/.joycraft/templates/brief.md +35 -0
- package/payload/.joycraft/templates/decisions.md +13 -0
- package/payload/.joycraft/templates/project-context.md +36 -0
- package/payload/.joycraft/templates/queue.json +27 -0
- package/payload/.joycraft/templates/spec.md +39 -0
- package/payload/.joycraft/templates/ui-slice.html +71 -0
- package/payload/PIN +74 -0
- package/payload/scripts/export.mjs +301 -0
- package/payload/scripts/hook-paths.mjs +35 -0
- package/payload/scripts/legacy-hooks.mjs +128 -0
- package/payload/scripts/legacy-inventory.json +117 -0
- package/dist/chunk-35RQLGKM.js +0 -2167
- package/dist/chunk-35RQLGKM.js.map +0 -1
- package/dist/chunk-7BPB2IKY.js +0 -255
- package/dist/chunk-7BPB2IKY.js.map +0 -1
- package/dist/chunk-B73DPYYC.js +0 -377
- package/dist/chunk-B73DPYYC.js.map +0 -1
- package/dist/chunk-GTP7Z52K.js +0 -3942
- package/dist/chunk-GTP7Z52K.js.map +0 -1
- package/dist/chunk-K4AI6FKB.js +0 -417
- package/dist/chunk-K4AI6FKB.js.map +0 -1
- package/dist/chunk-KKDKC4FM.js +0 -115
- package/dist/chunk-KKDKC4FM.js.map +0 -1
- package/dist/chunk-OMFGDJW4.js +0 -97
- package/dist/chunk-OMFGDJW4.js.map +0 -1
- package/dist/chunk-Z5JFEGWG.js +0 -563
- package/dist/chunk-Z5JFEGWG.js.map +0 -1
- package/dist/init-MUB5CC6L.js +0 -60
- package/dist/init-MUB5CC6L.js.map +0 -1
- package/dist/init-autofix-2DMBO4QN.js +0 -122
- package/dist/init-autofix-2DMBO4QN.js.map +0 -1
- package/dist/install-manifest-EQHT4474.js +0 -37
- package/dist/install-manifest-EQHT4474.js.map +0 -1
- package/dist/release-artifact-4TL5L2ZY.js +0 -14
- package/dist/release-artifact-4TL5L2ZY.js.map +0 -1
- package/dist/release-resolver-P2H46QTU.js +0 -293
- package/dist/release-resolver-P2H46QTU.js.map +0 -1
- package/dist/telemetry-store-IBO5GRTA.js +0 -14
- package/dist/telemetry-store-IBO5GRTA.js.map +0 -1
- package/dist/update-LFLQTPUA.js +0 -19
- package/dist/update-LFLQTPUA.js.map +0 -1
- package/dist/update-check-YT765NE7.js +0 -36
- package/dist/update-check-YT765NE7.js.map +0 -1
- package/dist/upgrade-L5WERK4X.js +0 -28
- package/dist/upgrade-L5WERK4X.js.map +0 -1
package/dist/chunk-OMFGDJW4.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
normalizeManifestPath
|
|
4
|
-
} from "./chunk-Z5JFEGWG.js";
|
|
5
|
-
|
|
6
|
-
// src/update-paths.ts
|
|
7
|
-
import { lstatSync, realpathSync } from "fs";
|
|
8
|
-
import { isAbsolute, join, relative, sep } from "path";
|
|
9
|
-
var UpdatePathError = class extends Error {
|
|
10
|
-
code;
|
|
11
|
-
path;
|
|
12
|
-
constructor(code, path, message) {
|
|
13
|
-
super(message);
|
|
14
|
-
this.name = "UpdatePathError";
|
|
15
|
-
this.code = code;
|
|
16
|
-
this.path = path;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
function validatePortableComponents(path) {
|
|
20
|
-
for (const component of path.split("/")) {
|
|
21
|
-
if (component.endsWith(".") || component.endsWith(" ")) {
|
|
22
|
-
throw new Error(`Update path component must not end with a dot or space: '${component}'.`);
|
|
23
|
-
}
|
|
24
|
-
if (component.includes(":")) {
|
|
25
|
-
throw new Error(`Update path component must not contain a colon: '${component}'.`);
|
|
26
|
-
}
|
|
27
|
-
if (/^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i.test(component)) {
|
|
28
|
-
throw new Error(`Update path component uses a reserved Windows device name: '${component}'.`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function resolveUpdatePath(root, relativePath) {
|
|
33
|
-
let portable;
|
|
34
|
-
try {
|
|
35
|
-
portable = normalizeManifestPath(relativePath);
|
|
36
|
-
} catch (error) {
|
|
37
|
-
throw new UpdatePathError(
|
|
38
|
-
"invalid-path",
|
|
39
|
-
relativePath,
|
|
40
|
-
error instanceof Error ? error.message : `Invalid update path '${relativePath}'.`
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
validatePortableComponents(portable);
|
|
45
|
-
} catch (error) {
|
|
46
|
-
throw new UpdatePathError(
|
|
47
|
-
"invalid-path",
|
|
48
|
-
relativePath,
|
|
49
|
-
error instanceof Error ? error.message : `Invalid update path '${relativePath}'.`
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
if (isAbsolute(portable)) {
|
|
53
|
-
throw new UpdatePathError("outside-root", portable, `Update path must stay inside the project root: '${portable}'.`);
|
|
54
|
-
}
|
|
55
|
-
let canonicalRoot;
|
|
56
|
-
try {
|
|
57
|
-
canonicalRoot = realpathSync(root);
|
|
58
|
-
if (!lstatSync(canonicalRoot).isDirectory()) {
|
|
59
|
-
throw new Error("root is not a directory");
|
|
60
|
-
}
|
|
61
|
-
} catch (error) {
|
|
62
|
-
throw new UpdatePathError(
|
|
63
|
-
"missing-root",
|
|
64
|
-
root,
|
|
65
|
-
`Unable to resolve project root '${root}': ${error instanceof Error ? error.message : String(error)}`
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
const candidate = join(canonicalRoot, ...portable.split("/"));
|
|
69
|
-
const escaped = relative(canonicalRoot, candidate);
|
|
70
|
-
if (escaped === ".." || escaped.startsWith(`..${sep}`) || isAbsolute(escaped)) {
|
|
71
|
-
throw new UpdatePathError("outside-root", portable, `Update path escapes the project root: '${portable}'.`);
|
|
72
|
-
}
|
|
73
|
-
let current = canonicalRoot;
|
|
74
|
-
const parts = portable.split("/");
|
|
75
|
-
for (let index = 0; index < parts.length; index += 1) {
|
|
76
|
-
current = join(current, parts[index]);
|
|
77
|
-
let stat;
|
|
78
|
-
try {
|
|
79
|
-
stat = lstatSync(current);
|
|
80
|
-
} catch (error) {
|
|
81
|
-
if (error.code === "ENOENT") break;
|
|
82
|
-
throw new UpdatePathError("invalid-path", portable, `Unable to inspect update path '${portable}': ${String(error)}`);
|
|
83
|
-
}
|
|
84
|
-
if (stat.isSymbolicLink()) {
|
|
85
|
-
throw new UpdatePathError("symlink", portable, `Update path traverses a symlink: '${portable}'.`);
|
|
86
|
-
}
|
|
87
|
-
if (index < parts.length - 1 && !stat.isDirectory()) {
|
|
88
|
-
throw new UpdatePathError("nondirectory-ancestor", portable, `Update path has a non-directory ancestor: '${portable}'.`);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return candidate;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
resolveUpdatePath
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=chunk-OMFGDJW4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/update-paths.ts"],"sourcesContent":["import { lstatSync, realpathSync } from 'node:fs';\nimport { isAbsolute, join, relative, sep } from 'node:path';\n\nimport { normalizeManifestPath } from './install-manifest.js';\n\nexport type UpdatePathErrorCode =\n | 'invalid-path'\n | 'outside-root'\n | 'missing-root'\n | 'symlink'\n | 'nondirectory-ancestor';\n\n/** A path rejected before an updater can stage, inspect, or mutate it. */\nexport class UpdatePathError extends Error {\n readonly code: UpdatePathErrorCode;\n readonly path: string;\n\n constructor(code: UpdatePathErrorCode, path: string, message: string) {\n super(message);\n this.name = 'UpdatePathError';\n this.code = code;\n this.path = path;\n }\n}\n\nfunction validatePortableComponents(path: string): void {\n for (const component of path.split('/')) {\n if (component.endsWith('.') || component.endsWith(' ')) {\n throw new Error(`Update path component must not end with a dot or space: '${component}'.`);\n }\n if (component.includes(':')) {\n throw new Error(`Update path component must not contain a colon: '${component}'.`);\n }\n // Windows reserves these device basenames even when an extension is\n // present. Reject them on every host so an update plan remains portable.\n if (/^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\\..*)?$/i.test(component)) {\n throw new Error(`Update path component uses a reserved Windows device name: '${component}'.`);\n }\n }\n}\n\n/**\n * Resolve a persisted project-relative path beneath a canonical project root.\n *\n * Every existing descendant is inspected with lstat, so symlinks are rejected\n * even when they point back inside the project. Missing trailing components are\n * allowed for staging and first-time writes; an existing ancestor must remain\n * a directory. Callers should repeat this check immediately before a mutation.\n */\nexport function resolveUpdatePath(root: string, relativePath: string): string {\n let portable: string;\n try {\n portable = normalizeManifestPath(relativePath);\n } catch (error) {\n throw new UpdatePathError(\n 'invalid-path',\n relativePath,\n error instanceof Error ? error.message : `Invalid update path '${relativePath}'.`,\n );\n }\n try {\n validatePortableComponents(portable);\n } catch (error) {\n throw new UpdatePathError(\n 'invalid-path',\n relativePath,\n error instanceof Error ? error.message : `Invalid update path '${relativePath}'.`,\n );\n }\n\n // normalizeManifestPath already rejects absolute paths, but retain an\n // explicit check at this boundary so this function remains safe if the\n // persistence validator changes later.\n if (isAbsolute(portable)) {\n throw new UpdatePathError('outside-root', portable, `Update path must stay inside the project root: '${portable}'.`);\n }\n\n let canonicalRoot: string;\n try {\n canonicalRoot = realpathSync(root);\n if (!lstatSync(canonicalRoot).isDirectory()) {\n throw new Error('root is not a directory');\n }\n } catch (error) {\n throw new UpdatePathError(\n 'missing-root',\n root,\n `Unable to resolve project root '${root}': ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n\n const candidate = join(canonicalRoot, ...portable.split('/'));\n const escaped = relative(canonicalRoot, candidate);\n if (escaped === '..' || escaped.startsWith(`..${sep}`) || isAbsolute(escaped)) {\n throw new UpdatePathError('outside-root', portable, `Update path escapes the project root: '${portable}'.`);\n }\n\n let current = canonicalRoot;\n const parts = portable.split('/');\n for (let index = 0; index < parts.length; index += 1) {\n current = join(current, parts[index]);\n let stat;\n try {\n stat = lstatSync(current);\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') break;\n throw new UpdatePathError('invalid-path', portable, `Unable to inspect update path '${portable}': ${String(error)}`);\n }\n if (stat.isSymbolicLink()) {\n throw new UpdatePathError('symlink', portable, `Update path traverses a symlink: '${portable}'.`);\n }\n if (index < parts.length - 1 && !stat.isDirectory()) {\n throw new UpdatePathError('nondirectory-ancestor', portable, `Update path has a non-directory ancestor: '${portable}'.`);\n }\n }\n\n return candidate;\n}\n"],"mappings":";;;;;;AAAA,SAAS,WAAW,oBAAoB;AACxC,SAAS,YAAY,MAAM,UAAU,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