@martenhq/sdk 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.
- package/CHANGELOG.md +15 -0
- package/README.md +10 -6
- package/package.json +23 -31
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
- Task statuses are `todo`, `in_progress` and `done`: `needs_review` is gone from `TaskStatus` and the filters, as
|
|
6
|
+
it is from Marten.
|
|
7
|
+
- `baseUrl` is documented as where the key goes: `MARTEN_API_URL` is read only when `baseUrl` is left out.
|
|
8
|
+
- The README says what scopes do and don't limit (a key with `martens` asks your Martens, which act for you), that
|
|
9
|
+
`--scope` adds to the defaults, and which scopes groups' tasks need (`chats:read` to list, `chats:write` to add
|
|
10
|
+
or change).
|
|
11
|
+
|
|
12
|
+
## 0.1.0
|
|
13
|
+
|
|
14
|
+
- First release: `Marten` (`me`, `martens`, `chats`, `tasks`, `registry`, `revokeKey`), `MartenHandle` (`ask`,
|
|
15
|
+
`send`, `messages`) and `MartenError` (`status`, `code`, `retryAfter`).
|
package/README.md
CHANGED
|
@@ -20,13 +20,17 @@ Each has scopes:
|
|
|
20
20
|
| Scope | Lets it |
|
|
21
21
|
|---|---|
|
|
22
22
|
| `martens` (default) | list your Martens, read and post in their 1:1s with you, `ask` them |
|
|
23
|
-
| `tasks` (default) | list, add and change tasks in your chats |
|
|
23
|
+
| `tasks` (default) | list, add and change tasks in your Martens' 1:1s (with `chats:read`, see groups' tasks too) |
|
|
24
24
|
| `registry` (default) | browse the registry and install Martens for you |
|
|
25
|
-
| `chats:read` | read your groups |
|
|
26
|
-
| `chats:write` | post as you in your groups, add Martens to them |
|
|
25
|
+
| `chats:read` | read your groups and their tasks |
|
|
26
|
+
| `chats:write` | post as you in your groups, add or change tasks there, add Martens to them |
|
|
27
27
|
|
|
28
|
-
`marten login`
|
|
29
|
-
|
|
28
|
+
`marten login` gives the defaults; `--scope` adds to them (`npx @martenhq/cli login --scope chats:read --scope
|
|
29
|
+
chats:write`), and signing in again keeps what the machine's key could already do.
|
|
30
|
+
|
|
31
|
+
**Scopes limit what the key does, not what your Martens do.** A key with `martens` talks to your own Martens, and
|
|
32
|
+
they act for you as they do when you ask them in the apps: they can read and post in the groups you share with them
|
|
33
|
+
and use the apps you've connected for them. Give a key to a program you'd let ask your Marten things.
|
|
30
34
|
|
|
31
35
|
A message sent with a key shows "via <key name>" under it, so everyone in the chat can tell.
|
|
32
36
|
|
|
@@ -87,7 +91,7 @@ seconds to wait) and `network`.
|
|
|
87
91
|
```ts
|
|
88
92
|
new Marten({
|
|
89
93
|
apiKey: "mk_live_…", // default: MARTEN_API_KEY
|
|
90
|
-
baseUrl: "https://api.marten.sh", //
|
|
94
|
+
baseUrl: "https://api.marten.sh", // read from MARTEN_API_URL only when left out; then this
|
|
91
95
|
fetch, // bring your own
|
|
92
96
|
});
|
|
93
97
|
```
|
package/package.json
CHANGED
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@martenhq/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Talk to your Martens from your own programs: ask them, read and post in your chats, manage tasks, install Martens.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://marten.sh",
|
|
8
|
-
"repository": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
},
|
|
17
|
-
"
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"types": "./dist/index.d.ts",
|
|
21
|
-
"default": "./dist/index.js"
|
|
8
|
+
"repository": { "type": "git", "url": "git+https://github.com/RedPlanetHQ/marten-app.git", "directory": "packages/sdk" },
|
|
9
|
+
"keywords": ["marten", "agents", "ai", "sdk"],
|
|
10
|
+
"engines": { "node": ">=20" },
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
22
18
|
},
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@types/bun": "^1.4.2"
|
|
38
|
-
}
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"files": ["dist", "README.md", "CHANGELOG.md", "LICENSE"],
|
|
22
|
+
"publishConfig": { "access": "public" },
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "bun build.ts",
|
|
25
|
+
"test": "bun test",
|
|
26
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/bun": "^1.4.2"
|
|
30
|
+
}
|
|
39
31
|
}
|