@nseng-ai/areg 0.1.1 → 0.1.2
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/package.json +7 -6
- package/src/cli.ts +0 -33
- package/src/context.ts +3 -29
- package/src/fake-gateways.ts +108 -380
- package/src/gateways/errors.ts +2 -2
- package/src/gateways/fs-utils.ts +2 -2
- package/src/gateways/project-fs.ts +29 -41
- package/src/gateways/project-gateway.ts +98 -31
- package/src/gateways.ts +34 -150
- package/src/index.ts +2 -28
- package/src/operations/check.ts +33 -20
- package/src/operations/doctor-skills.ts +71 -7
- package/src/operations/file-state.ts +4 -4
- package/src/operations/manifest-source-findings.ts +45 -0
- package/src/operations/manifest-sources.ts +119 -0
- package/src/operations/pi-settings.ts +2 -5
- package/src/operations/project-inspection.ts +32 -28
- package/src/operations/project-mutations.ts +5 -21
- package/src/operations/project-resolution.ts +2 -2
- package/src/operations/skill-find.ts +23 -3
- package/src/operations/skill-kind-apply-plan.ts +2 -2
- package/src/operations/skill-kind-frontmatter.ts +1 -1
- package/src/operations/skill-kind-inference.ts +30 -14
- package/src/operations/skill-kind.ts +34 -12
- package/src/sort.ts +3 -3
- package/src/gateways/command-constants.ts +0 -1
- package/src/gateways/github-gateway.ts +0 -111
- package/src/gateways/host-gateway.ts +0 -35
- package/src/gateways/mutation-policy.ts +0 -94
- package/src/gateways/npx-skills-gateway.ts +0 -53
- package/src/gateways/prompt-gateway.ts +0 -21
- package/src/gateways/skillx-workspace-gateway.ts +0 -220
- package/src/operations/frontmatter.ts +0 -151
- package/src/operations/init.ts +0 -548
- package/src/operations/lockfile.ts +0 -107
- package/src/operations/managed-markdown-block.ts +0 -47
- package/src/operations/project-agents.ts +0 -115
- package/src/operations/skill-mirror-conventions.ts +0 -126
- package/src/operations/skillx.ts +0 -305
- package/src/operations/toml-section.ts +0 -53
- package/src/operations/update-skills.ts +0 -325
- package/src/real-gateways.ts +0 -6
- package/src/skill-lookup.ts +0 -254
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nseng-ai/areg",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src"
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
".": "./src/index.ts"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@nseng-ai/capability-kit": "0.1.
|
|
23
|
-
"@nseng-ai/clinkr": "0.1.
|
|
24
|
-
"@nseng-ai/command-backed-skill-registry": "0.1.
|
|
25
|
-
"@nseng-ai/foundation": "0.1.
|
|
26
|
-
"
|
|
22
|
+
"@nseng-ai/capability-kit": "0.1.2",
|
|
23
|
+
"@nseng-ai/clinkr": "0.1.2",
|
|
24
|
+
"@nseng-ai/command-backed-skill-registry": "0.1.2",
|
|
25
|
+
"@nseng-ai/foundation": "0.1.2",
|
|
26
|
+
"@nseng-ai/harness-artifacts": "0.1.2",
|
|
27
|
+
"@nseng-ai/kernel": "0.1.2",
|
|
27
28
|
"zod": "^4.4.3"
|
|
28
29
|
}
|
|
29
30
|
}
|
package/src/cli.ts
CHANGED
|
@@ -16,15 +16,7 @@ import {
|
|
|
16
16
|
renderCheck,
|
|
17
17
|
runCheck,
|
|
18
18
|
} from "./operations/check.ts";
|
|
19
|
-
import { initRequestSchema, initResultSchema, renderInit, runInit } from "./operations/init.ts";
|
|
20
19
|
import { buildSkillGroup } from "./operations/skill-kind.ts";
|
|
21
|
-
import { buildSkillxGroup } from "./operations/skillx.ts";
|
|
22
|
-
import {
|
|
23
|
-
renderUpdateSkills,
|
|
24
|
-
runUpdateSkills,
|
|
25
|
-
updateSkillsRequestSchema,
|
|
26
|
-
updateSkillsResultSchema,
|
|
27
|
-
} from "./operations/update-skills.ts";
|
|
28
20
|
|
|
29
21
|
export interface CliDeps extends Pick<CliEntrypointDeps, "cwd" | "env" | "stdout" | "stderr"> {
|
|
30
22
|
context?: AregCliContext;
|
|
@@ -46,16 +38,6 @@ const entry = defineCli<AregCliContext, CliDeps, undefined>({
|
|
|
46
38
|
return { type: "run", context: runContext, buildState: undefined };
|
|
47
39
|
},
|
|
48
40
|
configureCli: ({ root }) => {
|
|
49
|
-
root.command({
|
|
50
|
-
name: "init",
|
|
51
|
-
description: "Initialize an existing Git project for areg skill workflows.",
|
|
52
|
-
schema: initRequestSchema,
|
|
53
|
-
positionals: { target: { position: 0 } },
|
|
54
|
-
options: { yes: { short: "-y" } },
|
|
55
|
-
resultSchema: initResultSchema,
|
|
56
|
-
handler: runInit,
|
|
57
|
-
renderHuman: renderInit,
|
|
58
|
-
});
|
|
59
41
|
root.command({
|
|
60
42
|
name: "check",
|
|
61
43
|
description: "Check that skills follow areg conventions.",
|
|
@@ -64,14 +46,6 @@ const entry = defineCli<AregCliContext, CliDeps, undefined>({
|
|
|
64
46
|
handler: runCheck,
|
|
65
47
|
renderHuman: renderCheck,
|
|
66
48
|
});
|
|
67
|
-
root.command({
|
|
68
|
-
name: "update-skills",
|
|
69
|
-
description: "Refresh GitHub-sourced skills recorded in skills-lock.json.",
|
|
70
|
-
schema: updateSkillsRequestSchema,
|
|
71
|
-
resultSchema: updateSkillsResultSchema,
|
|
72
|
-
handler: runUpdateSkills,
|
|
73
|
-
renderHuman: renderUpdateSkills,
|
|
74
|
-
});
|
|
75
49
|
const doctorGroup = new ClinkrGroup<AregCliContext>({
|
|
76
50
|
name: "doctor",
|
|
77
51
|
description: "Diagnose areg project drift.",
|
|
@@ -86,13 +60,6 @@ const entry = defineCli<AregCliContext, CliDeps, undefined>({
|
|
|
86
60
|
});
|
|
87
61
|
root.group(doctorGroup);
|
|
88
62
|
root.group(buildSkillGroup());
|
|
89
|
-
const execGroup = new ClinkrGroup<AregCliContext>({
|
|
90
|
-
name: "exec",
|
|
91
|
-
description: "Commands for use by skills (not interactive users).",
|
|
92
|
-
isHidden: true,
|
|
93
|
-
});
|
|
94
|
-
execGroup.group(buildSkillxGroup());
|
|
95
|
-
root.group(execGroup);
|
|
96
63
|
},
|
|
97
64
|
});
|
|
98
65
|
|
package/src/context.ts
CHANGED
|
@@ -1,34 +1,14 @@
|
|
|
1
1
|
import { resolveClinkrInteraction, type ClinkrInteraction } from "@nseng-ai/clinkr";
|
|
2
2
|
import { NodeCommandExecApi } from "@nseng-ai/foundation/exec";
|
|
3
3
|
import { RealGitGateway } from "@nseng-ai/capability-kit/git";
|
|
4
|
-
import type { GitGateway } from "@nseng-ai/capability-kit/git";
|
|
5
4
|
import { readStdinLine } from "@nseng-ai/foundation/cli-runtime";
|
|
6
5
|
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
AregHostGateway,
|
|
10
|
-
AregNpxSkillsGateway,
|
|
11
|
-
AregProjectGateway,
|
|
12
|
-
AregPromptGateway,
|
|
13
|
-
AregSkillxWorkspaceGateway,
|
|
14
|
-
} from "./gateways.ts";
|
|
15
|
-
import {
|
|
16
|
-
RealAregGithubGateway,
|
|
17
|
-
RealAregHostGateway,
|
|
18
|
-
RealAregNpxSkillsGateway,
|
|
19
|
-
RealAregProjectGateway,
|
|
20
|
-
RealAregPromptGateway,
|
|
21
|
-
RealAregSkillxWorkspaceGateway,
|
|
22
|
-
} from "./real-gateways.ts";
|
|
6
|
+
import type { AregGitGateway, AregProjectGateway } from "./gateways.ts";
|
|
7
|
+
import { RealAregProjectGateway } from "./gateways/project-gateway.ts";
|
|
23
8
|
|
|
24
9
|
export interface AregCliContext {
|
|
25
|
-
host: AregHostGateway;
|
|
26
|
-
github: AregGithubGateway;
|
|
27
|
-
skillxWorkspace: AregSkillxWorkspaceGateway;
|
|
28
10
|
project: AregProjectGateway;
|
|
29
|
-
git:
|
|
30
|
-
npxSkills: AregNpxSkillsGateway;
|
|
31
|
-
prompt: AregPromptGateway;
|
|
11
|
+
git: AregGitGateway;
|
|
32
12
|
interaction: ClinkrInteraction;
|
|
33
13
|
cwd: string;
|
|
34
14
|
env: NodeJS.ProcessEnv;
|
|
@@ -39,16 +19,10 @@ export function createRealAregContext(
|
|
|
39
19
|
): AregCliContext {
|
|
40
20
|
const cwd = options.cwd ?? process.cwd();
|
|
41
21
|
const env = options.env ?? process.env;
|
|
42
|
-
const npxSkills = new RealAregNpxSkillsGateway();
|
|
43
22
|
const git = new RealGitGateway(new NodeCommandExecApi());
|
|
44
23
|
return {
|
|
45
|
-
host: new RealAregHostGateway(),
|
|
46
|
-
github: new RealAregGithubGateway(),
|
|
47
|
-
skillxWorkspace: new RealAregSkillxWorkspaceGateway({ npxSkills }),
|
|
48
24
|
project: new RealAregProjectGateway({ git }),
|
|
49
25
|
git,
|
|
50
|
-
npxSkills,
|
|
51
|
-
prompt: new RealAregPromptGateway(),
|
|
52
26
|
interaction: resolveClinkrInteraction({
|
|
53
27
|
stdin: readStdinLine,
|
|
54
28
|
stderr: (text) => process.stderr.write(text),
|