@enactprotocol/cli 2.3.5 → 2.3.8
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/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +94 -46
- package/dist/commands/init/index.js.map +1 -1
- package/dist/commands/init/templates/agent-agents.d.ts +1 -1
- package/dist/commands/init/templates/agent-agents.d.ts.map +1 -1
- package/dist/commands/init/templates/agent-agents.js +1 -1
- package/dist/commands/init/templates/default-skill-package.d.ts +5 -0
- package/dist/commands/init/templates/default-skill-package.d.ts.map +1 -0
- package/dist/commands/init/templates/default-skill-package.js +13 -0
- package/dist/commands/init/templates/default-skill-package.js.map +1 -0
- package/dist/commands/init/templates/default-skill-script.d.ts +5 -0
- package/dist/commands/init/templates/default-skill-script.d.ts.map +1 -0
- package/dist/commands/init/templates/default-skill-script.js +11 -0
- package/dist/commands/init/templates/default-skill-script.js.map +1 -0
- package/dist/commands/init/templates/index.d.ts +2 -0
- package/dist/commands/init/templates/index.d.ts.map +1 -1
- package/dist/commands/init/templates/index.js +2 -0
- package/dist/commands/init/templates/index.js.map +1 -1
- package/dist/commands/install/index.d.ts +2 -2
- package/dist/commands/install/index.js +18 -18
- package/dist/commands/install/index.js.map +1 -1
- package/dist/commands/list/index.d.ts +2 -2
- package/dist/commands/list/index.js +3 -3
- package/dist/commands/list/index.js.map +1 -1
- package/dist/commands/org/index.d.ts +16 -0
- package/dist/commands/org/index.d.ts.map +1 -0
- package/dist/commands/org/index.js +203 -0
- package/dist/commands/org/index.js.map +1 -0
- package/dist/commands/publish/index.d.ts.map +1 -1
- package/dist/commands/publish/index.js +5 -1
- package/dist/commands/publish/index.js.map +1 -1
- package/dist/commands/search/index.js +2 -2
- package/dist/commands/search/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/errors.js +2 -2
- package/dist/utils/errors.js.map +1 -1
- package/package.json +6 -6
- package/src/commands/env/README.md +1 -1
- package/src/commands/index.ts +3 -0
- package/src/commands/init/index.ts +103 -46
- package/src/commands/init/templates/agent-agents.ts +1 -1
- package/src/commands/init/templates/default-skill-package.ts +12 -0
- package/src/commands/init/templates/default-skill-script.ts +10 -0
- package/src/commands/init/templates/index.ts +2 -0
- package/src/commands/install/README.md +2 -2
- package/src/commands/install/index.ts +18 -18
- package/src/commands/list/index.ts +3 -3
- package/src/commands/org/index.ts +263 -0
- package/src/commands/publish/index.ts +4 -1
- package/src/commands/run/README.md +1 -1
- package/src/commands/search/index.ts +2 -2
- package/src/index.ts +5 -1
- package/src/utils/errors.ts +2 -2
- package/tests/commands/cache.test.ts +2 -2
- package/tests/commands/init.test.ts +66 -55
- package/tests/commands/install-integration.test.ts +11 -11
- package/tests/commands/publish.test.ts +5 -3
- package/tests/commands/sign.test.ts +1 -1
- package/tests/e2e.test.ts +13 -11
- package/tests/utils/ignore.test.ts +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- /package/tests/fixtures/calculator/{skill.yaml → skill.package.yaml} +0 -0
- /package/tests/fixtures/env-tool/{skill.yaml → skill.package.yaml} +0 -0
- /package/tests/fixtures/greeter/{skill.yaml → skill.package.yaml} +0 -0
- /package/tests/fixtures/invalid-tool/{skill.yaml → skill.package.yaml} +0 -0
|
@@ -110,7 +110,8 @@ describe("publish command", () => {
|
|
|
110
110
|
test("identifies manifest files", () => {
|
|
111
111
|
const isManifest = (filename: string): boolean => {
|
|
112
112
|
return (
|
|
113
|
-
filename === "skill.yaml" ||
|
|
113
|
+
filename === "skill.package.yaml" ||
|
|
114
|
+
filename === "skill.package.yml" ||
|
|
114
115
|
filename === "skill.yml" ||
|
|
115
116
|
filename === "enact.yaml" ||
|
|
116
117
|
filename === "enact.yml" ||
|
|
@@ -118,7 +119,8 @@ describe("publish command", () => {
|
|
|
118
119
|
);
|
|
119
120
|
};
|
|
120
121
|
|
|
121
|
-
expect(isManifest("skill.yaml")).toBe(true);
|
|
122
|
+
expect(isManifest("skill.package.yaml")).toBe(true);
|
|
123
|
+
expect(isManifest("skill.package.yml")).toBe(true);
|
|
122
124
|
expect(isManifest("skill.yml")).toBe(true);
|
|
123
125
|
expect(isManifest("enact.yaml")).toBe(true);
|
|
124
126
|
expect(isManifest("enact.yml")).toBe(true);
|
|
@@ -132,7 +134,7 @@ describe("publish command", () => {
|
|
|
132
134
|
return lastDot === -1 ? "" : filename.slice(lastDot + 1);
|
|
133
135
|
};
|
|
134
136
|
|
|
135
|
-
expect(getExtension("skill.yaml")).toBe("yaml");
|
|
137
|
+
expect(getExtension("skill.package.yaml")).toBe("yaml");
|
|
136
138
|
expect(getExtension("skill.yml")).toBe("yml");
|
|
137
139
|
expect(getExtension("enact.yaml")).toBe("yaml");
|
|
138
140
|
expect(getExtension("enact.yml")).toBe("yml");
|
package/tests/e2e.test.ts
CHANGED
|
@@ -119,14 +119,16 @@ describe("E2E: Tool Installation Flow", () => {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
test("installs tool to project
|
|
123
|
-
const destBase = join(tempDir, "
|
|
122
|
+
test("installs tool to project agents/skills directory", () => {
|
|
123
|
+
const destBase = join(tempDir, "agents", "skills");
|
|
124
124
|
const { manifest, destPath } = installTool(GREETER_TOOL, destBase);
|
|
125
125
|
|
|
126
126
|
expect(manifest.name).toBe("test/greeter");
|
|
127
127
|
expect(existsSync(destPath)).toBe(true);
|
|
128
128
|
expect(
|
|
129
|
-
existsSync(join(destPath, "enact.yaml")) ||
|
|
129
|
+
existsSync(join(destPath, "enact.yaml")) ||
|
|
130
|
+
existsSync(join(destPath, "skill.package.yaml")) ||
|
|
131
|
+
existsSync(join(destPath, "skill.package.yml"))
|
|
130
132
|
).toBe(true);
|
|
131
133
|
|
|
132
134
|
// Verify installed manifest can be loaded
|
|
@@ -136,7 +138,7 @@ describe("E2E: Tool Installation Flow", () => {
|
|
|
136
138
|
});
|
|
137
139
|
|
|
138
140
|
test("installs markdown tool correctly", () => {
|
|
139
|
-
const destBase = join(tempDir, "
|
|
141
|
+
const destBase = join(tempDir, "agents", "skills");
|
|
140
142
|
const { manifest, destPath } = installTool(ECHO_TOOL, destBase);
|
|
141
143
|
|
|
142
144
|
expect(manifest.name).toBe("test/echo-tool");
|
|
@@ -144,7 +146,7 @@ describe("E2E: Tool Installation Flow", () => {
|
|
|
144
146
|
});
|
|
145
147
|
|
|
146
148
|
test("installs multiple tools without conflict", () => {
|
|
147
|
-
const destBase = join(tempDir, "
|
|
149
|
+
const destBase = join(tempDir, "agents", "skills");
|
|
148
150
|
|
|
149
151
|
const result1 = installTool(GREETER_TOOL, destBase);
|
|
150
152
|
const result2 = installTool(ECHO_TOOL, destBase);
|
|
@@ -161,7 +163,7 @@ describe("E2E: Tool Installation Flow", () => {
|
|
|
161
163
|
});
|
|
162
164
|
|
|
163
165
|
test("overwrites existing tool on reinstall", () => {
|
|
164
|
-
const destBase = join(tempDir, "
|
|
166
|
+
const destBase = join(tempDir, "agents", "skills");
|
|
165
167
|
|
|
166
168
|
// First install
|
|
167
169
|
const result1 = installTool(GREETER_TOOL, destBase);
|
|
@@ -190,7 +192,7 @@ describe("E2E: Tool Resolution Flow", () => {
|
|
|
190
192
|
mkdirSync(resolveTempDir, { recursive: true });
|
|
191
193
|
|
|
192
194
|
// Install tools
|
|
193
|
-
const destBase = join(resolveTempDir, "
|
|
195
|
+
const destBase = join(resolveTempDir, "agents", "skills");
|
|
194
196
|
installTool(GREETER_TOOL, destBase);
|
|
195
197
|
installTool(ECHO_TOOL, destBase);
|
|
196
198
|
installTool(CALCULATOR_TOOL, destBase);
|
|
@@ -210,7 +212,7 @@ describe("E2E: Tool Resolution Flow", () => {
|
|
|
210
212
|
|
|
211
213
|
test("resolves tool by path", () => {
|
|
212
214
|
// Resolve from installed location
|
|
213
|
-
const toolPath = join(resolveTempDir, "
|
|
215
|
+
const toolPath = join(resolveTempDir, "agents", "skills", "test", "greeter");
|
|
214
216
|
const resolution = tryResolveTool(toolPath);
|
|
215
217
|
expect(resolution).not.toBeNull();
|
|
216
218
|
expect(resolution?.manifest.name).toBe("test/greeter");
|
|
@@ -481,7 +483,7 @@ describe("E2E: Full Workflow", () => {
|
|
|
481
483
|
|
|
482
484
|
test("complete install -> resolve -> validate -> prepare flow (scripts)", () => {
|
|
483
485
|
// 1. Install tool
|
|
484
|
-
const destBase = join(tempDir, "
|
|
486
|
+
const destBase = join(tempDir, "agents", "skills");
|
|
485
487
|
const { manifest } = installTool(GREETER_TOOL, destBase);
|
|
486
488
|
expect(manifest.name).toBe("test/greeter");
|
|
487
489
|
|
|
@@ -507,7 +509,7 @@ describe("E2E: Full Workflow", () => {
|
|
|
507
509
|
|
|
508
510
|
test("complete calculator workflow (scripts)", () => {
|
|
509
511
|
// 1. Install tool
|
|
510
|
-
const destBase = join(tempDir, "
|
|
512
|
+
const destBase = join(tempDir, "agents", "skills");
|
|
511
513
|
const { manifest } = installTool(CALCULATOR_TOOL, destBase);
|
|
512
514
|
|
|
513
515
|
// 2. Resolve tool
|
|
@@ -542,7 +544,7 @@ describe("E2E: Full Workflow", () => {
|
|
|
542
544
|
|
|
543
545
|
test("handles markdown tool workflow (scripts)", () => {
|
|
544
546
|
// Install markdown-based tool
|
|
545
|
-
const destBase = join(tempDir, "
|
|
547
|
+
const destBase = join(tempDir, "agents", "skills");
|
|
546
548
|
const { manifest } = installTool(ECHO_TOOL, destBase);
|
|
547
549
|
expect(manifest.name).toBe("test/echo-tool");
|
|
548
550
|
|
|
@@ -281,7 +281,8 @@ dist `;
|
|
|
281
281
|
});
|
|
282
282
|
|
|
283
283
|
test("allows manifest files", () => {
|
|
284
|
-
expect(shouldIgnore("skill.yaml", "skill.yaml")).toBe(false);
|
|
284
|
+
expect(shouldIgnore("skill.package.yaml", "skill.package.yaml")).toBe(false);
|
|
285
|
+
expect(shouldIgnore("skill.package.yml", "skill.package.yml")).toBe(false);
|
|
285
286
|
expect(shouldIgnore("skill.yml", "skill.yml")).toBe(false);
|
|
286
287
|
expect(shouldIgnore("enact.md", "enact.md")).toBe(false);
|
|
287
288
|
expect(shouldIgnore("enact.yaml", "enact.yaml")).toBe(false);
|