@tanstack/intent 0.1.1 → 0.2.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/dist/artifact-coverage-CXX6wav1.mjs +2 -0
- package/dist/{artifact-coverage-nGwun1tt.mjs → artifact-coverage-DFtI6V_H.mjs} +1 -3
- package/dist/{cli-error-BrMXlbtx.mjs → cli-error-DDAO6DIL.mjs} +1 -2
- package/dist/{cli-support-C8SKYTA4.mjs → cli-support-BQSl7gAE.mjs} +8 -11
- package/dist/{cli-support-BADtMg6z.mjs → cli-support-DK1Kq8Ue.mjs} +2 -6
- package/dist/cli.d.mts +0 -1
- package/dist/cli.mjs +14 -16
- package/dist/{command-runner-fstUIUhe.mjs → command-runner-B5OofX0E.mjs} +1 -2
- package/dist/{core-hEMP5GMV.mjs → core-BRUBEMwe.mjs} +9 -13
- package/dist/core.d.mts +3 -4
- package/dist/core.mjs +2 -11
- package/dist/{display-CFnFnrtx.mjs → display-CnpA7XuV.mjs} +3 -7
- package/dist/{edit-package-json-DKyJ04t1.mjs → edit-package-json-D8xfcy2X.mjs} +1 -2
- package/dist/{exclude-CBxkyK3Q.mjs → exclude-DbHwcgQQ.mjs} +6 -11
- package/dist/{excludes-DDMe-4iu.mjs → excludes-ByvSbmmj.mjs} +3 -6
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +9 -14
- package/dist/{install-BE7gVoNT.mjs → install-CTGQvXoB.mjs} +18 -24
- package/dist/{list-UqYivAcV.mjs → list-9SbFGUd5.mjs} +5 -15
- package/dist/{load-Dgw151E3.mjs → load-BY8vh7Gp.mjs} +4 -14
- package/dist/{meta-BZMVgIzJ.mjs → meta-CF4XIYOo.mjs} +3 -5
- package/dist/{package-manager-BUgTjW9Q.mjs → package-manager-Dw7lYcI0.mjs} +1 -3
- package/dist/{project-context-DDCie6Ro.mjs → project-context-oi_m7paK.mjs} +2 -4
- package/dist/{resolver-CZXZ0rft.mjs → resolver-Uwx8B5jv.mjs} +4 -6
- package/dist/{scaffold-D2vwv9ls.mjs → scaffold-D8TAMXvs.mjs} +1 -3
- package/dist/{scanner-2XDBAsbm.mjs → scanner-qT_M6nV5.mjs} +7 -14
- package/dist/{setup-DW3pn0QW.d.mts → setup-CdfBc7Oe.d.mts} +0 -1
- package/dist/{setup-CMec7fht.mjs → setup-Cx1r2y-1.mjs} +3 -5
- package/dist/{setup-github-actions-emXSyGy3.mjs → setup-github-actions-IxZTZihi.mjs} +1 -2
- package/dist/setup.d.mts +1 -1
- package/dist/setup.mjs +3 -6
- package/dist/{skill-paths-Cr74uFk4.mjs → skill-paths-Bm1P6IYe.mjs} +2 -4
- package/dist/{skill-use-CUrNHf-u.mjs → skill-use-B2xRF1i9.mjs} +1 -2
- package/dist/{source-policy-rGOtjQSM.mjs → source-policy-DkR80hkL.mjs} +4 -7
- package/dist/source-policy-hMYcpIgm.mjs +2 -0
- package/dist/{stale-DxZyYibt.mjs → stale-DhjSTIt-.mjs} +3 -5
- package/dist/staleness-B5Cqe77_.mjs +2 -0
- package/dist/{staleness-B8IvDS_9.mjs → staleness-DoZU3lzy.mjs} +9 -16
- package/dist/{utils-Dj49bkF_.mjs → utils-6FtqhOYf.mjs} +1 -3
- package/dist/{utils-BuNMwKct.mjs → utils-BKBDYbCx.mjs} +2 -3
- package/dist/{validate-B3pkTIZl.mjs → validate-BSfTOq0v.mjs} +133 -46
- package/dist/{workflow-review-wL1Iu2Sf.mjs → workflow-review-B4AfwtHH.mjs} +1 -3
- package/dist/{workflow-review-CtOR1bgh.mjs → workflow-review-Bo2kPVXV.mjs} +2 -3
- package/dist/{workspace-patterns-Cz_lNhwz.mjs → workspace-patterns-BDoJIWk-.mjs} +2 -4
- package/dist/workspace-patterns-CrL8hAbd.mjs +2 -0
- package/meta/generate-skill/SKILL.md +34 -20
- package/meta/tree-generator/SKILL.md +42 -38
- package/package.json +5 -6
- package/dist/artifact-coverage-BfJ7f-S9.mjs +0 -3
- package/dist/source-policy-D4slvwwI.mjs +0 -9
- package/dist/staleness-Ctzy2Zac.mjs +0 -5
- package/dist/workspace-patterns-BBW4c1gr.mjs +0 -4
- /package/dist/{types-oEflMSso.d.mts → types-P6UfPVdp.d.mts} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { parse } from "yaml";
|
|
4
|
-
|
|
5
4
|
//#region src/artifact-coverage.ts
|
|
6
5
|
function isRecord(value) {
|
|
7
6
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -123,6 +122,5 @@ function readIntentArtifacts(root) {
|
|
|
123
122
|
warnings
|
|
124
123
|
};
|
|
125
124
|
}
|
|
126
|
-
|
|
127
125
|
//#endregion
|
|
128
|
-
export { readIntentArtifacts as t };
|
|
126
|
+
export { readIntentArtifacts as t };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as resolveProjectContext } from "./project-context-
|
|
2
|
-
import { t as fail } from "./cli-error-
|
|
1
|
+
import { t as resolveProjectContext } from "./project-context-oi_m7paK.mjs";
|
|
2
|
+
import { t as fail } from "./cli-error-DDAO6DIL.mjs";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
|
|
7
6
|
//#region src/cli-output.ts
|
|
8
7
|
function printWarnings(warnings) {
|
|
9
8
|
if (warnings.length === 0) return;
|
|
@@ -29,7 +28,6 @@ function printNotices(notices, options = {}) {
|
|
|
29
28
|
console.error("Notices:");
|
|
30
29
|
for (const notice of notices) console.error(` ℹ ${notice}`);
|
|
31
30
|
}
|
|
32
|
-
|
|
33
31
|
//#endregion
|
|
34
32
|
//#region src/cli-support.ts
|
|
35
33
|
const INTENT_CHECK_SKILLS_WORKFLOW_VERSION = 3;
|
|
@@ -46,11 +44,11 @@ function getCheckSkillsWorkflowAdvisories(root) {
|
|
|
46
44
|
return [];
|
|
47
45
|
}
|
|
48
46
|
const versionMatch = content.match(/intent-workflow-version:\s*(\d+)/);
|
|
49
|
-
if ((versionMatch ? Number(versionMatch[1]) : 0) >=
|
|
47
|
+
if ((versionMatch ? Number(versionMatch[1]) : 0) >= 3) return [];
|
|
50
48
|
return [`Intent workflow update available: run \`npx @tanstack/intent@latest setup\` to refresh ${relative(process.cwd(), workflowPath) || workflowPath}.`];
|
|
51
49
|
}
|
|
52
50
|
async function scanIntentsOrFail(coreOptions = {}) {
|
|
53
|
-
const { scanForPolicedIntents } = await import("./source-policy-
|
|
51
|
+
const { scanForPolicedIntents } = await import("./source-policy-hMYcpIgm.mjs");
|
|
54
52
|
try {
|
|
55
53
|
const { scan } = scanForPolicedIntents({
|
|
56
54
|
cwd: process.cwd(),
|
|
@@ -94,18 +92,18 @@ async function resolveStaleTargets(targetDir) {
|
|
|
94
92
|
targetPath: targetDir
|
|
95
93
|
});
|
|
96
94
|
const workflowAdvisories = getCheckSkillsWorkflowAdvisories(context.workspaceRoot ?? context.packageRoot ?? resolvedRoot);
|
|
97
|
-
const { buildWorkspaceCoverageSignals, checkStaleness, readPackageName } = await import("./staleness-
|
|
95
|
+
const { buildWorkspaceCoverageSignals, checkStaleness, readPackageName } = await import("./staleness-B5Cqe77_.mjs");
|
|
98
96
|
const isWorkspaceRootTarget = context.workspaceRoot !== null && resolvedRoot === context.workspaceRoot;
|
|
99
97
|
if (context.packageRoot && !isWorkspaceRootTarget && (context.targetSkillsDir !== null || context.workspaceRoot === null)) return {
|
|
100
98
|
reports: [await checkStaleness(context.packageRoot, readPackageName(context.packageRoot), context.workspaceRoot ?? context.packageRoot)],
|
|
101
99
|
workflowAdvisories
|
|
102
100
|
};
|
|
103
|
-
const { findWorkspaceRoot, getWorkspaceInfo } = await import("./workspace-patterns-
|
|
101
|
+
const { findWorkspaceRoot, getWorkspaceInfo } = await import("./workspace-patterns-CrL8hAbd.mjs");
|
|
104
102
|
const workspaceRoot = findWorkspaceRoot(resolvedRoot);
|
|
105
103
|
const workspaceInfo = workspaceRoot ? getWorkspaceInfo(workspaceRoot) : null;
|
|
106
104
|
if (workspaceInfo) {
|
|
107
105
|
const reports = await Promise.all(workspaceInfo.packageDirsWithSkills.map((packageDir) => checkStaleness(packageDir, readPackageName(packageDir), workspaceInfo.root)));
|
|
108
|
-
const { readIntentArtifacts } = await import("./artifact-coverage-
|
|
106
|
+
const { readIntentArtifacts } = await import("./artifact-coverage-CXX6wav1.mjs");
|
|
109
107
|
const artifacts = existsSync(join(workspaceInfo.root, "_artifacts")) ? readIntentArtifacts(workspaceInfo.root) : null;
|
|
110
108
|
const coverageSignals = buildWorkspaceCoverageSignals({
|
|
111
109
|
artifactRoot: workspaceInfo.root,
|
|
@@ -135,6 +133,5 @@ async function resolveStaleTargets(targetDir) {
|
|
|
135
133
|
workflowAdvisories
|
|
136
134
|
};
|
|
137
135
|
}
|
|
138
|
-
|
|
139
136
|
//#endregion
|
|
140
|
-
export { noticeOptionsFromGlobalFlags as a, scanIntentsOrFail as c, getMetaDir as i, printNotices as l, coreOptionsFromGlobalFlags as n, printDebugInfo as o, getCheckSkillsWorkflowAdvisories as r, resolveStaleTargets as s, INTENT_CHECK_SKILLS_WORKFLOW_VERSION as t, printWarnings as u };
|
|
137
|
+
export { noticeOptionsFromGlobalFlags as a, scanIntentsOrFail as c, getMetaDir as i, printNotices as l, coreOptionsFromGlobalFlags as n, printDebugInfo as o, getCheckSkillsWorkflowAdvisories as r, resolveStaleTargets as s, INTENT_CHECK_SKILLS_WORKFLOW_VERSION as t, printWarnings as u };
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
|
|
3
|
-
import "./project-context-DDCie6Ro.mjs";
|
|
4
|
-
import { a as noticeOptionsFromGlobalFlags, c as scanIntentsOrFail, i as getMetaDir, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, r as getCheckSkillsWorkflowAdvisories, s as resolveStaleTargets, t as INTENT_CHECK_SKILLS_WORKFLOW_VERSION, u as printWarnings } from "./cli-support-C8SKYTA4.mjs";
|
|
5
|
-
|
|
6
|
-
export { INTENT_CHECK_SKILLS_WORKFLOW_VERSION, coreOptionsFromGlobalFlags, getCheckSkillsWorkflowAdvisories, getMetaDir, noticeOptionsFromGlobalFlags, printDebugInfo, printNotices, printWarnings, resolveStaleTargets, scanIntentsOrFail };
|
|
1
|
+
import { a as noticeOptionsFromGlobalFlags, c as scanIntentsOrFail, i as getMetaDir, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, r as getCheckSkillsWorkflowAdvisories, s as resolveStaleTargets, t as INTENT_CHECK_SKILLS_WORKFLOW_VERSION, u as printWarnings } from "./cli-support-BQSl7gAE.mjs";
|
|
2
|
+
export { INTENT_CHECK_SKILLS_WORKFLOW_VERSION, coreOptionsFromGlobalFlags, getCheckSkillsWorkflowAdvisories, getMetaDir, noticeOptionsFromGlobalFlags, printDebugInfo, printNotices, printWarnings, resolveStaleTargets, scanIntentsOrFail };
|
package/dist/cli.d.mts
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as isCliFailure, t as fail } from "./cli-error-
|
|
2
|
+
import { n as isCliFailure, t as fail } from "./cli-error-DDAO6DIL.mjs";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { cac } from "cac";
|
|
6
|
-
|
|
7
6
|
//#region src/cli.ts
|
|
8
7
|
function createCli() {
|
|
9
8
|
const cli = cac("intent");
|
|
10
9
|
cli.usage("<command> [options]");
|
|
11
10
|
cli.command("list", "Discover intent-enabled packages from the project or workspace").usage("list [--json] [--debug] [--global] [--global-only] [--no-notices]").option("--json", "Output JSON").option("--debug", "Print discovery debug details to stderr").option("--global", "Include global packages after project packages").option("--global-only", "List global packages only").option("--no-notices", "Suppress non-critical notices on stderr").example("list").example("list --json").example("list --global").action(async (options) => {
|
|
12
|
-
const { runListCommand } = await import("./list-
|
|
11
|
+
const { runListCommand } = await import("./list-9SbFGUd5.mjs");
|
|
13
12
|
await runListCommand(options);
|
|
14
13
|
});
|
|
15
14
|
cli.command("exclude [action] [pattern]", "Manage package.json intent.exclude entries").usage("exclude [list|add|remove] [pattern] [--json]").option("--json", "Output JSON list of configured exclude patterns").example("exclude").example("exclude list --json").example("exclude add @tanstack/router#experimental-*").example("exclude remove @tanstack/router#experimental-*").action(async (action, pattern, options) => {
|
|
16
|
-
const { runExcludeCommand } = await import("./exclude-
|
|
15
|
+
const { runExcludeCommand } = await import("./exclude-DbHwcgQQ.mjs");
|
|
17
16
|
await runExcludeCommand(action, pattern, options);
|
|
18
17
|
});
|
|
19
18
|
cli.command("load [use]", "Load a compact skill use and print its SKILL.md").usage("load <use> [--path] [--json] [--debug] [--global] [--global-only]").option("--path", "Print the resolved skill path instead of file content").option("--json", "Output JSON").option("--debug", "Print resolution debug details to stderr").option("--global", "Load from project packages, then global packages").option("--global-only", "Load from global packages only").example("load @tanstack/query#core").example("load @tanstack/query#core --path").action(async (use, options) => {
|
|
20
|
-
const { runLoadCommand } = await import("./load-
|
|
19
|
+
const { runLoadCommand } = await import("./load-BY8vh7Gp.mjs");
|
|
21
20
|
await runLoadCommand(use, options);
|
|
22
21
|
});
|
|
23
22
|
cli.command("meta [name]", "List meta-skills, or print one by name").usage("meta [name]").example("meta").example("meta domain-discovery").action(async (name) => {
|
|
24
|
-
const [{ getMetaDir }, { runMetaCommand }] = await Promise.all([import("./cli-support-
|
|
23
|
+
const [{ getMetaDir }, { runMetaCommand }] = await Promise.all([import("./cli-support-DK1Kq8Ue.mjs"), import("./meta-CF4XIYOo.mjs")]);
|
|
25
24
|
await runMetaCommand(name, getMetaDir());
|
|
26
25
|
});
|
|
27
|
-
cli.command("validate [dir]", "Validate skill files").usage("validate [dir] [--github-summary]").option("--github-summary", "Write a GitHub Actions step summary").example("validate").example("validate packages/query/skills").action(async (dir, options) => {
|
|
28
|
-
const { runValidateCommand } = await import("./validate-
|
|
26
|
+
cli.command("validate [dir]", "Validate skill files").usage("validate [dir] [--github-summary] [--fix] [--check]").option("--github-summary", "Write a GitHub Actions step summary").option("--fix", "Rewrite fixable SKILL.md frontmatter issues").option("--check", "Fail if fixable SKILL.md frontmatter issues would be rewritten").example("validate").example("validate packages/query/skills").action(async (dir, options) => {
|
|
27
|
+
const { runValidateCommand } = await import("./validate-BSfTOq0v.mjs");
|
|
29
28
|
await runValidateCommand(dir, options);
|
|
30
29
|
});
|
|
31
30
|
cli.command("install", "Create or update skill loading guidance in an agent config file").usage("install [--map] [--dry-run] [--print-prompt] [--global] [--global-only] [--no-notices]").option("--map", "Write explicit skill-to-task mappings").option("--dry-run", "Print the generated block without writing").option("--print-prompt", "Print the legacy agent setup prompt instead of writing").option("--global", "Include global packages after project packages").option("--global-only", "Install mappings from global packages only").option("--no-notices", "Suppress non-critical notices on stderr").example("install").example("install --map").example("install --dry-run").example("install --print-prompt").example("install --global").action(async (options) => {
|
|
32
|
-
const [{ scanIntentsOrFail }, { runInstallCommand }] = await Promise.all([import("./cli-support-
|
|
31
|
+
const [{ scanIntentsOrFail }, { runInstallCommand }] = await Promise.all([import("./cli-support-DK1Kq8Ue.mjs"), import("./install-CTGQvXoB.mjs")]);
|
|
33
32
|
await runInstallCommand(options, scanIntentsOrFail);
|
|
34
33
|
});
|
|
35
34
|
cli.command("scaffold", "Print maintainer scaffold prompt").usage("scaffold").action(async () => {
|
|
36
|
-
const [{ getMetaDir }, { runScaffoldCommand }] = await Promise.all([import("./cli-support-
|
|
35
|
+
const [{ getMetaDir }, { runScaffoldCommand }] = await Promise.all([import("./cli-support-DK1Kq8Ue.mjs"), import("./scaffold-D8TAMXvs.mjs")]);
|
|
37
36
|
runScaffoldCommand(getMetaDir());
|
|
38
37
|
});
|
|
39
38
|
cli.command("stale [dir]", "Check skills for staleness in the current package or workspace").usage("stale [dir] [--json] [--github-review]").option("--json", "Output JSON").option("--github-review", "Write GitHub Actions review PR files").option("--package-label <label>", "Fallback package label for review PRs").example("stale").example("stale packages/query").example("stale --json").action(async (targetDir, options) => {
|
|
40
|
-
const [{ resolveStaleTargets }, { runStaleCommand }] = await Promise.all([import("./cli-support-
|
|
39
|
+
const [{ resolveStaleTargets }, { runStaleCommand }] = await Promise.all([import("./cli-support-DK1Kq8Ue.mjs"), import("./stale-DhjSTIt-.mjs")]);
|
|
41
40
|
await runStaleCommand(targetDir, options, resolveStaleTargets);
|
|
42
41
|
});
|
|
43
42
|
cli.command("edit-package-json", "Update package.json files so skills are published").usage("edit-package-json").action(async () => {
|
|
44
|
-
const { runEditPackageJsonCommand } = await import("./edit-package-json-
|
|
43
|
+
const { runEditPackageJsonCommand } = await import("./edit-package-json-D8xfcy2X.mjs");
|
|
45
44
|
await runEditPackageJsonCommand(process.cwd());
|
|
46
45
|
});
|
|
47
46
|
cli.command("setup", "Copy Intent CI workflow templates into .github/workflows/").usage("setup").action(async () => {
|
|
48
|
-
const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-
|
|
47
|
+
const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-DK1Kq8Ue.mjs"), import("./setup-github-actions-IxZTZihi.mjs")]);
|
|
49
48
|
await runSetupGithubActionsCommand(process.cwd(), getMetaDir());
|
|
50
49
|
});
|
|
51
50
|
cli.command("setup-github-actions", "Copy Intent CI workflow templates into .github/workflows/").usage("setup-github-actions").action(async () => {
|
|
52
|
-
const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-
|
|
51
|
+
const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-DK1Kq8Ue.mjs"), import("./setup-github-actions-IxZTZihi.mjs")]);
|
|
53
52
|
await runSetupGithubActionsCommand(process.cwd(), getMetaDir());
|
|
54
53
|
});
|
|
55
54
|
cli.command("help [command]", "Display help for a command").action((commandName) => {
|
|
@@ -107,6 +106,5 @@ if (isMainModule(import.meta.url, process.argv[1])) {
|
|
|
107
106
|
const exitCode = await main();
|
|
108
107
|
process.exit(exitCode);
|
|
109
108
|
}
|
|
110
|
-
|
|
111
109
|
//#endregion
|
|
112
|
-
export { isMainModule, main };
|
|
110
|
+
export { isMainModule, main };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { d as toPosixPath, i as getDeps, u as resolveDepDir } from "./utils-
|
|
2
|
-
import { n as scanIntentPackageAtRoot, r as createIntentFsCache } from "./scanner-
|
|
3
|
-
import { n as findWorkspacePackages } from "./workspace-patterns-
|
|
4
|
-
import { i as parseSkillUse, n as formatSkillUse } from "./skill-use-
|
|
5
|
-
import { t as resolveProjectContext } from "./project-context-
|
|
6
|
-
import { o as warningMentionsPackage, r as getEffectiveExcludePatterns, t as compileExcludePatterns } from "./excludes-
|
|
7
|
-
import { i as resolveSkillUse, r as resolveSkillEntry, t as ResolveSkillUseError } from "./resolver-
|
|
8
|
-
import { a as checkLoadAllowed, o as readSkillSourcesConfig, s as scanForPolicedIntents } from "./source-policy-
|
|
1
|
+
import { d as toPosixPath, i as getDeps, u as resolveDepDir } from "./utils-6FtqhOYf.mjs";
|
|
2
|
+
import { n as scanIntentPackageAtRoot, r as createIntentFsCache } from "./scanner-qT_M6nV5.mjs";
|
|
3
|
+
import { n as findWorkspacePackages } from "./workspace-patterns-BDoJIWk-.mjs";
|
|
4
|
+
import { i as parseSkillUse, n as formatSkillUse } from "./skill-use-B2xRF1i9.mjs";
|
|
5
|
+
import { t as resolveProjectContext } from "./project-context-oi_m7paK.mjs";
|
|
6
|
+
import { o as warningMentionsPackage, r as getEffectiveExcludePatterns, t as compileExcludePatterns } from "./excludes-ByvSbmmj.mjs";
|
|
7
|
+
import { i as resolveSkillUse, r as resolveSkillEntry, t as ResolveSkillUseError } from "./resolver-Uwx8B5jv.mjs";
|
|
8
|
+
import { a as checkLoadAllowed, o as readSkillSourcesConfig, s as scanForPolicedIntents } from "./source-policy-DkR80hkL.mjs";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
11
|
-
|
|
12
11
|
//#region src/core/markdown.ts
|
|
13
12
|
function resolveFromCwd$1(path) {
|
|
14
13
|
return resolve(process.cwd(), path);
|
|
@@ -212,7 +211,6 @@ function rewriteLoadedSkillMarkdownDestinations({ content, cwd, packageRoot, ski
|
|
|
212
211
|
}
|
|
213
212
|
return output;
|
|
214
213
|
}
|
|
215
|
-
|
|
216
214
|
//#endregion
|
|
217
215
|
//#region src/core/load-resolution.ts
|
|
218
216
|
function readWorkspacePackageInfos(context, fsCache) {
|
|
@@ -329,7 +327,6 @@ function resolveSkillUseFastPath(parsedUse, options, context = resolveProjectCon
|
|
|
329
327
|
if (!context.workspaceRoot) return null;
|
|
330
328
|
return resolveFromPackageRoots(getWorkspaceLoadFastPathCandidateDirs(parsedUse.packageName, context, fsCache), parsedUse, cwd, fsCache);
|
|
331
329
|
}
|
|
332
|
-
|
|
333
330
|
//#endregion
|
|
334
331
|
//#region src/core.ts
|
|
335
332
|
var IntentCoreError = class extends Error {
|
|
@@ -526,6 +523,5 @@ function loadIntentSkill(use, options = {}) {
|
|
|
526
523
|
content
|
|
527
524
|
};
|
|
528
525
|
}
|
|
529
|
-
|
|
530
526
|
//#endregion
|
|
531
|
-
export { resolveIntentSkill as i, listIntentSkills as n, loadIntentSkill as r, IntentCoreError as t };
|
|
527
|
+
export { resolveIntentSkill as i, listIntentSkills as n, loadIntentSkill as r, IntentCoreError as t };
|
package/dist/core.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as VersionConflict, c as PackageManager, d as ScanScope, f as ScanStats, s as IntentPackage } from "./types-
|
|
1
|
+
import { _ as VersionConflict, c as PackageManager, d as ScanScope, f as ScanStats, s as IntentPackage } from "./types-P6UfPVdp.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/core/types.d.ts
|
|
4
4
|
interface IntentCoreOptions {
|
|
@@ -58,7 +58,7 @@ interface IntentSkillListDebug {
|
|
|
58
58
|
warningCount: number;
|
|
59
59
|
noticeCount: number;
|
|
60
60
|
conflictCount: number;
|
|
61
|
-
scan:
|
|
61
|
+
scan: ScanStats;
|
|
62
62
|
}
|
|
63
63
|
interface LoadedIntentSkillDebug {
|
|
64
64
|
cwd: string;
|
|
@@ -71,9 +71,8 @@ interface LoadedIntentSkillDebug {
|
|
|
71
71
|
source: IntentPackage['source'];
|
|
72
72
|
path: string;
|
|
73
73
|
warningCount: number;
|
|
74
|
-
scan:
|
|
74
|
+
scan: ScanStats;
|
|
75
75
|
}
|
|
76
|
-
interface IntentScanDebugStats extends ScanStats {}
|
|
77
76
|
type IntentCoreErrorCode = 'invalid-options' | 'invalid-skill-use' | 'package-not-found' | 'package-excluded' | 'package-not-listed' | 'skill-excluded' | 'skill-not-found' | 'skill-path-outside-package' | 'skill-file-not-found';
|
|
78
77
|
//#endregion
|
|
79
78
|
//#region src/core.d.ts
|
package/dist/core.mjs
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
|
|
3
|
-
import "./scanner-2XDBAsbm.mjs";
|
|
4
|
-
import "./workspace-patterns-Cz_lNhwz.mjs";
|
|
5
|
-
import "./project-context-DDCie6Ro.mjs";
|
|
6
|
-
import "./excludes-DDMe-4iu.mjs";
|
|
7
|
-
import "./resolver-CZXZ0rft.mjs";
|
|
8
|
-
import { i as resolveIntentSkill, n as listIntentSkills, r as loadIntentSkill, t as IntentCoreError } from "./core-hEMP5GMV.mjs";
|
|
9
|
-
import "./source-policy-rGOtjQSM.mjs";
|
|
10
|
-
|
|
11
|
-
export { IntentCoreError, listIntentSkills, loadIntentSkill, resolveIntentSkill };
|
|
1
|
+
import { i as resolveIntentSkill, n as listIntentSkills, r as loadIntentSkill, t as IntentCoreError } from "./core-BRUBEMwe.mjs";
|
|
2
|
+
export { IntentCoreError, listIntentSkills, loadIntentSkill, resolveIntentSkill };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { n as isStableLoadPath, t as formatRuntimeSkillLookupHint } from "./skill-paths-Cr74uFk4.mjs";
|
|
3
|
-
|
|
1
|
+
import { n as isStableLoadPath, t as formatRuntimeSkillLookupHint } from "./skill-paths-Bm1P6IYe.mjs";
|
|
4
2
|
//#region src/display.ts
|
|
5
3
|
function padColumn(text, width) {
|
|
6
4
|
return text.length >= width ? text + " " : text.padEnd(width);
|
|
@@ -64,11 +62,9 @@ function computeSkillNameWidth(allPackageSkills) {
|
|
|
64
62
|
for (const skills of allPackageSkills) for (const s of skills) {
|
|
65
63
|
const slashIdx = s.name.indexOf("/");
|
|
66
64
|
const displayName = slashIdx === -1 ? s.name : s.name.slice(slashIdx + 1);
|
|
67
|
-
|
|
68
|
-
max = Math.max(max, indent + displayName.length);
|
|
65
|
+
max = Math.max(max, (slashIdx === -1 ? 4 : 6) + displayName.length);
|
|
69
66
|
}
|
|
70
67
|
return max + 2;
|
|
71
68
|
}
|
|
72
|
-
|
|
73
69
|
//#endregion
|
|
74
|
-
export { computeSkillNameWidth, printSkillTree, printTable };
|
|
70
|
+
export { computeSkillNameWidth, printSkillTree, printTable };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./project-context-DDCie6Ro.mjs";
|
|
4
|
-
import { t as compileExcludePatterns } from "./excludes-DDMe-4iu.mjs";
|
|
5
|
-
import { t as fail } from "./cli-error-BrMXlbtx.mjs";
|
|
1
|
+
import { t as compileExcludePatterns } from "./excludes-ByvSbmmj.mjs";
|
|
2
|
+
import { t as fail } from "./cli-error-DDAO6DIL.mjs";
|
|
6
3
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
4
|
import { join } from "node:path";
|
|
8
|
-
|
|
9
5
|
//#region src/commands/exclude.ts
|
|
10
6
|
function normalizeAction(action) {
|
|
11
7
|
if (!action) return "list";
|
|
@@ -94,11 +90,11 @@ async function runExcludeCommand(actionArg, patternArg, options) {
|
|
|
94
90
|
console.log(`Exclude pattern "${pattern}" is already configured.`);
|
|
95
91
|
return;
|
|
96
92
|
}
|
|
97
|
-
const updated
|
|
98
|
-
setConfiguredExcludes(pkg, updated
|
|
93
|
+
const updated = [...currentExcludes, pattern];
|
|
94
|
+
setConfiguredExcludes(pkg, updated);
|
|
99
95
|
writePackageJson(cwd, pkg);
|
|
100
96
|
if (options.json) {
|
|
101
|
-
printExcludes(updated
|
|
97
|
+
printExcludes(updated, true);
|
|
102
98
|
return;
|
|
103
99
|
}
|
|
104
100
|
console.log(`Added exclude pattern "${pattern}" to package.json intent.exclude.`);
|
|
@@ -121,6 +117,5 @@ async function runExcludeCommand(actionArg, patternArg, options) {
|
|
|
121
117
|
}
|
|
122
118
|
console.log(`Removed exclude pattern "${pattern}" from package.json intent.exclude.`);
|
|
123
119
|
}
|
|
124
|
-
|
|
125
120
|
//#endregion
|
|
126
|
-
export { runExcludeCommand };
|
|
121
|
+
export { runExcludeCommand };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as resolveProjectContext } from "./project-context-
|
|
1
|
+
import { t as resolveProjectContext } from "./project-context-oi_m7paK.mjs";
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
4
|
-
|
|
5
4
|
//#region src/core/package-json.ts
|
|
6
5
|
function readPackageJson(dir) {
|
|
7
6
|
try {
|
|
@@ -10,7 +9,6 @@ function readPackageJson(dir) {
|
|
|
10
9
|
return null;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
//#endregion
|
|
15
13
|
//#region src/core/excludes.ts
|
|
16
14
|
const MAX_EXCLUDE_PATTERN_LENGTH = 200;
|
|
@@ -52,7 +50,7 @@ function assertPatternLength(pattern) {
|
|
|
52
50
|
}
|
|
53
51
|
function globToRegExp(pattern) {
|
|
54
52
|
const source = pattern.replace(/\*+/g, "*").split("*").map((part) => part.replace(/[\\^$+?.()|[\]{}]/g, "\\$&")).join(".*");
|
|
55
|
-
return
|
|
53
|
+
return new RegExp(`^${source}$`);
|
|
56
54
|
}
|
|
57
55
|
function compileSegment(segment) {
|
|
58
56
|
if (!segment.includes("*")) return (value) => value === segment;
|
|
@@ -106,6 +104,5 @@ function warningMentionsPackage(warning, packageName) {
|
|
|
106
104
|
}
|
|
107
105
|
return false;
|
|
108
106
|
}
|
|
109
|
-
|
|
110
107
|
//#endregion
|
|
111
|
-
export { isSkillExcluded as a, isPackageExcluded as i, getConfigDirs as n, warningMentionsPackage as o, getEffectiveExcludePatterns as r, readPackageJson as s, compileExcludePatterns as t };
|
|
108
|
+
export { isSkillExcluded as a, isPackageExcluded as i, getConfigDirs as n, warningMentionsPackage as o, getEffectiveExcludePatterns as r, readPackageJson as s, compileExcludePatterns as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { _ as VersionConflict, a as IntentArtifactWarning, g as StalenessSignal, h as StalenessReport, i as IntentArtifactSkill, l as ScanOptions, m as SkillStaleness, n as IntentArtifactFile, o as IntentConfig, p as SkillEntry, r as IntentArtifactSet, s as IntentPackage, t as IntentArtifactCoverageIgnore, u as ScanResult } from "./types-
|
|
2
|
-
import { i as runEditPackageJson, o as runSetupGithubActions, r as SetupGithubActionsResult, t as EditPackageJsonResult } from "./setup-
|
|
1
|
+
import { _ as VersionConflict, a as IntentArtifactWarning, g as StalenessSignal, h as StalenessReport, i as IntentArtifactSkill, l as ScanOptions, m as SkillStaleness, n as IntentArtifactFile, o as IntentConfig, p as SkillEntry, r as IntentArtifactSet, s as IntentPackage, t as IntentArtifactCoverageIgnore, u as ScanResult } from "./types-P6UfPVdp.mjs";
|
|
2
|
+
import { i as runEditPackageJson, o as runSetupGithubActions, r as SetupGithubActionsResult, t as EditPackageJsonResult } from "./setup-CdfBc7Oe.mjs";
|
|
3
3
|
import { closeSync, existsSync, lstatSync, openSync, readFileSync, readSync, readdirSync, realpathSync } from "node:fs";
|
|
4
4
|
|
|
5
5
|
//#region src/utils.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* The subset of `node:fs` the scanner reads through. Under Yarn PnP this is
|
|
9
8
|
* swapped for Yarn's libzip-patched `fs` so reads can reach files inside
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { c as parseFrontmatter, i as getDeps, r as findSkillFiles, u as resolveDepDir } from "./utils-
|
|
2
|
-
import "./
|
|
3
|
-
import { t as
|
|
4
|
-
import "./
|
|
5
|
-
import { t as
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import "./excludes-DDMe-4iu.mjs";
|
|
11
|
-
import { i as resolveSkillUse, n as isResolveSkillUseError, t as ResolveSkillUseError } from "./resolver-CZXZ0rft.mjs";
|
|
12
|
-
import { r as runSetupGithubActions, t as runEditPackageJson } from "./setup-CMec7fht.mjs";
|
|
13
|
-
|
|
14
|
-
export { ResolveSkillUseError, SkillUseParseError, buildStaleReviewBody, checkStaleness, collectStaleReviewItems, createFailedStaleReviewItem, findSkillFiles, formatSkillUse, getDeps, isResolveSkillUseError, isSkillUseParseError, parseFrontmatter, parseSkillUse, readIntentArtifacts, resolveDepDir, resolveSkillUse, runEditPackageJson, runSetupGithubActions, scanForIntents };
|
|
1
|
+
import { c as parseFrontmatter, i as getDeps, r as findSkillFiles, u as resolveDepDir } from "./utils-6FtqhOYf.mjs";
|
|
2
|
+
import { t as scanForIntents } from "./scanner-qT_M6nV5.mjs";
|
|
3
|
+
import { t as readIntentArtifacts } from "./artifact-coverage-DFtI6V_H.mjs";
|
|
4
|
+
import { n as checkStaleness } from "./staleness-DoZU3lzy.mjs";
|
|
5
|
+
import { n as collectStaleReviewItems, r as createFailedStaleReviewItem, t as buildStaleReviewBody } from "./workflow-review-B4AfwtHH.mjs";
|
|
6
|
+
import { i as parseSkillUse, n as formatSkillUse, r as isSkillUseParseError, t as SkillUseParseError } from "./skill-use-B2xRF1i9.mjs";
|
|
7
|
+
import { i as resolveSkillUse, n as isResolveSkillUseError, t as ResolveSkillUseError } from "./resolver-Uwx8B5jv.mjs";
|
|
8
|
+
import { r as runSetupGithubActions, t as runEditPackageJson } from "./setup-Cx1r2y-1.mjs";
|
|
9
|
+
export { ResolveSkillUseError, SkillUseParseError, buildStaleReviewBody, checkStaleness, collectStaleReviewItems, createFailedStaleReviewItem, findSkillFiles, formatSkillUse, getDeps, isResolveSkillUseError, isSkillUseParseError, parseFrontmatter, parseSkillUse, readIntentArtifacts, resolveDepDir, resolveSkillUse, runEditPackageJson, runSetupGithubActions, scanForIntents };
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import { t as fail } from "./cli-error-BrMXlbtx.mjs";
|
|
7
|
-
import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, u as printWarnings } from "./cli-support-C8SKYTA4.mjs";
|
|
8
|
-
import { t as formatIntentCommand } from "./command-runner-fstUIUhe.mjs";
|
|
1
|
+
import { t as detectPackageManager } from "./package-manager-Dw7lYcI0.mjs";
|
|
2
|
+
import { i as parseSkillUse, n as formatSkillUse } from "./skill-use-B2xRF1i9.mjs";
|
|
3
|
+
import { t as fail } from "./cli-error-DDAO6DIL.mjs";
|
|
4
|
+
import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, u as printWarnings } from "./cli-support-BQSl7gAE.mjs";
|
|
5
|
+
import { t as formatIntentCommand } from "./command-runner-B5OofX0E.mjs";
|
|
9
6
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
7
|
import { dirname, join, relative } from "node:path";
|
|
11
8
|
import { parse } from "yaml";
|
|
12
|
-
|
|
13
9
|
//#region src/commands/install-writer.ts
|
|
14
10
|
const INTENT_SKILLS_START = "<!-- intent-skills:start -->";
|
|
15
11
|
const INTENT_SKILLS_END = "<!-- intent-skills:end -->";
|
|
@@ -233,7 +229,6 @@ function writeIntentSkillsBlock({ block, mappingCount, root, skipWhenEmpty = tru
|
|
|
233
229
|
targetPath
|
|
234
230
|
};
|
|
235
231
|
}
|
|
236
|
-
|
|
237
232
|
//#endregion
|
|
238
233
|
//#region src/commands/install.ts
|
|
239
234
|
const INSTALL_PROMPT = `You are an AI assistant helping a developer set up skill-to-task mappings for their project.
|
|
@@ -387,27 +382,27 @@ async function runInstallCommand(options, scanIntentsOrFail) {
|
|
|
387
382
|
const coreOptions = coreOptionsFromGlobalFlags(options);
|
|
388
383
|
const noticeOptions = noticeOptionsFromGlobalFlags(options);
|
|
389
384
|
if (!options.map) {
|
|
390
|
-
const generated
|
|
385
|
+
const generated = buildIntentSkillGuidanceBlock(detectPackageManager());
|
|
391
386
|
if (options.dryRun) {
|
|
392
387
|
const targetPath = resolveIntentSkillsBlockTargetPath(process.cwd(), 1);
|
|
393
388
|
console.log(`Generated skill loading guidance for ${formatTargetPath(targetPath)}.`);
|
|
394
|
-
console.log(generated
|
|
389
|
+
console.log(generated.block);
|
|
395
390
|
return;
|
|
396
391
|
}
|
|
397
|
-
const result
|
|
398
|
-
...generated
|
|
392
|
+
const result = writeIntentSkillsBlock({
|
|
393
|
+
...generated,
|
|
399
394
|
root: process.cwd(),
|
|
400
395
|
skipWhenEmpty: false
|
|
401
396
|
});
|
|
402
|
-
if (!result
|
|
403
|
-
const verification
|
|
404
|
-
expectedBlock: generated
|
|
405
|
-
targetPath: result
|
|
397
|
+
if (!result.targetPath) fail("Install guidance target was not created.");
|
|
398
|
+
const verification = verifyIntentSkillsBlockFile({
|
|
399
|
+
expectedBlock: generated.block,
|
|
400
|
+
targetPath: result.targetPath
|
|
406
401
|
});
|
|
407
|
-
const target
|
|
408
|
-
if (!verification
|
|
409
|
-
printWriteResult(result
|
|
410
|
-
printPlacementTip(result
|
|
402
|
+
const target = formatTargetPath(result.targetPath);
|
|
403
|
+
if (!verification.ok) fail([`Install verification failed for ${target}:`, ...verification.errors.map((error) => `- ${error}`)].join("\n"));
|
|
404
|
+
printWriteResult(result);
|
|
405
|
+
printPlacementTip(result.targetPath);
|
|
411
406
|
return;
|
|
412
407
|
}
|
|
413
408
|
const scanResult = await scanIntentsOrFail(coreOptions);
|
|
@@ -444,6 +439,5 @@ async function runInstallCommand(options, scanIntentsOrFail) {
|
|
|
444
439
|
printWarnings(scanResult.warnings);
|
|
445
440
|
printNotices(scanResult.notices, noticeOptions);
|
|
446
441
|
}
|
|
447
|
-
|
|
448
442
|
//#endregion
|
|
449
|
-
export { INSTALL_PROMPT, runInstallCommand };
|
|
443
|
+
export { INSTALL_PROMPT, runInstallCommand };
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./workspace-patterns-Cz_lNhwz.mjs";
|
|
5
|
-
import "./project-context-DDCie6Ro.mjs";
|
|
6
|
-
import "./excludes-DDMe-4iu.mjs";
|
|
7
|
-
import "./resolver-CZXZ0rft.mjs";
|
|
8
|
-
import { n as listIntentSkills } from "./core-hEMP5GMV.mjs";
|
|
9
|
-
import "./source-policy-rGOtjQSM.mjs";
|
|
10
|
-
import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, u as printWarnings } from "./cli-support-C8SKYTA4.mjs";
|
|
11
|
-
import { t as formatIntentCommand } from "./command-runner-fstUIUhe.mjs";
|
|
12
|
-
|
|
1
|
+
import { n as listIntentSkills } from "./core-BRUBEMwe.mjs";
|
|
2
|
+
import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, u as printWarnings } from "./cli-support-BQSl7gAE.mjs";
|
|
3
|
+
import { t as formatIntentCommand } from "./command-runner-B5OofX0E.mjs";
|
|
13
4
|
//#region src/commands/list.ts
|
|
14
5
|
function printListDebug(result) {
|
|
15
6
|
if (!result.debug) return;
|
|
@@ -63,7 +54,7 @@ async function runListCommand(options) {
|
|
|
63
54
|
console.log(JSON.stringify(jsonResult, null, 2));
|
|
64
55
|
return;
|
|
65
56
|
}
|
|
66
|
-
const { computeSkillNameWidth, printSkillTree, printTable } = await import("./display-
|
|
57
|
+
const { computeSkillNameWidth, printSkillTree, printTable } = await import("./display-CnpA7XuV.mjs");
|
|
67
58
|
if (result.packages.length === 0) {
|
|
68
59
|
console.log("No intent-enabled packages found.");
|
|
69
60
|
if (result.warnings.length > 0) {
|
|
@@ -112,6 +103,5 @@ async function runListCommand(options) {
|
|
|
112
103
|
printWarnings(result.warnings);
|
|
113
104
|
printNotices(result.notices, noticeOptions);
|
|
114
105
|
}
|
|
115
|
-
|
|
116
106
|
//#endregion
|
|
117
|
-
export { runListCommand };
|
|
107
|
+
export { runListCommand };
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./workspace-patterns-Cz_lNhwz.mjs";
|
|
5
|
-
import "./project-context-DDCie6Ro.mjs";
|
|
6
|
-
import "./excludes-DDMe-4iu.mjs";
|
|
7
|
-
import "./resolver-CZXZ0rft.mjs";
|
|
8
|
-
import { t as fail } from "./cli-error-BrMXlbtx.mjs";
|
|
9
|
-
import { i as resolveIntentSkill, r as loadIntentSkill, t as IntentCoreError } from "./core-hEMP5GMV.mjs";
|
|
10
|
-
import "./source-policy-rGOtjQSM.mjs";
|
|
11
|
-
import { n as coreOptionsFromGlobalFlags, o as printDebugInfo } from "./cli-support-C8SKYTA4.mjs";
|
|
12
|
-
|
|
1
|
+
import { t as fail } from "./cli-error-DDAO6DIL.mjs";
|
|
2
|
+
import { i as resolveIntentSkill, r as loadIntentSkill, t as IntentCoreError } from "./core-BRUBEMwe.mjs";
|
|
3
|
+
import { n as coreOptionsFromGlobalFlags, o as printDebugInfo } from "./cli-support-BQSl7gAE.mjs";
|
|
13
4
|
//#region src/commands/load.ts
|
|
14
5
|
function printLoadDebug(loaded) {
|
|
15
6
|
if (!loaded.debug) return;
|
|
@@ -69,6 +60,5 @@ async function runLoadCommand(use, options) {
|
|
|
69
60
|
process.stdout.write(loaded.content);
|
|
70
61
|
for (const warning of loaded.warnings) console.error(`Warning: ${warning}`);
|
|
71
62
|
}
|
|
72
|
-
|
|
73
63
|
//#endregion
|
|
74
|
-
export { runLoadCommand };
|
|
64
|
+
export { runLoadCommand };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as fail } from "./cli-error-
|
|
1
|
+
import { t as fail } from "./cli-error-DDAO6DIL.mjs";
|
|
2
2
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
|
|
5
4
|
//#region src/commands/meta.ts
|
|
6
5
|
async function runMetaCommand(name, metaDir) {
|
|
7
6
|
if (!existsSync(metaDir)) fail("Meta-skills directory not found.");
|
|
@@ -16,7 +15,7 @@ async function runMetaCommand(name, metaDir) {
|
|
|
16
15
|
}
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
|
-
const { parseFrontmatter } = await import("./utils-
|
|
18
|
+
const { parseFrontmatter } = await import("./utils-BKBDYbCx.mjs");
|
|
20
19
|
const entries = readdirSync(metaDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => existsSync(join(metaDir, entry.name, "SKILL.md")));
|
|
21
20
|
if (entries.length === 0) {
|
|
22
21
|
console.log("No meta-skills found.");
|
|
@@ -33,6 +32,5 @@ async function runMetaCommand(name, metaDir) {
|
|
|
33
32
|
console.log("\nUsage: load the SKILL.md into your AI agent conversation.");
|
|
34
33
|
console.log("Path: node_modules/@tanstack/intent/meta/<name>/SKILL.md");
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
//#endregion
|
|
38
|
-
export { runMetaCommand };
|
|
36
|
+
export { runMetaCommand };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join, resolve } from "node:path";
|
|
3
|
-
|
|
4
3
|
//#region src/package-manager.ts
|
|
5
4
|
function readPackageManagerField(dir) {
|
|
6
5
|
try {
|
|
@@ -43,6 +42,5 @@ function detectPackageManager(cwd = process.cwd(), extraDirs = []) {
|
|
|
43
42
|
}
|
|
44
43
|
return "unknown";
|
|
45
44
|
}
|
|
46
|
-
|
|
47
45
|
//#endregion
|
|
48
|
-
export { detectPackageManager as t };
|
|
46
|
+
export { detectPackageManager as t };
|