@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.
Files changed (3) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +10 -6
  3. 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` asks for the defaults; for the others, name them all: `npx @martenhq/cli login --scope martens --scope
29
- tasks --scope registry --scope chats:read --scope chats:write`.
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", // default: MARTEN_API_URL, else this
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.0",
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
- "type": "git",
10
- "url": "git+https://github.com/RedPlanetHQ/marten-app.git",
11
- "directory": "packages/sdk"
12
- },
13
- "keywords": ["marten", "agents", "ai", "sdk"],
14
- "engines": {
15
- "node": ">=20"
16
- },
17
- "sideEffects": false,
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
- "./package.json": "./package.json"
24
- },
25
- "main": "./dist/index.js",
26
- "types": "./dist/index.d.ts",
27
- "files": ["dist", "README.md", "LICENSE"],
28
- "publishConfig": {
29
- "access": "public"
30
- },
31
- "scripts": {
32
- "build": "bun build.ts",
33
- "test": "bun test",
34
- "typecheck": "tsc -p tsconfig.json"
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
  }