@enactprotocol/cli 2.1.10 → 2.1.15

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 (55) 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 +6 -377
  7. package/dist/commands/init/index.js.map +1 -1
  8. package/dist/commands/init/templates/agent-agents.d.ts +5 -0
  9. package/dist/commands/init/templates/agent-agents.d.ts.map +1 -0
  10. package/dist/commands/init/templates/agent-agents.js +53 -0
  11. package/dist/commands/init/templates/agent-agents.js.map +1 -0
  12. package/dist/commands/init/templates/claude.d.ts +5 -0
  13. package/dist/commands/init/templates/claude.d.ts.map +1 -0
  14. package/dist/commands/init/templates/claude.js +71 -0
  15. package/dist/commands/init/templates/claude.js.map +1 -0
  16. package/dist/commands/init/templates/index.d.ts +8 -0
  17. package/dist/commands/init/templates/index.d.ts.map +1 -0
  18. package/dist/commands/init/templates/index.js +8 -0
  19. package/dist/commands/init/templates/index.js.map +1 -0
  20. package/dist/commands/init/templates/tool-agents.d.ts +5 -0
  21. package/dist/commands/init/templates/tool-agents.d.ts.map +1 -0
  22. package/dist/commands/init/templates/tool-agents.js +219 -0
  23. package/dist/commands/init/templates/tool-agents.js.map +1 -0
  24. package/dist/commands/init/templates/tool-skill.d.ts +5 -0
  25. package/dist/commands/init/templates/tool-skill.d.ts.map +1 -0
  26. package/dist/commands/init/templates/tool-skill.js +76 -0
  27. package/dist/commands/init/templates/tool-skill.js.map +1 -0
  28. package/dist/commands/publish/index.d.ts +2 -0
  29. package/dist/commands/publish/index.d.ts.map +1 -1
  30. package/dist/commands/publish/index.js +18 -1
  31. package/dist/commands/publish/index.js.map +1 -1
  32. package/dist/commands/visibility/index.d.ts +11 -0
  33. package/dist/commands/visibility/index.d.ts.map +1 -0
  34. package/dist/commands/visibility/index.js +117 -0
  35. package/dist/commands/visibility/index.js.map +1 -0
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +4 -2
  39. package/dist/index.js.map +1 -1
  40. package/package.json +5 -5
  41. package/src/commands/index.ts +3 -0
  42. package/src/commands/init/index.ts +11 -380
  43. package/src/commands/init/templates/{agent-agents.md → agent-agents.ts} +20 -15
  44. package/src/commands/init/templates/{claude.md → claude.ts} +24 -19
  45. package/src/commands/init/templates/index.ts +7 -0
  46. package/src/commands/init/templates/tool-agents.ts +218 -0
  47. package/src/commands/init/templates/tool-skill.ts +75 -0
  48. package/src/commands/publish/index.ts +23 -1
  49. package/src/commands/visibility/index.ts +154 -0
  50. package/src/index.ts +5 -1
  51. package/tests/commands/publish.test.ts +50 -0
  52. package/tests/commands/visibility.test.ts +156 -0
  53. package/tsconfig.tsbuildinfo +1 -1
  54. package/src/commands/init/templates/tool-agents.md +0 -56
  55. package/src/commands/init/templates/tool-enact.md +0 -44
@@ -1,56 +0,0 @@
1
- # AGENTS.md
2
-
3
- Enact tool: containerized, signed executable. Manifest: `enact.md` (YAML frontmatter + Markdown docs).
4
-
5
- ## Commands
6
- ```bash
7
- enact run ./ --args '{"name": "Test"}' # Run locally
8
- enact run ./ --args '{}' --dry-run # Preview execution
9
- enact sign ./ && enact publish ./ # Sign and publish
10
- ```
11
-
12
- ## enact.md Structure
13
- ```yaml
14
- ---
15
- name: {{TOOL_NAME}} # org/category/tool format
16
- description: What it does
17
- version: 1.0.0 # semver
18
- from: python:3.12-slim # pin versions, not :latest
19
- build: pip install requests # cached by Dagger
20
- command: python /work/main.py ${input}
21
- timeout: 30s
22
- inputSchema:
23
- type: object
24
- properties:
25
- input: { type: string }
26
- required: [input]
27
- env:
28
- API_KEY: # declare secrets (set via: enact env set API_KEY --secret)
29
- ---
30
- # Tool Name
31
- Documentation here (usage examples, etc.)
32
- ```
33
-
34
- ## Parameter Substitution
35
- - `${param}` — auto-quoted (handles spaces, JSON, special chars)
36
- - `${param:raw}` — unquoted (use carefully)
37
- - **Never manually quote**: `"${param}"` causes double-quoting
38
-
39
- ## Output
40
- Always output valid JSON when `outputSchema` is defined:
41
- ```python
42
- import json, sys
43
- print(json.dumps({"result": data})) # stdout = tool output
44
- sys.exit(1) # non-zero = error
45
- ```
46
-
47
- ## File Access
48
- Tool runs in container with `/work` as working directory. Source files copied there.
49
-
50
- ## Adding Dependencies
51
- - Python: `build: pip install package1 package2`
52
- - Node: `build: ["npm install", "npm run build"]`
53
- - System: `build: apt-get update && apt-get install -y libfoo`
54
- - Compiled: `build: rustc /work/main.rs -o /work/tool`
55
-
56
- Build steps are cached — first run slow, subsequent runs instant.
@@ -1,44 +0,0 @@
1
- ---
2
- name: {{TOOL_NAME}}
3
- description: A simple tool that echoes a greeting
4
- version: 0.1.0
5
- enact: "2.0"
6
-
7
- from: alpine:latest
8
-
9
- inputSchema:
10
- type: object
11
- properties:
12
- name:
13
- type: string
14
- description: Name to greet
15
- default: World
16
- required: []
17
-
18
- command: |
19
- echo "Hello, ${name}!"
20
- ---
21
-
22
- # {{TOOL_NAME}}
23
-
24
- A simple greeting tool created with `enact init`.
25
-
26
- ## Usage
27
-
28
- ```bash
29
- enact run ./ --args '{"name": "Alice"}'
30
- ```
31
-
32
- ## Customization
33
-
34
- Edit this file to create your own tool:
35
-
36
- 1. Update the `name` and `description` in the frontmatter
37
- 2. Modify the `inputSchema` to define your tool's inputs
38
- 3. Change the `command` to run your desired shell commands
39
- 4. Update this documentation section
40
-
41
- ## Learn More
42
-
43
- - [Enact Documentation](https://enact.dev/docs)
44
- - [Tool Manifest Reference](https://enact.dev/docs/manifest)