agenticros 0.2.4 → 0.3.0

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 (61) hide show
  1. package/README.md +4 -0
  2. package/dist/__tests__/skill-scaffold.test.d.ts +2 -0
  3. package/dist/__tests__/skill-scaffold.test.d.ts.map +1 -0
  4. package/dist/__tests__/skill-scaffold.test.js +80 -0
  5. package/dist/__tests__/skill-scaffold.test.js.map +1 -0
  6. package/dist/commands/create-skill.d.ts +9 -0
  7. package/dist/commands/create-skill.d.ts.map +1 -0
  8. package/dist/commands/create-skill.js +41 -0
  9. package/dist/commands/create-skill.js.map +1 -0
  10. package/dist/commands/publish-skill.d.ts +10 -0
  11. package/dist/commands/publish-skill.d.ts.map +1 -0
  12. package/dist/commands/publish-skill.js +222 -0
  13. package/dist/commands/publish-skill.js.map +1 -0
  14. package/dist/commands/skills-dev.d.ts +11 -0
  15. package/dist/commands/skills-dev.d.ts.map +1 -0
  16. package/dist/commands/skills-dev.js +154 -0
  17. package/dist/commands/skills-dev.js.map +1 -0
  18. package/dist/commands/skills.d.ts.map +1 -1
  19. package/dist/commands/skills.js +21 -11
  20. package/dist/commands/skills.js.map +1 -1
  21. package/dist/index.js +37 -2
  22. package/dist/index.js.map +1 -1
  23. package/dist/menu.d.ts.map +1 -1
  24. package/dist/menu.js +28 -2
  25. package/dist/menu.js.map +1 -1
  26. package/dist/util/marketplace.d.ts +26 -2
  27. package/dist/util/marketplace.d.ts.map +1 -1
  28. package/dist/util/marketplace.js +56 -4
  29. package/dist/util/marketplace.js.map +1 -1
  30. package/dist/util/skill-manifest.d.ts +58 -0
  31. package/dist/util/skill-manifest.d.ts.map +1 -0
  32. package/dist/util/skill-manifest.js +81 -0
  33. package/dist/util/skill-manifest.js.map +1 -0
  34. package/dist/util/skill-scaffold.d.ts +26 -0
  35. package/dist/util/skill-scaffold.d.ts.map +1 -0
  36. package/dist/util/skill-scaffold.js +153 -0
  37. package/dist/util/skill-scaffold.js.map +1 -0
  38. package/package.json +2 -1
  39. package/runtime/BUNDLE.json +1 -1
  40. package/runtime/README.md +2 -0
  41. package/runtime/docs/cli.md +12 -0
  42. package/templates/skills/camera/README.md +16 -0
  43. package/templates/skills/camera/demo.md +5 -0
  44. package/templates/skills/camera/package.json +38 -0
  45. package/templates/skills/camera/src/index.ts +68 -0
  46. package/templates/skills/camera/tsconfig.json +15 -0
  47. package/templates/skills/depth/README.md +16 -0
  48. package/templates/skills/depth/demo.md +5 -0
  49. package/templates/skills/depth/package.json +38 -0
  50. package/templates/skills/depth/src/index.ts +69 -0
  51. package/templates/skills/depth/tsconfig.json +15 -0
  52. package/templates/skills/hello/README.md +32 -0
  53. package/templates/skills/hello/demo.md +5 -0
  54. package/templates/skills/hello/package.json +37 -0
  55. package/templates/skills/hello/src/index.ts +37 -0
  56. package/templates/skills/hello/tsconfig.json +15 -0
  57. package/templates/skills/robot/README.md +18 -0
  58. package/templates/skills/robot/demo.md +5 -0
  59. package/templates/skills/robot/package.json +40 -0
  60. package/templates/skills/robot/src/index.ts +69 -0
  61. package/templates/skills/robot/tsconfig.json +15 -0
@@ -0,0 +1,5 @@
1
+ # Prompt examples
2
+
3
+ - Run {{displayName}}
4
+ - Execute {{toolName}}
5
+ - Test my first skill
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "agenticros-skill-{{slug}}",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "{{description}}",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "typecheck": "tsc --noEmit",
11
+ "dev": "npx agenticros skills dev"
12
+ },
13
+ "agenticros": {
14
+ "id": "{{slug}}",
15
+ "displayName": "{{displayName}}",
16
+ "description": "{{description}}",
17
+ "tutorial": true,
18
+ "categories": ["communication"],
19
+ "screenshots": ["docs/icon.png"],
20
+ "capabilities": [
21
+ {
22
+ "id": "{{toolName}}",
23
+ "verb": "run",
24
+ "description": "{{description}}"
25
+ }
26
+ ]
27
+ },
28
+ "dependencies": {
29
+ "@sinclair/typebox": "^0.34.0"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^20.17.0",
33
+ "typescript": "^5.7.0"
34
+ },
35
+ "keywords": ["agenticros", "tutorial", "getting-started"],
36
+ "license": "Apache-2.0"
37
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * {{displayName}} — AgenticROS hello-world skill (local dev / tutorial).
3
+ */
4
+
5
+ import { Type } from "@sinclair/typebox";
6
+
7
+ const TOOL_NAME = "{{toolName}}";
8
+
9
+ interface SkillPluginApi {
10
+ registerTool(tool: {
11
+ name: string;
12
+ label: string;
13
+ description: string;
14
+ parameters: unknown;
15
+ execute: (
16
+ toolCallId: string,
17
+ params: Record<string, unknown>,
18
+ signal?: AbortSignal,
19
+ ) => Promise<{ content: { type: string; text: string }[]; details?: unknown }>;
20
+ }): void;
21
+ }
22
+
23
+ export function registerSkill(api: SkillPluginApi): void {
24
+ api.registerTool({
25
+ name: TOOL_NAME,
26
+ label: "{{displayName}}",
27
+ description: "{{description}}",
28
+ parameters: Type.Object({}),
29
+ async execute() {
30
+ const message = "Hello from AgenticROS!";
31
+ return {
32
+ content: [{ type: "text", text: message }],
33
+ details: { success: true, message },
34
+ };
35
+ },
36
+ });
37
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "outDir": "dist",
7
+ "rootDir": "src",
8
+ "strict": true,
9
+ "declaration": true,
10
+ "declarationMap": true,
11
+ "sourceMap": true,
12
+ "skipLibCheck": true
13
+ },
14
+ "include": ["src/**/*"]
15
+ }
@@ -0,0 +1,18 @@
1
+ # {{displayName}}
2
+
3
+ {{description}}
4
+
5
+ ## Local dev
6
+
7
+ ```bash
8
+ npm install
9
+ npm run dev
10
+ ```
11
+
12
+ Use `npm run dev -- --live` when your robot gateway is connected to exercise real cmd_vel.
13
+
14
+ ## Publish
15
+
16
+ ```bash
17
+ npx agenticros publish
18
+ ```
@@ -0,0 +1,5 @@
1
+ # Prompt examples
2
+
3
+ - Wave hello
4
+ - Run {{displayName}}
5
+ - Make the robot wave
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "agenticros-skill-{{slug}}",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "{{description}}",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "typecheck": "tsc --noEmit",
11
+ "dev": "npx agenticros skills dev"
12
+ },
13
+ "agenticros": {
14
+ "id": "{{slug}}",
15
+ "displayName": "{{displayName}}",
16
+ "description": "{{description}}",
17
+ "tutorial": false,
18
+ "categories": ["human-interaction", "navigation"],
19
+ "screenshots": ["docs/icon.png"],
20
+ "capabilities": [
21
+ {
22
+ "id": "{{toolName}}",
23
+ "verb": "wave",
24
+ "description": "{{description}}",
25
+ "interruptible": true,
26
+ "blocks_base": true
27
+ }
28
+ ]
29
+ },
30
+ "dependencies": {
31
+ "@agenticros/core": "^0.5.0",
32
+ "@sinclair/typebox": "^0.34.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^20.17.0",
36
+ "typescript": "^5.7.0"
37
+ },
38
+ "keywords": ["agenticros", "robot", "cmd_vel"],
39
+ "license": "Apache-2.0"
40
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * {{displayName}} — simple cmd_vel wave gesture.
3
+ */
4
+
5
+ import { Type } from "@sinclair/typebox";
6
+ import type { RosTransport } from "@agenticros/core";
7
+
8
+ const TOOL_NAME = "{{toolName}}";
9
+ const CMD_VEL_TOPIC = "cmd_vel";
10
+
11
+ interface SkillContext {
12
+ getTransport(): RosTransport;
13
+ }
14
+
15
+ interface SkillPluginApi {
16
+ registerTool(tool: {
17
+ name: string;
18
+ label: string;
19
+ description: string;
20
+ parameters: unknown;
21
+ execute: (
22
+ toolCallId: string,
23
+ params: Record<string, unknown>,
24
+ signal?: AbortSignal,
25
+ ) => Promise<{ content: { type: string; text: string }[]; details?: unknown }>;
26
+ }): void;
27
+ }
28
+
29
+ function sleep(ms: number): Promise<void> {
30
+ return new Promise((r) => setTimeout(r, ms));
31
+ }
32
+
33
+ async function publishTwist(
34
+ transport: RosTransport,
35
+ linear: number,
36
+ angular: number,
37
+ ): Promise<void> {
38
+ await transport.publish(CMD_VEL_TOPIC, "geometry_msgs/msg/Twist", {
39
+ linear: { x: linear, y: 0, z: 0 },
40
+ angular: { x: 0, y: 0, z: angular },
41
+ });
42
+ }
43
+
44
+ export function registerSkill(
45
+ api: SkillPluginApi,
46
+ _config: unknown,
47
+ context: SkillContext,
48
+ ): void {
49
+ api.registerTool({
50
+ name: TOOL_NAME,
51
+ label: "{{displayName}}",
52
+ description: "{{description}}",
53
+ parameters: Type.Object({}),
54
+ async execute() {
55
+ const transport = context.getTransport();
56
+ // Brief side-to-side angular motion as a "wave".
57
+ await publishTwist(transport, 0, 0.4);
58
+ await sleep(400);
59
+ await publishTwist(transport, 0, -0.4);
60
+ await sleep(400);
61
+ await publishTwist(transport, 0, 0);
62
+ const message = "I waved hello.";
63
+ return {
64
+ content: [{ type: "text", text: message }],
65
+ details: { success: true, message },
66
+ };
67
+ },
68
+ });
69
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "outDir": "dist",
7
+ "rootDir": "src",
8
+ "strict": true,
9
+ "declaration": true,
10
+ "declarationMap": true,
11
+ "sourceMap": true,
12
+ "skipLibCheck": true
13
+ },
14
+ "include": ["src/**/*"]
15
+ }