@artil-ai/openclaw 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +6 -6
  2. package/dist/index.js +15 -17
  3. package/package.json +6 -4
package/README.md CHANGED
@@ -14,19 +14,19 @@ openclaw plugins install npm:@artil-ai/openclaw@latest --force --accept-capabili
14
14
 
15
15
  The gateway runs `artil internal openclaw-channel`, so `artil` must be on its
16
16
  PATH, which includes `~/.local/bin`, and signed in as the agent. See
17
- [Automatic messages](https://docs.artil.dev/automatic-messages) in the docs.
17
+ [OpenClaw](https://docs.artil.dev/openclaw) in the docs.
18
18
 
19
19
  | Entry point | What it does |
20
20
  | ----------------------- | -------------------------------------------------------------------------------------- |
21
21
  | `index.ts` | Starts a turn in the `agent:<id>:artil` session for each notice, delivering no replies |
22
- | `listen.ts` | Runs `artil internal openclaw-channel` and reads its notices |
23
- | `skills/artil/SKILL.md` | The `artil` skill, copied from `pi` when the package is packed |
22
+ | `skills/artil/SKILL.md` | The `artil` skill, copied from the repository's `skills` when packed |
24
23
 
25
24
  ## Development
26
25
 
27
- `npm pack` builds `dist/index.js` and copies the skill. Install the packed
28
- archive into a gateway to try it:
26
+ `bun run build` bundles `dist/index.js` and copies the skill, and `npm pack`
27
+ runs it. Install the packed archive into a gateway to try it:
29
28
 
30
29
  ```sh
31
- openclaw plugins install npm-pack:./artil-ai-openclaw-0.1.0.tgz --force --accept-capabilities
30
+ npm pack
31
+ openclaw plugins install npm-pack:./artil-ai-openclaw-*.tgz --force --accept-capabilities
32
32
  ```
package/dist/index.js CHANGED
@@ -1,36 +1,33 @@
1
- // index.ts
2
- import { resolveDefaultAgentId } from "openclaw/plugin-sdk/config-runtime";
3
- import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4
-
5
- // listen.ts
1
+ // ../../packages/channel/listen.ts
6
2
  import { spawn } from "node:child_process";
7
3
  import { createInterface } from "node:readline";
8
- var missing = "The artil command is not on the PATH. Install it with curl -fsSL https://artil.dev/install.sh | bash, then restart the gateway.";
9
- function listenForMessages({ artil, deliver, stopped }) {
10
- const listening = spawn(artil, ["internal", "openclaw-channel"]);
4
+ function listen({ channel, restart, deliver, stopped }) {
5
+ const artil = spawn("artil", ["internal", channel]);
11
6
  let problem = "";
12
7
  let stopping = false;
13
- listening.on("error", (error) => {
14
- problem = error.code === "ENOENT" ? missing : error.message;
8
+ artil.on("error", (error) => {
9
+ problem = error.code === "ENOENT" ? `The artil command is not on the PATH. Install it with curl -fsSL https://artil.dev/install.sh | bash, or add ~/.local/bin to the PATH, then ${restart}.` : error.message;
15
10
  });
16
- listening.stderr.on("data", (chunk) => {
11
+ artil.stderr.on("data", (chunk) => {
17
12
  problem += chunk.toString();
18
13
  });
19
- listening.on("close", () => {
14
+ artil.on("close", () => {
20
15
  if (!stopping)
21
16
  stopped(problem.trim());
22
17
  });
23
- createInterface({ input: listening.stdout }).on("line", (line) => {
18
+ createInterface({ input: artil.stdout }).on("line", (line) => {
24
19
  deliver(JSON.parse(line));
25
20
  });
26
21
  return function stop() {
27
22
  stopping = true;
28
- listening.stdin.end();
29
- setTimeout(() => listening.kill(), 5000).unref();
23
+ artil.stdin.end();
24
+ setTimeout(() => artil.kill(), 5000).unref();
30
25
  };
31
26
  }
32
27
 
33
28
  // index.ts
29
+ import { resolveDefaultAgentId } from "openclaw/plugin-sdk/config-runtime";
30
+ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
34
31
  var hint = [
35
32
  "Notices about new email and texts to this Artil agent account, and wake-ups from its team, arrive in this session.",
36
33
  "Read each message with the artil command its notice names, and answer it with `artil email send --reply-to` or `artil sms send --reply-to`, as the artil skill describes.",
@@ -49,8 +46,9 @@ var openclaw_default = definePluginEntry({
49
46
  start({ config, logger }) {
50
47
  const sessionKey = `agent:${resolveDefaultAgentId(config)}:artil`;
51
48
  stop?.();
52
- stop = listenForMessages({
53
- artil: "artil",
49
+ stop = listen({
50
+ channel: "openclaw-channel",
51
+ restart: "restart the gateway",
54
52
  deliver: ({ content, meta }) => void api.runtime.subagent.run({
55
53
  sessionKey,
56
54
  message: content,
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@artil-ai/openclaw",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Hear about your Artil agent's new messages in OpenClaw, and answer them with the artil CLI.",
5
5
  "keywords": [
6
6
  "artil",
7
7
  "openclaw"
8
8
  ],
9
- "homepage": "https://docs.artil.dev/automatic-messages",
9
+ "homepage": "https://docs.artil.dev/openclaw",
10
10
  "license": "MIT",
11
11
  "repository": {
12
12
  "type": "git",
13
13
  "url": "git+https://github.com/artilai/plugins.git",
14
- "directory": "openclaw"
14
+ "directory": "plugins/openclaw"
15
15
  },
16
16
  "files": [
17
17
  "dist",
@@ -23,9 +23,11 @@
23
23
  "access": "public"
24
24
  },
25
25
  "scripts": {
26
- "prepack": "bun build index.ts --outdir dist --target node --external openclaw && rm -rf skills && cp -R ../pi/skills skills"
26
+ "build": "bun build index.ts --outdir dist --target node --external openclaw && rm -rf skills && cp -R ../../skills skills",
27
+ "prepack": "bun run build"
27
28
  },
28
29
  "devDependencies": {
30
+ "@artil-ai/channel": "workspace:*",
29
31
  "openclaw": "2026.9.8"
30
32
  },
31
33
  "peerDependencies": {