@tanstack/intent 0.1.0 → 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/README.md +0 -3
- 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-BevVu4gw.mjs → cli-support-BQSl7gAE.mjs} +8 -11
- package/dist/{cli-support-Cpo_9JfL.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-6UP6jyL8.mjs → core-BRUBEMwe.mjs} +9 -13
- package/dist/core.d.mts +3 -4
- package/dist/core.mjs +2 -11
- package/dist/{display-CVMGtcHz.mjs → display-CnpA7XuV.mjs} +3 -7
- package/dist/{edit-package-json-DKyJ04t1.mjs → edit-package-json-D8xfcy2X.mjs} +1 -2
- package/dist/{exclude-BTaE6TNh.mjs → exclude-DbHwcgQQ.mjs} +6 -11
- package/dist/{excludes-DG83YEzb.mjs → excludes-ByvSbmmj.mjs} +3 -6
- package/dist/index.d.mts +3 -31
- package/dist/index.mjs +9 -280
- package/dist/{install-DXQsQQIL.mjs → install-CTGQvXoB.mjs} +18 -24
- package/dist/{list-CxB37mvm.mjs → list-9SbFGUd5.mjs} +5 -19
- package/dist/{load-Ch4UjIza.mjs → load-BY8vh7Gp.mjs} +4 -14
- package/dist/{meta-C-t9P5Ls.mjs → meta-CF4XIYOo.mjs} +3 -5
- package/dist/{package-manager-BUgTjW9Q.mjs → package-manager-Dw7lYcI0.mjs} +1 -3
- package/dist/{project-context-DBSibDPb.mjs → project-context-oi_m7paK.mjs} +2 -4
- package/dist/{resolver-CDbVXv4g.mjs → resolver-Uwx8B5jv.mjs} +4 -6
- package/dist/{scaffold-D2vwv9ls.mjs → scaffold-D8TAMXvs.mjs} +1 -3
- package/dist/{scanner-CRCZwhKS.mjs → scanner-qT_M6nV5.mjs} +9 -16
- package/dist/{setup-DW3pn0QW.d.mts → setup-CdfBc7Oe.d.mts} +0 -1
- package/dist/{setup-DpCYUVSf.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-B-j0dWDA.mjs → skill-paths-Bm1P6IYe.mjs} +2 -4
- package/dist/{skill-use-CUrNHf-u.mjs → skill-use-B2xRF1i9.mjs} +1 -2
- package/dist/{source-policy-DaImacFt.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-DVFARTES.mjs → staleness-DoZU3lzy.mjs} +10 -17
- package/dist/{types-DhITOzhi.d.mts → types-P6UfPVdp.d.mts} +1 -33
- package/dist/{utils-9fhWAVua.mjs → utils-6FtqhOYf.mjs} +14 -3
- package/dist/utils-BKBDYbCx.mjs +2 -0
- package/dist/{validate-CnQBn6v9.mjs → validate-BSfTOq0v.mjs} +134 -47
- 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-BffPlZ1D.mjs → workspace-patterns-BDoJIWk-.mjs} +2 -4
- package/dist/workspace-patterns-CrL8hAbd.mjs +2 -0
- package/meta/domain-discovery/SKILL.md +1 -1
- package/meta/generate-skill/SKILL.md +35 -28
- package/meta/tree-generator/SKILL.md +43 -39
- package/package.json +5 -6
- package/dist/artifact-coverage-BfJ7f-S9.mjs +0 -3
- package/dist/source-policy-y3sktvzu.mjs +0 -9
- package/dist/staleness-BoFc6DMh.mjs +0 -5
- package/dist/utils-CSPzvaFu.mjs +0 -3
- package/dist/workspace-patterns-Bjq_cXww.mjs +0 -4
- package/meta/feedback-collection/SKILL.md +0 -234
package/README.md
CHANGED
|
@@ -117,8 +117,6 @@ npx @tanstack/intent@latest setup
|
|
|
117
117
|
|
|
118
118
|
The real risk with any derived artifact is staleness. `npx @tanstack/intent@latest stale` flags skills whose source docs have changed, generated skills that drift from `_artifacts`, and public workspace packages missing coverage. CI templates catch drift before it ships.
|
|
119
119
|
|
|
120
|
-
The feedback loop runs both directions. `npx @tanstack/intent@latest feedback` lets users submit structured reports when a skill produces wrong output — which skill, which version, what broke. That context flows back to the maintainer, and the fix ships to everyone on the next package update. Every support interaction produces an artifact that prevents the same class of problem for all future users — not just the one who reported it.
|
|
121
|
-
|
|
122
120
|
## CLI Commands
|
|
123
121
|
|
|
124
122
|
| Command | Description |
|
|
@@ -131,7 +129,6 @@ The feedback loop runs both directions. `npx @tanstack/intent@latest feedback` l
|
|
|
131
129
|
| `npx @tanstack/intent@latest validate [dir]` | Validate SKILL.md files |
|
|
132
130
|
| `npx @tanstack/intent@latest setup` | Copy CI templates into your repo |
|
|
133
131
|
| `npx @tanstack/intent@latest stale [dir] [--json]` | Check skills for version drift |
|
|
134
|
-
| `npx @tanstack/intent@latest feedback` | Submit skill feedback |
|
|
135
132
|
|
|
136
133
|
## License
|
|
137
134
|
|
|
@@ -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-DBSibDPb.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-BevVu4gw.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 {
|
|
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 {
|
|
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-CRCZwhKS.mjs";
|
|
4
|
-
import "./workspace-patterns-BffPlZ1D.mjs";
|
|
5
|
-
import "./project-context-DBSibDPb.mjs";
|
|
6
|
-
import "./excludes-DG83YEzb.mjs";
|
|
7
|
-
import "./resolver-CDbVXv4g.mjs";
|
|
8
|
-
import { i as resolveIntentSkill, n as listIntentSkills, r as loadIntentSkill, t as IntentCoreError } from "./core-6UP6jyL8.mjs";
|
|
9
|
-
import "./source-policy-DaImacFt.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-B-j0dWDA.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-DBSibDPb.mjs";
|
|
4
|
-
import { t as compileExcludePatterns } from "./excludes-DG83YEzb.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 {
|
|
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
|
|
@@ -65,33 +64,6 @@ declare function collectStaleReviewItems(reports: Array<StalenessReport>): Array
|
|
|
65
64
|
declare function createFailedStaleReviewItem(library: string): StaleReviewItem;
|
|
66
65
|
declare function buildStaleReviewBody(items: Array<StaleReviewItem>): string;
|
|
67
66
|
//#endregion
|
|
68
|
-
//#region src/feedback.d.ts
|
|
69
|
-
declare function containsSecrets(text: string): boolean;
|
|
70
|
-
declare function hasGhCli(): boolean;
|
|
71
|
-
declare function resolveFrequency(root: string): string;
|
|
72
|
-
declare function validatePayload(payload: unknown): {
|
|
73
|
-
valid: boolean;
|
|
74
|
-
errors: Array<string>;
|
|
75
|
-
};
|
|
76
|
-
declare function validateMetaPayload(payload: unknown): {
|
|
77
|
-
valid: boolean;
|
|
78
|
-
errors: Array<string>;
|
|
79
|
-
};
|
|
80
|
-
declare function metaToMarkdown(payload: MetaFeedbackPayload): string;
|
|
81
|
-
declare function toMarkdown(payload: FeedbackPayload): string;
|
|
82
|
-
interface SubmitResult {
|
|
83
|
-
method: 'gh' | 'file' | 'stdout';
|
|
84
|
-
detail: string;
|
|
85
|
-
}
|
|
86
|
-
declare function submitFeedback(payload: FeedbackPayload, repo: string, opts: {
|
|
87
|
-
ghAvailable: boolean;
|
|
88
|
-
outputPath?: string;
|
|
89
|
-
}): SubmitResult;
|
|
90
|
-
declare function submitMetaFeedback(payload: MetaFeedbackPayload, opts: {
|
|
91
|
-
ghAvailable: boolean;
|
|
92
|
-
outputPath?: string;
|
|
93
|
-
}): SubmitResult;
|
|
94
|
-
//#endregion
|
|
95
67
|
//#region src/skill-use.d.ts
|
|
96
68
|
interface SkillUse {
|
|
97
69
|
packageName: string;
|
|
@@ -148,4 +120,4 @@ declare class ResolveSkillUseError extends Error {
|
|
|
148
120
|
declare function isResolveSkillUseError(error: unknown): error is ResolveSkillUseError;
|
|
149
121
|
declare function resolveSkillUse(use: string, scanResult: ScanResult): ResolveSkillResult;
|
|
150
122
|
//#endregion
|
|
151
|
-
export { type
|
|
123
|
+
export { type EditPackageJsonResult, type IntentArtifactCoverageIgnore, type IntentArtifactFile, type IntentArtifactSet, type IntentArtifactSkill, type IntentArtifactWarning, type IntentConfig, type IntentPackage, type ResolveSkillResult, ResolveSkillUseError, type ResolveSkillUseErrorCode, type ScanOptions, type ScanResult, type SetupGithubActionsResult, type SkillEntry, type SkillStaleness, type SkillUse, SkillUseParseError, type SkillUseParseErrorCode, type StaleReviewItem, type StalenessReport, type StalenessSignal, buildStaleReviewBody, checkStaleness, collectStaleReviewItems, createFailedStaleReviewItem, findSkillFiles, formatSkillUse, getDeps, isResolveSkillUseError, isSkillUseParseError, parseFrontmatter, parseSkillUse, readIntentArtifacts, resolveDepDir, resolveSkillUse, runEditPackageJson, runSetupGithubActions, scanForIntents };
|