@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.
Files changed (72) hide show
  1. package/dist/commands/index.d.ts +1 -0
  2. package/dist/commands/index.d.ts.map +1 -1
  3. package/dist/commands/index.js +2 -0
  4. package/dist/commands/index.js.map +1 -1
  5. package/dist/commands/init/index.d.ts.map +1 -1
  6. package/dist/commands/init/index.js +94 -46
  7. package/dist/commands/init/index.js.map +1 -1
  8. package/dist/commands/init/templates/agent-agents.d.ts +1 -1
  9. package/dist/commands/init/templates/agent-agents.d.ts.map +1 -1
  10. package/dist/commands/init/templates/agent-agents.js +1 -1
  11. package/dist/commands/init/templates/default-skill-package.d.ts +5 -0
  12. package/dist/commands/init/templates/default-skill-package.d.ts.map +1 -0
  13. package/dist/commands/init/templates/default-skill-package.js +13 -0
  14. package/dist/commands/init/templates/default-skill-package.js.map +1 -0
  15. package/dist/commands/init/templates/default-skill-script.d.ts +5 -0
  16. package/dist/commands/init/templates/default-skill-script.d.ts.map +1 -0
  17. package/dist/commands/init/templates/default-skill-script.js +11 -0
  18. package/dist/commands/init/templates/default-skill-script.js.map +1 -0
  19. package/dist/commands/init/templates/index.d.ts +2 -0
  20. package/dist/commands/init/templates/index.d.ts.map +1 -1
  21. package/dist/commands/init/templates/index.js +2 -0
  22. package/dist/commands/init/templates/index.js.map +1 -1
  23. package/dist/commands/install/index.d.ts +2 -2
  24. package/dist/commands/install/index.js +18 -18
  25. package/dist/commands/install/index.js.map +1 -1
  26. package/dist/commands/list/index.d.ts +2 -2
  27. package/dist/commands/list/index.js +3 -3
  28. package/dist/commands/list/index.js.map +1 -1
  29. package/dist/commands/org/index.d.ts +16 -0
  30. package/dist/commands/org/index.d.ts.map +1 -0
  31. package/dist/commands/org/index.js +203 -0
  32. package/dist/commands/org/index.js.map +1 -0
  33. package/dist/commands/publish/index.d.ts.map +1 -1
  34. package/dist/commands/publish/index.js +5 -1
  35. package/dist/commands/publish/index.js.map +1 -1
  36. package/dist/commands/search/index.js +2 -2
  37. package/dist/commands/search/index.js.map +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +4 -2
  41. package/dist/index.js.map +1 -1
  42. package/dist/utils/errors.js +2 -2
  43. package/dist/utils/errors.js.map +1 -1
  44. package/package.json +6 -6
  45. package/src/commands/env/README.md +1 -1
  46. package/src/commands/index.ts +3 -0
  47. package/src/commands/init/index.ts +103 -46
  48. package/src/commands/init/templates/agent-agents.ts +1 -1
  49. package/src/commands/init/templates/default-skill-package.ts +12 -0
  50. package/src/commands/init/templates/default-skill-script.ts +10 -0
  51. package/src/commands/init/templates/index.ts +2 -0
  52. package/src/commands/install/README.md +2 -2
  53. package/src/commands/install/index.ts +18 -18
  54. package/src/commands/list/index.ts +3 -3
  55. package/src/commands/org/index.ts +263 -0
  56. package/src/commands/publish/index.ts +4 -1
  57. package/src/commands/run/README.md +1 -1
  58. package/src/commands/search/index.ts +2 -2
  59. package/src/index.ts +5 -1
  60. package/src/utils/errors.ts +2 -2
  61. package/tests/commands/cache.test.ts +2 -2
  62. package/tests/commands/init.test.ts +66 -55
  63. package/tests/commands/install-integration.test.ts +11 -11
  64. package/tests/commands/publish.test.ts +5 -3
  65. package/tests/commands/sign.test.ts +1 -1
  66. package/tests/e2e.test.ts +13 -11
  67. package/tests/utils/ignore.test.ts +2 -1
  68. package/tsconfig.tsbuildinfo +1 -1
  69. /package/tests/fixtures/calculator/{skill.yaml → skill.package.yaml} +0 -0
  70. /package/tests/fixtures/env-tool/{skill.yaml → skill.package.yaml} +0 -0
  71. /package/tests/fixtures/greeter/{skill.yaml → skill.package.yaml} +0 -0
  72. /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");
@@ -17,7 +17,7 @@ describe("sign command", () => {
17
17
 
18
18
  // Create a test manifest
19
19
  writeFileSync(
20
- join(FIXTURES_DIR, "skill.yaml"),
20
+ join(FIXTURES_DIR, "skill.package.yml"),
21
21
  `enact: "2.0.0"
22
22
  name: "test/sign-tool"
23
23
  version: "1.0.0"
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 .enact/tools directory", () => {
123
- const destBase = join(tempDir, ".enact", "tools");
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")) || existsSync(join(destPath, "skill.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, ".enact", "tools");
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, ".enact", "tools");
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, ".enact", "tools");
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, ".enact", "tools");
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, ".enact", "tools", "test", "greeter");
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, ".enact", "tools");
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, ".enact", "tools");
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, ".enact", "tools");
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);