agenticros 0.2.4 → 0.3.1
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/README.md +13 -4
- package/dist/__tests__/codex-config.test.d.ts +2 -0
- package/dist/__tests__/codex-config.test.d.ts.map +1 -0
- package/dist/__tests__/codex-config.test.js +76 -0
- package/dist/__tests__/codex-config.test.js.map +1 -0
- package/dist/__tests__/skill-scaffold.test.d.ts +2 -0
- package/dist/__tests__/skill-scaffold.test.d.ts.map +1 -0
- package/dist/__tests__/skill-scaffold.test.js +80 -0
- package/dist/__tests__/skill-scaffold.test.js.map +1 -0
- package/dist/commands/codex.d.ts +18 -0
- package/dist/commands/codex.d.ts.map +1 -0
- package/dist/commands/codex.js +99 -0
- package/dist/commands/codex.js.map +1 -0
- package/dist/commands/create-skill.d.ts +9 -0
- package/dist/commands/create-skill.d.ts.map +1 -0
- package/dist/commands/create-skill.js +41 -0
- package/dist/commands/create-skill.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +25 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +2 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +26 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/publish-skill.d.ts +10 -0
- package/dist/commands/publish-skill.d.ts.map +1 -0
- package/dist/commands/publish-skill.js +222 -0
- package/dist/commands/publish-skill.js.map +1 -0
- package/dist/commands/skills-dev.d.ts +11 -0
- package/dist/commands/skills-dev.d.ts.map +1 -0
- package/dist/commands/skills-dev.js +154 -0
- package/dist/commands/skills-dev.js.map +1 -0
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +22 -12
- package/dist/commands/skills.js.map +1 -1
- package/dist/index.js +57 -2
- package/dist/index.js.map +1 -1
- package/dist/menu.d.ts.map +1 -1
- package/dist/menu.js +28 -2
- package/dist/menu.js.map +1 -1
- package/dist/util/codex-config.d.ts +56 -0
- package/dist/util/codex-config.d.ts.map +1 -0
- package/dist/util/codex-config.js +326 -0
- package/dist/util/codex-config.js.map +1 -0
- package/dist/util/marketplace.d.ts +26 -2
- package/dist/util/marketplace.d.ts.map +1 -1
- package/dist/util/marketplace.js +56 -4
- package/dist/util/marketplace.js.map +1 -1
- package/dist/util/skill-manifest.d.ts +58 -0
- package/dist/util/skill-manifest.d.ts.map +1 -0
- package/dist/util/skill-manifest.js +81 -0
- package/dist/util/skill-manifest.js.map +1 -0
- package/dist/util/skill-scaffold.d.ts +26 -0
- package/dist/util/skill-scaffold.d.ts.map +1 -0
- package/dist/util/skill-scaffold.js +153 -0
- package/dist/util/skill-scaffold.js.map +1 -0
- package/package.json +4 -1
- package/runtime/BUNDLE.json +1 -1
- package/runtime/README.md +20 -5
- package/runtime/docs/cli.md +12 -0
- package/runtime/packages/agenticros-claude-code/README.md +18 -8
- package/runtime/packages/agenticros-claude-code/package.json +11 -1
- package/runtime/packages/core/README.md +12 -2
- package/templates/skills/camera/README.md +16 -0
- package/templates/skills/camera/demo.md +5 -0
- package/templates/skills/camera/package.json +38 -0
- package/templates/skills/camera/src/index.ts +68 -0
- package/templates/skills/camera/tsconfig.json +15 -0
- package/templates/skills/depth/README.md +16 -0
- package/templates/skills/depth/demo.md +5 -0
- package/templates/skills/depth/package.json +38 -0
- package/templates/skills/depth/src/index.ts +69 -0
- package/templates/skills/depth/tsconfig.json +15 -0
- package/templates/skills/hello/README.md +32 -0
- package/templates/skills/hello/demo.md +5 -0
- package/templates/skills/hello/package.json +37 -0
- package/templates/skills/hello/src/index.ts +37 -0
- package/templates/skills/hello/tsconfig.json +15 -0
- package/templates/skills/robot/README.md +18 -0
- package/templates/skills/robot/demo.md +5 -0
- package/templates/skills/robot/package.json +40 -0
- package/templates/skills/robot/src/index.ts +69 -0
- package/templates/skills/robot/tsconfig.json +15 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-manifest.js","sourceRoot":"","sources":["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AAO,CAAC,CAAC,UAAU,CAAC;IAC1D,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,IAAI,IAAI,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,SAAiB;IAClE,OAAO,GAAG,UAAU,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,SAAiB;IAClE,OAAO,GAAG,UAAU,CAAC,WAAW,EAAE,IAAI,SAAS,EAAE,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAAW;IAEX,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACvC,IAAI,CAAC,sCAAsC,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill scaffolding — copy embedded templates into cwd/agenticros-skill-<slug>/.
|
|
3
|
+
*/
|
|
4
|
+
export type SkillTemplate = "hello" | "robot" | "camera" | "depth";
|
|
5
|
+
export declare function normalizeTemplate(input: string | undefined): SkillTemplate;
|
|
6
|
+
export declare function normalizeSkillSlug(input: string): string;
|
|
7
|
+
export declare function slugToToolName(slug: string): string;
|
|
8
|
+
export declare function slugToDisplayName(slug: string): string;
|
|
9
|
+
export interface ScaffoldOptions {
|
|
10
|
+
slug: string;
|
|
11
|
+
template?: string;
|
|
12
|
+
cwd?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ScaffoldResult {
|
|
15
|
+
dir: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
template: SkillTemplate;
|
|
18
|
+
toolName: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function scaffoldSkill(opts: ScaffoldOptions): ScaffoldResult;
|
|
21
|
+
/** SHA-256 of normalized template source (for tutorial graduation checks). */
|
|
22
|
+
export declare function hashSkillSource(source: string): string;
|
|
23
|
+
export declare function getTemplateFingerprints(): Record<SkillTemplate, string>;
|
|
24
|
+
export declare function isUnmodifiedTemplate(source: string, template: SkillTemplate): boolean;
|
|
25
|
+
export declare function readSkillIndexSource(skillDir: string): string | null;
|
|
26
|
+
//# sourceMappingURL=skill-scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-scaffold.d.ts","sourceRoot":"","sources":["../../src/util/skill-scaffold.ts"],"names":[],"mappings":"AAAA;;GAEG;AAcH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AA2CnE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAS1E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAcxD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtD;AAkCD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAiCnE;AAED,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAUvE;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,aAAa,GACtB,OAAO,CAKT;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIpE"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill scaffolding — copy embedded templates into cwd/agenticros-skill-<slug>/.
|
|
3
|
+
*/
|
|
4
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
|
|
5
|
+
import { dirname, join, resolve } from "node:path";
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
const SLUG_RE = /^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/;
|
|
9
|
+
const TEMPLATE_ALIASES = {
|
|
10
|
+
hello: "hello",
|
|
11
|
+
h: "hello",
|
|
12
|
+
robot: "robot",
|
|
13
|
+
r: "robot",
|
|
14
|
+
camera: "camera",
|
|
15
|
+
c: "camera",
|
|
16
|
+
depth: "depth",
|
|
17
|
+
d: "depth",
|
|
18
|
+
};
|
|
19
|
+
const TEMPLATE_DEFAULTS = {
|
|
20
|
+
hello: {
|
|
21
|
+
displayName: "Hello World",
|
|
22
|
+
description: "My first AgenticROS skill — returns a friendly greeting.",
|
|
23
|
+
},
|
|
24
|
+
robot: {
|
|
25
|
+
displayName: "Wave Hand",
|
|
26
|
+
description: "Wave the robot base with a brief cmd_vel gesture.",
|
|
27
|
+
},
|
|
28
|
+
camera: {
|
|
29
|
+
displayName: "Describe Scene",
|
|
30
|
+
description: "Capture one frame from the robot camera.",
|
|
31
|
+
},
|
|
32
|
+
depth: {
|
|
33
|
+
displayName: "Measure Distance",
|
|
34
|
+
description: "Sample depth at the center of the depth image.",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
/** Minimal 1×1 PNG (valid placeholder for docs/icon.png). */
|
|
38
|
+
const PLACEHOLDER_PNG = Buffer.from("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==", "base64");
|
|
39
|
+
export function normalizeTemplate(input) {
|
|
40
|
+
const key = (input ?? "hello").toLowerCase().trim();
|
|
41
|
+
const t = TEMPLATE_ALIASES[key];
|
|
42
|
+
if (!t) {
|
|
43
|
+
throw new Error(`Unknown template "${input}". Use: hello, robot, camera, or depth.`);
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
}
|
|
47
|
+
export function normalizeSkillSlug(input) {
|
|
48
|
+
const slug = input
|
|
49
|
+
.trim()
|
|
50
|
+
.toLowerCase()
|
|
51
|
+
.replace(/^@[^/]+\//, "")
|
|
52
|
+
.replace(/[^a-z0-9-]+/g, "-")
|
|
53
|
+
.replace(/-+/g, "-")
|
|
54
|
+
.replace(/^-|-$/g, "");
|
|
55
|
+
if (!slug || !SLUG_RE.test(slug)) {
|
|
56
|
+
throw new Error("Skill slug must be kebab-case (2–64 chars, [a-z0-9-]), e.g. hello-world or follow-me.");
|
|
57
|
+
}
|
|
58
|
+
return slug;
|
|
59
|
+
}
|
|
60
|
+
export function slugToToolName(slug) {
|
|
61
|
+
return slug.replace(/-/g, "_");
|
|
62
|
+
}
|
|
63
|
+
export function slugToDisplayName(slug) {
|
|
64
|
+
return slug
|
|
65
|
+
.split("-")
|
|
66
|
+
.filter(Boolean)
|
|
67
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
68
|
+
.join(" ");
|
|
69
|
+
}
|
|
70
|
+
function templatesRoot() {
|
|
71
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
72
|
+
return join(here, "..", "..", "templates", "skills");
|
|
73
|
+
}
|
|
74
|
+
function substituteVars(content, vars) {
|
|
75
|
+
let out = content;
|
|
76
|
+
for (const [key, value] of Object.entries(vars)) {
|
|
77
|
+
out = out.replaceAll(`{{${key}}}`, value);
|
|
78
|
+
}
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
81
|
+
function copyTemplateTree(srcDir, destDir, vars) {
|
|
82
|
+
for (const name of readdirSync(srcDir)) {
|
|
83
|
+
const src = join(srcDir, name);
|
|
84
|
+
const dest = join(destDir, name);
|
|
85
|
+
const st = statSync(src);
|
|
86
|
+
if (st.isDirectory()) {
|
|
87
|
+
mkdirSync(dest, { recursive: true });
|
|
88
|
+
copyTemplateTree(src, dest, vars);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
const raw = readFileSync(src, "utf8");
|
|
92
|
+
writeFileSync(dest, substituteVars(raw, vars), "utf8");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
export function scaffoldSkill(opts) {
|
|
97
|
+
const slug = normalizeSkillSlug(opts.slug);
|
|
98
|
+
const template = normalizeTemplate(opts.template);
|
|
99
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
100
|
+
const dir = resolve(cwd, `agenticros-skill-${slug}`);
|
|
101
|
+
if (existsSync(dir)) {
|
|
102
|
+
throw new Error(`Directory already exists: ${dir}`);
|
|
103
|
+
}
|
|
104
|
+
const defaults = TEMPLATE_DEFAULTS[template];
|
|
105
|
+
const displayName = slugToDisplayName(slug);
|
|
106
|
+
const toolName = slugToToolName(slug);
|
|
107
|
+
const vars = {
|
|
108
|
+
slug,
|
|
109
|
+
displayName,
|
|
110
|
+
toolName,
|
|
111
|
+
description: defaults.description,
|
|
112
|
+
};
|
|
113
|
+
const srcTemplate = join(templatesRoot(), template);
|
|
114
|
+
if (!existsSync(srcTemplate)) {
|
|
115
|
+
throw new Error(`Template not found on disk: ${srcTemplate}`);
|
|
116
|
+
}
|
|
117
|
+
mkdirSync(dir, { recursive: true });
|
|
118
|
+
copyTemplateTree(srcTemplate, dir, vars);
|
|
119
|
+
const docsDir = join(dir, "docs");
|
|
120
|
+
mkdirSync(docsDir, { recursive: true });
|
|
121
|
+
writeFileSync(join(docsDir, "icon.png"), PLACEHOLDER_PNG);
|
|
122
|
+
return { dir, slug, template, toolName };
|
|
123
|
+
}
|
|
124
|
+
/** SHA-256 of normalized template source (for tutorial graduation checks). */
|
|
125
|
+
export function hashSkillSource(source) {
|
|
126
|
+
const normalized = source.replace(/\s+/g, " ").trim();
|
|
127
|
+
return createHash("sha256").update(normalized).digest("hex");
|
|
128
|
+
}
|
|
129
|
+
export function getTemplateFingerprints() {
|
|
130
|
+
const root = templatesRoot();
|
|
131
|
+
const out = {};
|
|
132
|
+
for (const t of ["hello", "robot", "camera", "depth"]) {
|
|
133
|
+
const indexPath = join(root, t, "src", "index.ts");
|
|
134
|
+
if (existsSync(indexPath)) {
|
|
135
|
+
out[t] = hashSkillSource(readFileSync(indexPath, "utf8"));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return out;
|
|
139
|
+
}
|
|
140
|
+
export function isUnmodifiedTemplate(source, template) {
|
|
141
|
+
const fps = getTemplateFingerprints();
|
|
142
|
+
const fp = fps[template];
|
|
143
|
+
if (!fp)
|
|
144
|
+
return false;
|
|
145
|
+
return hashSkillSource(source) === fp;
|
|
146
|
+
}
|
|
147
|
+
export function readSkillIndexSource(skillDir) {
|
|
148
|
+
const path = join(skillDir, "src", "index.ts");
|
|
149
|
+
if (!existsSync(path))
|
|
150
|
+
return null;
|
|
151
|
+
return readFileSync(path, "utf8");
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=skill-scaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-scaffold.js","sourceRoot":"","sources":["../../src/util/skill-scaffold.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAEpD,MAAM,gBAAgB,GAAkC;IACtD,KAAK,EAAE,OAAO;IACd,CAAC,EAAE,OAAO;IACV,KAAK,EAAE,OAAO;IACd,CAAC,EAAE,OAAO;IACV,MAAM,EAAE,QAAQ;IAChB,CAAC,EAAE,QAAQ;IACX,KAAK,EAAE,OAAO;IACd,CAAC,EAAE,OAAO;CACX,CAAC;AAEF,MAAM,iBAAiB,GAGnB;IACF,KAAK,EAAE;QACL,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,0DAA0D;KACxE;IACD,KAAK,EAAE;QACL,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,mDAAmD;KACjE;IACD,MAAM,EAAE;QACN,WAAW,EAAE,gBAAgB;QAC7B,WAAW,EAAE,0CAA0C;KACxD;IACD,KAAK,EAAE;QACL,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,gDAAgD;KAC9D;CACF,CAAC;AAEF,6DAA6D;AAC7D,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CACjC,kGAAkG,EAClG,QAAQ,CACT,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,KAAyB;IACzD,MAAM,G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AC/C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agenticros",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgenticROS - agentic AI for ROS-powered robots. Single CLI to launch real-robot or simulated demos, manage configuration, and inspect status.",
|
|
6
6
|
"keywords": [
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"ai",
|
|
11
11
|
"agent",
|
|
12
12
|
"claude",
|
|
13
|
+
"codex",
|
|
14
|
+
"openai",
|
|
13
15
|
"openclaw",
|
|
14
16
|
"gazebo",
|
|
15
17
|
"simulation",
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
},
|
|
22
24
|
"files": [
|
|
23
25
|
"dist",
|
|
26
|
+
"templates",
|
|
24
27
|
"runtime",
|
|
25
28
|
"README.md",
|
|
26
29
|
"LICENSE"
|
package/runtime/BUNDLE.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"packedAt": "2026-06-
|
|
2
|
+
"packedAt": "2026-06-30T23:41:17.957Z",
|
|
3
3
|
"repo": "https://github.com/PlaiPin/agenticros",
|
|
4
4
|
"note": "This directory is a snapshot of the agenticros monorepo source. `agenticros init` will copy it to ~/agenticros and run pnpm install + colcon build there.",
|
|
5
5
|
"layout": {
|
package/runtime/README.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
**Physical AI Agents for ROS Robots**
|
|
14
14
|
|
|
15
|
+

|
|
16
|
+
|
|
15
17
|
[](https://www.youtube.com/watch?v=_fbWhYcPj0M)
|
|
16
18
|
|
|
17
19
|
> ▶ [Watch the AgenticROS intro on YouTube](https://www.youtube.com/watch?v=_fbWhYcPj0M)
|
|
@@ -25,7 +27,7 @@ With AgenticROS, your robot can describe what it sees, follow intent ("go check
|
|
|
25
27
|
- **[OpenClaw](https://openclaw.ai)** — Native gateway plugin with ROS 2 tools, commands, a config UI, a teleop web app, and a skill loader. The flagship integration.
|
|
26
28
|
- **[NVIDIA NemoClaw](https://github.com/NVIDIA/NemoClaw)** — Run AgenticROS inside NemoClaw's OpenShell sandbox with policy-enforced egress and managed NVIDIA inference; ROS 2, RealSense, and rosbridge stay on the host while the plugin runs sandboxed.
|
|
27
29
|
- **[Anthropic Claude](https://www.anthropic.com/claude)** — A single MCP server powers **Claude Code** (terminal), **Claude Desktop** (macOS / Windows), and **Claude Dispatch** (iOS, paired to your Mac). Ask Claude what your robot sees, and it answers with a live camera snapshot and depth reading.
|
|
28
|
-
- **[OpenAI Codex CLI](https://developers.openai.com/codex/)** —
|
|
30
|
+
- **[OpenAI Codex CLI](https://developers.openai.com/codex/)** — Same MCP server as Claude Code. One command registers Codex: `agenticros codex setup` (writes `~/.codex/config.toml` with an absolute path to the MCP binary). Full tool surface: missions, follow-me, find-object, memory. Setup guide: [docs/codex-setup.md](docs/codex-setup.md).
|
|
29
31
|
- **[Google Gemini](https://ai.google.dev/)** — Standalone CLI that uses Gemini function calling against the same ROS 2 tools (no MCP required) — ideal for scripting and headless agents.
|
|
30
32
|
|
|
31
33
|
AgenticROS is built so that new adapters (LangGraph, OpenAI, local models, voice stacks, etc.) can be added without touching the ROS 2 layer. The core transport and tool contract are platform-agnostic; adapters are thin shims that surface those tools to each agent runtime.
|
|
@@ -36,12 +38,13 @@ AgenticROS is built so that new adapters (LangGraph, OpenAI, local models, voice
|
|
|
36
38
|
|
|
37
39
|
- **Core** (`packages/core`): Platform-agnostic ROS2 transport (rosbridge, Zenoh, local, WebRTC), config schema, and shared types. No dependency on any specific AI platform.
|
|
38
40
|
- **Adapters** (`packages/agenticros`, and later others): Implement the contract for each AI platform. The OpenClaw adapter registers tools, commands, and HTTP routes with the OpenClaw gateway and uses the core for all ROS2 communication.
|
|
39
|
-
- `**packages/agenticros-claude-code`** — MCP server for **Claude Code
|
|
41
|
+
- `**packages/agenticros-claude-code`** — MCP server for **Claude Code**, **Claude desktop**, **Dispatch**, and **OpenAI Codex CLI**. See [packages/agenticros-claude-code/README.md](packages/agenticros-claude-code/README.md) and [docs/codex-setup.md](docs/codex-setup.md).
|
|
40
42
|
- `**packages/agenticros-gemini`** — **Gemini CLI**: use Google Gemini to chat with your robot from the terminal (same ROS2 tools, no MCP). See [packages/agenticros-gemini/README.md](packages/agenticros-gemini/README.md).
|
|
41
43
|
|
|
42
44
|
```
|
|
43
45
|
User (messaging app) → OpenClaw Gateway → AgenticROS OpenClaw plugin → Core → ROS2 robots
|
|
44
46
|
Claude (Code / desktop / Dispatch) → agenticros MCP server → Core → ROS2 robots (Zenoh/rosbridge)
|
|
47
|
+
Codex CLI → agenticros MCP server → Core → ROS2 robots (Zenoh/rosbridge)
|
|
45
48
|
Gemini CLI → @agenticros/gemini (function calling) → Core → ROS2 robots
|
|
46
49
|
```
|
|
47
50
|
|
|
@@ -379,13 +382,17 @@ Add `{ "memory": { "enabled": true, "backend": "mem0" } }` to `~/.agenticros/con
|
|
|
379
382
|
|
|
380
383
|
## Skills
|
|
381
384
|
|
|
382
|
-
AgenticROS **skills** are optional packages that add tools and behaviors to the plugin (e.g. `
|
|
385
|
+
AgenticROS **skills** are optional packages that add tools and behaviors to the plugin (e.g. `follow_person`, `find_object`). They are loaded at OpenClaw gateway start. Browse and install from **[skills.agenticros.com](https://skills.agenticros.com)**, or scaffold and publish your own with the CLI.
|
|
383
386
|
|
|
384
387
|
### Managing skills with the CLI
|
|
385
388
|
|
|
386
389
|
The `agenticros skills` command (and the **Manage skills** menu entry) does everything for you: it scans the usual locations for clones, edits `~/.openclaw/openclaw.json`, refreshes the plugin manifest's `contracts.tools` allowlist, and reminds you to bounce the gateway.
|
|
387
390
|
|
|
388
391
|
```bash
|
|
392
|
+
# Install from the marketplace (owner/skill-id ref)
|
|
393
|
+
npx agenticros skills search follow
|
|
394
|
+
npx agenticros skills install chrismatthieu/followme
|
|
395
|
+
|
|
389
396
|
agenticros skills # list registered + cloned-but-unregistered
|
|
390
397
|
agenticros skills discover # interactive picker over candidates on disk
|
|
391
398
|
agenticros skills add <path-or-name> # register a clone (path) or npm package
|
|
@@ -393,7 +400,15 @@ agenticros skills remove <id-or-name> # unregister
|
|
|
393
400
|
agenticros skills sync # refresh OpenClaw contracts.tools allowlist
|
|
394
401
|
```
|
|
395
402
|
|
|
396
|
-
|
|
403
|
+
**Create and publish** a new skill:
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
npx agenticros create-skill my-skill --template robot
|
|
407
|
+
cd agenticros-skill-my-skill && npm install && npm run dev
|
|
408
|
+
npx agenticros publish
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
A typical manual install (without the marketplace) looks like:
|
|
397
412
|
|
|
398
413
|
```bash
|
|
399
414
|
# clone whichever skills you want, anywhere near the repo
|
|
@@ -439,7 +454,7 @@ Per-skill behaviour lives under `config.skills.<skillId>` (e.g. `config.skills.f
|
|
|
439
454
|
|
|
440
455
|
### Contract & writing your own skill
|
|
441
456
|
|
|
442
|
-
A skill is a Node package with an `"agenticros": { "id": "..." }` block in `package.json` and a `registerSkill(api, config, context)` export from `main`.
|
|
457
|
+
A skill is a Node package with an `"agenticros": { "id": "..." }` block in `package.json` and a `registerSkill(api, config, context)` export from `main`. Scaffold with `npx agenticros create-skill`, publish to **[skills.agenticros.com](https://skills.agenticros.com)** with `npx agenticros publish`, and install with `npx agenticros skills install <owner/skill-id>` (e.g. `chrismatthieu/followme`). See **[docs/skills.md](docs/skills.md)** for the full contract and **[agenticros-skill-followme](https://github.com/agenticros/agenticros-skill-followme)** ([marketplace listing](https://skills.agenticros.com/chrismatthieu/followme)) as a reference template.
|
|
443
458
|
|
|
444
459
|
## Strategy & vision
|
|
445
460
|
|
package/runtime/docs/cli.md
CHANGED
|
@@ -124,6 +124,18 @@ Read or edit `~/.agenticros/config.json`. Actions:
|
|
|
124
124
|
| `AGENTICROS_CONFIG_PATH` | (auto) | Override the path to `~/.agenticros/config.json`. |
|
|
125
125
|
| `AGENTICROS_ROBOT_NAMESPACE` | (from config) | Force a robot namespace at runtime. |
|
|
126
126
|
| `OPENAI_API_KEY` | (none) | If set, doctor reports green without requiring OpenClaw profile config. |
|
|
127
|
+
| `AGENTICROS_SKILLS_API` | `https://skills.agenticros.com/api` | Override marketplace API base URL. |
|
|
128
|
+
| `GH_TOKEN` / `GITHUB_TOKEN` | (none) | GitHub PAT for `agenticros publish`. |
|
|
129
|
+
|
|
130
|
+
### Skill authoring
|
|
131
|
+
|
|
132
|
+
| Command | Purpose |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `agenticros create-skill <slug> [--template hello\|robot\|camera\|depth]` | Scaffold `./agenticros-skill-<slug>/` in cwd. |
|
|
135
|
+
| `agenticros skills dev [--invoke <tool>] [--live]` | Load the skill locally without OpenClaw. |
|
|
136
|
+
| `agenticros publish [--graduate]` | Validate, push to GitHub, submit to skills.agenticros.com. |
|
|
137
|
+
| `agenticros skills install <owner/skill>` | Install from marketplace (e.g. `chrismatthieu/followme`). |
|
|
138
|
+
| `agenticros skills search <q>` | Search the marketplace. |
|
|
127
139
|
|
|
128
140
|
## Troubleshooting
|
|
129
141
|
|
|
@@ -96,9 +96,19 @@ Scope options: `--scope user` (default), `--scope project` (shared via `.mcp.jso
|
|
|
96
96
|
|
|
97
97
|
## Codex CLI (OpenAI)
|
|
98
98
|
|
|
99
|
-
The same MCP server works unmodified with the **OpenAI Codex CLI** — Codex is a vanilla MCP client, and our server speaks the standard
|
|
99
|
+
The same MCP server works unmodified with the **OpenAI Codex CLI** — Codex is a vanilla MCP client, and our server speaks the standard MCP protocol.
|
|
100
100
|
|
|
101
|
-
**Option A — `codex
|
|
101
|
+
**Option A — `agenticros codex setup` (recommended)**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
agenticros codex setup # ~/.codex/config.toml
|
|
105
|
+
agenticros codex setup --project # .codex/config.toml in repo root
|
|
106
|
+
agenticros codex doctor
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Then start Codex and run `/mcp` — you should see `agenticros` connected. See [docs/codex-setup.md](../../docs/codex-setup.md) for the full guide.
|
|
110
|
+
|
|
111
|
+
**Option B — `codex mcp add`**
|
|
102
112
|
|
|
103
113
|
```bash
|
|
104
114
|
cd /path/to/agenticros
|
|
@@ -106,20 +116,20 @@ codex mcp add agenticros \
|
|
|
106
116
|
-- node "$(pwd)/packages/agenticros-claude-code/dist/index.js"
|
|
107
117
|
```
|
|
108
118
|
|
|
109
|
-
**Option
|
|
119
|
+
**Option C — direct edit of `~/.codex/config.toml`**
|
|
110
120
|
|
|
111
121
|
```toml
|
|
112
122
|
[mcp_servers.agenticros]
|
|
113
|
-
command = "
|
|
114
|
-
args = ["/ABSOLUTE/PATH/TO/agenticros/packages/agenticros-claude-code/dist/index.js"]
|
|
123
|
+
command = "sh"
|
|
124
|
+
args = ["-c", "node /ABSOLUTE/PATH/TO/agenticros/packages/agenticros-claude-code/dist/index.js 2>>/tmp/agenticros-mcp.log"]
|
|
115
125
|
enabled = true
|
|
116
126
|
startup_timeout_sec = 30
|
|
117
127
|
|
|
118
128
|
[mcp_servers.agenticros.env]
|
|
119
|
-
AGENTICROS_ROBOT_NAMESPACE = "
|
|
129
|
+
AGENTICROS_ROBOT_NAMESPACE = ""
|
|
120
130
|
```
|
|
121
131
|
|
|
122
|
-
|
|
132
|
+
Same tools, same tool names, same JSON shapes as in Claude Code; everything in the **Tools** section below applies identically.
|
|
123
133
|
|
|
124
134
|
Two Codex-specific notes:
|
|
125
135
|
|
|
@@ -300,4 +310,4 @@ If `ros2_publish` runs but the robot doesn’t move:
|
|
|
300
310
|
|
|
301
311
|
## Skills
|
|
302
312
|
|
|
303
|
-
Skill packages (e.g. `agenticros-skill-followme`, `agenticros-skill-find`) extend the capability registry with new verbs like `follow_person` and `find_object`. The MCP server reads each skill's `package.json` `agenticros` block (`id`, `capabilities[]`) at startup and surfaces those verbs through `ros2_list_capabilities` and `run_mission` — no per-skill MCP tool needed. To register a skill for this adapter, install it with `agenticros skills install <
|
|
313
|
+
Skill packages (e.g. `agenticros-skill-followme`, `agenticros-skill-find`) extend the capability registry with new verbs like `follow_person` and `find_object`. The MCP server reads each skill's `package.json` `agenticros` block (`id`, `capabilities[]`) at startup and surfaces those verbs through `ros2_list_capabilities` and `run_mission` — no per-skill MCP tool needed. To register a skill for this adapter, install it with `agenticros skills install <owner/skill-id>` from the marketplace (e.g. `chrismatthieu/followme`), or add its path under `skillPaths[]` in `~/.agenticros/config.json` (or use the `agenticros skills add <path>` CLI). See [docs/skills.md](../../docs/skills.md) for the full skill contract.
|
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
"name": "@agenticros/claude-code",
|
|
3
3
|
"version": "0.0.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "AgenticROS MCP server for Claude Code CLI — chat with your ROS2 robot from the terminal",
|
|
5
|
+
"description": "AgenticROS MCP server for Claude Code, Claude Desktop, Dispatch, and OpenAI Codex CLI — chat with your ROS2 robot from the terminal",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"agenticros",
|
|
8
|
+
"ros2",
|
|
9
|
+
"robotics",
|
|
10
|
+
"mcp",
|
|
11
|
+
"claude",
|
|
12
|
+
"codex",
|
|
13
|
+
"openai",
|
|
14
|
+
"model-context-protocol"
|
|
15
|
+
],
|
|
6
16
|
"main": "./dist/index.js",
|
|
7
17
|
"bin": {
|
|
8
18
|
"agenticros-mcp": "./dist/index.js"
|
|
@@ -21,6 +21,16 @@ You don't normally use it directly — you use one of the adapters that depends
|
|
|
21
21
|
|
|
22
22
|
A skill is an npm package that registers tools the AI agent can call on your robot.
|
|
23
23
|
|
|
24
|
+
**Quick start** — scaffold, dev locally, publish:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx agenticros create-skill my-skill
|
|
28
|
+
cd agenticros-skill-my-skill && npm install && npm run dev
|
|
29
|
+
npx agenticros publish
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or start from scratch with `@agenticros/core`:
|
|
33
|
+
|
|
24
34
|
```bash
|
|
25
35
|
npm install --save @agenticros/core
|
|
26
36
|
```
|
|
@@ -75,10 +85,10 @@ export const registerSkill: RegisterSkill = (api, _config, _context) => {
|
|
|
75
85
|
};
|
|
76
86
|
```
|
|
77
87
|
|
|
78
|
-
|
|
88
|
+
Publish to the marketplace with `npx agenticros publish`, or submit via **[skills.agenticros.com/submit](https://skills.agenticros.com/submit)**. Published skills use namespaced refs `owner/skill-id` (your GitHub login + `agenticros.id`):
|
|
79
89
|
|
|
80
90
|
```bash
|
|
81
|
-
npx agenticros skills install myskill
|
|
91
|
+
npx agenticros skills install your-handle/myskill
|
|
82
92
|
```
|
|
83
93
|
|
|
84
94
|
See the [skills contract & guide](https://github.com/agenticros/agenticros/blob/main/docs/skills.md) for the full reference.
|
|
@@ -0,0 +1,38 @@
|
|
|
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": ["vision"],
|
|
19
|
+
"screenshots": ["docs/icon.png"],
|
|
20
|
+
"capabilities": [
|
|
21
|
+
{
|
|
22
|
+
"id": "{{toolName}}",
|
|
23
|
+
"verb": "capture",
|
|
24
|
+
"description": "{{description}}"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@agenticros/core": "^0.5.0",
|
|
30
|
+
"@sinclair/typebox": "^0.34.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "^20.17.0",
|
|
34
|
+
"typescript": "^5.7.0"
|
|
35
|
+
},
|
|
36
|
+
"keywords": ["agenticros", "camera", "vision"],
|
|
37
|
+
"license": "Apache-2.0"
|
|
38
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {{displayName}} — capture one frame from the robot camera.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { Type } from "@sinclair/typebox";
|
|
6
|
+
import type { RosTransport } from "@agenticros/core";
|
|
7
|
+
|
|
8
|
+
const TOOL_NAME = "{{toolName}}";
|
|
9
|
+
|
|
10
|
+
interface SkillContext {
|
|
11
|
+
getTransport(): RosTransport;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface SkillPluginApi {
|
|
15
|
+
registerTool(tool: {
|
|
16
|
+
name: string;
|
|
17
|
+
label: string;
|
|
18
|
+
description: string;
|
|
19
|
+
parameters: unknown;
|
|
20
|
+
execute: (
|
|
21
|
+
toolCallId: string,
|
|
22
|
+
params: Record<string, unknown>,
|
|
23
|
+
signal?: AbortSignal,
|
|
24
|
+
) => Promise<{ content: { type: string; text: string }[]; details?: unknown }>;
|
|
25
|
+
}): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function registerSkill(
|
|
29
|
+
api: SkillPluginApi,
|
|
30
|
+
config: { robot?: { cameraTopic?: string } },
|
|
31
|
+
context: SkillContext,
|
|
32
|
+
): void {
|
|
33
|
+
api.registerTool({
|
|
34
|
+
name: TOOL_NAME,
|
|
35
|
+
label: "{{displayName}}",
|
|
36
|
+
description: "{{description}}",
|
|
37
|
+
parameters: Type.Object({
|
|
38
|
+
topic: Type.Optional(
|
|
39
|
+
Type.String({ description: "Camera topic override (default from robot config)." }),
|
|
40
|
+
),
|
|
41
|
+
}),
|
|
42
|
+
async execute(_id, params) {
|
|
43
|
+
const transport = context.getTransport();
|
|
44
|
+
const topic =
|
|
45
|
+
(typeof params.topic === "string" && params.topic) ||
|
|
46
|
+
config.robot?.cameraTopic ||
|
|
47
|
+
"camera/color/image_raw";
|
|
48
|
+
const msg = await transport.subscribeOnce(topic, 5000);
|
|
49
|
+
const encoding =
|
|
50
|
+
msg && typeof msg === "object" && "encoding" in msg
|
|
51
|
+
? String((msg as { encoding?: string }).encoding ?? "unknown")
|
|
52
|
+
: "unknown";
|
|
53
|
+
const width =
|
|
54
|
+
msg && typeof msg === "object" && "width" in msg
|
|
55
|
+
? Number((msg as { width?: number }).width ?? 0)
|
|
56
|
+
: 0;
|
|
57
|
+
const height =
|
|
58
|
+
msg && typeof msg === "object" && "height" in msg
|
|
59
|
+
? Number((msg as { height?: number }).height ?? 0)
|
|
60
|
+
: 0;
|
|
61
|
+
const summary = `Captured ${width}x${height} frame (${encoding}) from ${topic}.`;
|
|
62
|
+
return {
|
|
63
|
+
content: [{ type: "text", text: summary }],
|
|
64
|
+
details: { topic, width, height, encoding, captured: Boolean(msg) },
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
}
|
|
@@ -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
|
+
}
|