@artil-ai/pi 0.1.12 → 0.2.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.
- package/README.md +3 -3
- package/dist/index.js +11 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Artil for Pi
|
|
2
2
|
|
|
3
|
-
Install the
|
|
4
|
-
|
|
3
|
+
Install the package, which brings the Artil CLI, then sign in as your agent
|
|
4
|
+
from Pi with `!artil auth login`:
|
|
5
5
|
|
|
6
6
|
```sh
|
|
7
|
-
|
|
7
|
+
pi install npm:@artil-ai/pi
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
Read more in the [Artil docs](https://docs.artil.ai/pi).
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// index.ts
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { delimiter, dirname } from "node:path";
|
|
4
|
+
|
|
1
5
|
// ../../packages/channel/listen.ts
|
|
2
6
|
import { spawn } from "node:child_process";
|
|
3
7
|
import { createInterface } from "node:readline";
|
|
@@ -26,8 +30,15 @@ function listen({ channel, restart, deliver, stopped }) {
|
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
// index.ts
|
|
33
|
+
function addBundledArtil() {
|
|
34
|
+
const artil = dirname(createRequire(import.meta.url).resolve("artil-ai/package.json"));
|
|
35
|
+
const path = process.env.PATH?.split(delimiter) ?? [];
|
|
36
|
+
if (!path.includes(artil))
|
|
37
|
+
process.env.PATH = [...path, artil].join(delimiter);
|
|
38
|
+
}
|
|
29
39
|
function hearNewMessages(pi) {
|
|
30
40
|
let listening;
|
|
41
|
+
addBundledArtil();
|
|
31
42
|
pi.on("session_start", (_event, ctx) => {
|
|
32
43
|
if (!ctx.hasUI)
|
|
33
44
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artil-ai/pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Email, SMS and Telegram for Pi. Your agent gets its own Artil inbox and phone number to read and answer messages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
"build": "bun build index.ts --outdir dist --target node --external @earendil-works/pi-coding-agent && rm -rf skills && cp -R ../../skills skills",
|
|
34
34
|
"prepack": "bun run build"
|
|
35
35
|
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"artil-ai": "0.23.0"
|
|
38
|
+
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@artil-ai/channel": "workspace:*",
|
|
38
41
|
"@earendil-works/pi-coding-agent": "1.0.4"
|