@archon-claw/cli 0.0.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.
Files changed (80) hide show
  1. package/dist/agent.d.ts +2 -0
  2. package/dist/agent.js +152 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +141 -0
  5. package/dist/config.d.ts +2 -0
  6. package/dist/config.js +161 -0
  7. package/dist/eval/assertions.d.ts +9 -0
  8. package/dist/eval/assertions.js +137 -0
  9. package/dist/eval/execute.d.ts +13 -0
  10. package/dist/eval/execute.js +260 -0
  11. package/dist/eval/formatter.d.ts +10 -0
  12. package/dist/eval/formatter.js +62 -0
  13. package/dist/eval/judge.d.ts +7 -0
  14. package/dist/eval/judge.js +116 -0
  15. package/dist/eval/runner.d.ts +9 -0
  16. package/dist/eval/runner.js +156 -0
  17. package/dist/eval/types.d.ts +67 -0
  18. package/dist/eval/types.js +1 -0
  19. package/dist/llm.d.ts +7 -0
  20. package/dist/llm.js +52 -0
  21. package/dist/mcp-manager.d.ts +51 -0
  22. package/dist/mcp-manager.js +268 -0
  23. package/dist/pending-tool-results.d.ts +4 -0
  24. package/dist/pending-tool-results.js +39 -0
  25. package/dist/public/assets/chat-input-BBnVJs9h.js +151 -0
  26. package/dist/public/assets/chat-input-CISJdhF2.css +1 -0
  27. package/dist/public/assets/embed-DhIUBDdf.js +1 -0
  28. package/dist/public/assets/main-Bfvj6DnV.js +16 -0
  29. package/dist/public/embed/widget.js +233 -0
  30. package/dist/public/embed.html +14 -0
  31. package/dist/public/index.html +14 -0
  32. package/dist/scaffold.d.ts +2 -0
  33. package/dist/scaffold.js +82 -0
  34. package/dist/schemas.d.ts +899 -0
  35. package/dist/schemas.js +134 -0
  36. package/dist/server.d.ts +3 -0
  37. package/dist/server.js +258 -0
  38. package/dist/session.d.ts +8 -0
  39. package/dist/session.js +70 -0
  40. package/dist/templates/agent/model.json +6 -0
  41. package/dist/templates/agent/system-prompt.md +9 -0
  42. package/dist/templates/agent/tool-impls/greeting.impl.js +9 -0
  43. package/dist/templates/agent/tools/greeting.json +14 -0
  44. package/dist/templates/workspace/.claude/skills/create-agent/SKILL.md +90 -0
  45. package/dist/templates/workspace/.claude/skills/create-dataset/SKILL.md +57 -0
  46. package/dist/templates/workspace/.claude/skills/create-eval-case/SKILL.md +159 -0
  47. package/dist/templates/workspace/.claude/skills/create-eval-judge/SKILL.md +128 -0
  48. package/dist/templates/workspace/.claude/skills/create-mcp-config/SKILL.md +151 -0
  49. package/dist/templates/workspace/.claude/skills/create-model-config/SKILL.md +45 -0
  50. package/dist/templates/workspace/.claude/skills/create-skill/SKILL.md +63 -0
  51. package/dist/templates/workspace/.claude/skills/create-system-prompt/SKILL.md +168 -0
  52. package/dist/templates/workspace/.claude/skills/create-tool/SKILL.md +56 -0
  53. package/dist/templates/workspace/.claude/skills/create-tool-impl/SKILL.md +83 -0
  54. package/dist/templates/workspace/.claude/skills/create-tool-test/SKILL.md +117 -0
  55. package/dist/templates/workspace/.claude/skills/create-tool-ui/SKILL.md +218 -0
  56. package/dist/test-runner.d.ts +22 -0
  57. package/dist/test-runner.js +166 -0
  58. package/dist/types.d.ts +75 -0
  59. package/dist/types.js +1 -0
  60. package/dist/validator/index.d.ts +16 -0
  61. package/dist/validator/index.js +54 -0
  62. package/dist/validator/plugin.d.ts +21 -0
  63. package/dist/validator/plugin.js +1 -0
  64. package/dist/validator/plugins/agent-dir.d.ts +2 -0
  65. package/dist/validator/plugins/agent-dir.js +171 -0
  66. package/dist/validator/plugins/agent-skill.d.ts +2 -0
  67. package/dist/validator/plugins/agent-skill.js +31 -0
  68. package/dist/validator/plugins/dataset.d.ts +2 -0
  69. package/dist/validator/plugins/dataset.js +20 -0
  70. package/dist/validator/plugins/mcp.d.ts +2 -0
  71. package/dist/validator/plugins/mcp.js +20 -0
  72. package/dist/validator/plugins/model.d.ts +2 -0
  73. package/dist/validator/plugins/model.js +20 -0
  74. package/dist/validator/plugins/system-prompt.d.ts +2 -0
  75. package/dist/validator/plugins/system-prompt.js +25 -0
  76. package/dist/validator/plugins/tool.d.ts +2 -0
  77. package/dist/validator/plugins/tool.js +20 -0
  78. package/dist/validator/zod-utils.d.ts +3 -0
  79. package/dist/validator/zod-utils.js +7 -0
  80. package/package.json +41 -0
@@ -0,0 +1,20 @@
1
+ import { toolSchemaSchema } from "../../schemas.js";
2
+ import { formatZodErrors } from "../zod-utils.js";
3
+ export const toolPlugin = {
4
+ name: "tool",
5
+ pattern: "tools/*.json",
6
+ validate(content, _fileName) {
7
+ let data;
8
+ try {
9
+ data = JSON.parse(content);
10
+ }
11
+ catch {
12
+ return { valid: false, errors: ["Invalid JSON"] };
13
+ }
14
+ const result = toolSchemaSchema.safeParse(data);
15
+ if (!result.success) {
16
+ return { valid: false, errors: formatZodErrors(result.error) };
17
+ }
18
+ return { valid: true, errors: [] };
19
+ },
20
+ };
@@ -0,0 +1,3 @@
1
+ import type { ZodError } from "zod";
2
+ /** Format Zod errors to match the AJV-style output: `/{path} {message}` */
3
+ export declare function formatZodErrors(error: ZodError): string[];
@@ -0,0 +1,7 @@
1
+ /** Format Zod errors to match the AJV-style output: `/{path} {message}` */
2
+ export function formatZodErrors(error) {
3
+ return error.issues.map((issue) => {
4
+ const path = issue.path.length > 0 ? `/${issue.path.join("/")}` : "/";
5
+ return `${path} ${issue.message}`;
6
+ });
7
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@archon-claw/cli",
3
+ "version": "0.0.2",
4
+ "description": "AI Agent CLI",
5
+ "type": "module",
6
+ "bin": {
7
+ "archon-claw": "./dist/cli.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "engines": {
13
+ "node": ">=18"
14
+ },
15
+ "license": "MIT",
16
+ "devDependencies": {
17
+ "@types/node": "^25.3.3",
18
+ "@types/picomatch": "^4.0.2",
19
+ "@vitest/coverage-v8": "^4.0.18",
20
+ "tsx": "^4.21.0",
21
+ "typescript": "^5.9.3",
22
+ "vitest": "^4.0.18"
23
+ },
24
+ "dependencies": {
25
+ "@modelcontextprotocol/sdk": "^1.27.1",
26
+ "commander": "^14.0.3",
27
+ "dotenv": "^17.3.1",
28
+ "gray-matter": "^4.0.3",
29
+ "liquidjs": "^10.24.0",
30
+ "openai": "^6.25.0",
31
+ "picomatch": "^4.0.3",
32
+ "zod": "^3.24.0"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc -p tsconfig.build.json && cp -r templates dist/ && rm -rf dist/public && cp -r ../web/dist dist/public",
36
+ "dev": "tsx src/cli.ts start ../../agents/my-agent",
37
+ "start": "node dist/cli.js",
38
+ "test": "vitest run --exclude dist",
39
+ "test:watch": "vitest --exclude dist"
40
+ }
41
+ }