@newtype-ai/nit 0.4.7 → 0.4.8
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 +68 -47
- package/dist/{chunk-535YI4CD.js → chunk-7LNGTHKO.js} +9 -7
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
# nit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Git for agent identity.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**One identity. Any apps.**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
main → full agent card (public, discoverable)
|
|
13
|
-
faam.io → { skills: [content, social], description: "Content creator..." }
|
|
14
|
-
polymarket.com → { skills: [research, trading], description: "Market analyst..." }
|
|
15
|
-
```
|
|
7
|
+
- **Self-sovereign** — your keys, your identity. No authority assigns or revokes it
|
|
8
|
+
- **Ed25519 signed** — every commit cryptographically signed
|
|
9
|
+
- **Compatible with [A2A protocol](https://google.github.io/A2A/)** — uses the `agent-card.json` format
|
|
10
|
+
- **MIT licensed**
|
|
16
11
|
|
|
17
12
|
## Install
|
|
18
13
|
|
|
@@ -29,27 +24,74 @@ npx @newtype-ai/nit init
|
|
|
29
24
|
## Quick Start
|
|
30
25
|
|
|
31
26
|
```bash
|
|
32
|
-
# Initialize
|
|
27
|
+
# Initialize — generates Ed25519 keypair + initial agent-card.json
|
|
33
28
|
nit init
|
|
34
29
|
|
|
35
30
|
# Create a platform-specific branch
|
|
36
31
|
nit branch faam.io
|
|
37
|
-
|
|
38
|
-
# Switch to it and customize the card
|
|
39
32
|
nit checkout faam.io
|
|
40
|
-
|
|
33
|
+
|
|
34
|
+
# Edit agent-card.json — set name, description, skills
|
|
41
35
|
nit commit -m "FAAM config"
|
|
42
36
|
|
|
43
37
|
# Push all branches to remote
|
|
44
38
|
nit push --all
|
|
45
39
|
```
|
|
46
40
|
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
### Branch-per-platform
|
|
44
|
+
|
|
45
|
+
`main` is your canonical public identity. Each branch is a platform-specific persona — branch name = domain.
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
main → full agent card (public, discoverable)
|
|
49
|
+
faam.io → { skills: [content, social], description: "Content creator..." }
|
|
50
|
+
polymarket.com → { skills: [research, trading], description: "Market analyst..." }
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Data in one branch never pollutes another. Switch environments cleanly.
|
|
54
|
+
|
|
55
|
+
### Built-in crypto wallets
|
|
56
|
+
|
|
57
|
+
One keypair, multiple chains. No seed phrases, no extra key management.
|
|
58
|
+
|
|
59
|
+
- **Solana** — your Ed25519 public key *is* your Solana address
|
|
60
|
+
- **EVM** (Ethereum, BSC, Polygon, Arbitrum, etc.) — deterministic secp256k1 derivation from your Ed25519 seed
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
nit status # shows your wallet addresses
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Skill resolution
|
|
67
|
+
|
|
68
|
+
Skills stored as pointers (`{ "id": "skill-name" }`) in your card — resolved from SKILL.md files at commit time. SKILL.md is the single source of truth.
|
|
69
|
+
|
|
70
|
+
Auto-discovers skills from major agent frameworks:
|
|
71
|
+
- `.claude/skills/` — Claude Code
|
|
72
|
+
- `.cursor/skills/` — Cursor
|
|
73
|
+
- `.windsurf/skills/` — Windsurf
|
|
74
|
+
- `.codex/skills/` — OpenAI Codex
|
|
75
|
+
- `.openclaw/workspace/skills/` — OpenClaw
|
|
76
|
+
|
|
77
|
+
### Configurable remote
|
|
78
|
+
|
|
79
|
+
Free hosting at [newtype-ai.org](https://newtype-ai.org). Or bring your own server:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
nit remote set-url origin https://my-server.com
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Zero runtime dependencies
|
|
86
|
+
|
|
87
|
+
Pure Node.js builtins. No bloat.
|
|
88
|
+
|
|
47
89
|
## Commands
|
|
48
90
|
|
|
49
91
|
| Command | Description |
|
|
50
92
|
|---------|-------------|
|
|
51
93
|
| `nit init` | Create `.nit/`, generate Ed25519 keypair, initial commit |
|
|
52
|
-
| `nit status` | Identity info, current branch, uncommitted changes |
|
|
94
|
+
| `nit status` | Identity info, current branch, wallet addresses, uncommitted changes |
|
|
53
95
|
| `nit commit -m "msg"` | Snapshot agent-card.json |
|
|
54
96
|
| `nit log` | Commit history for current branch |
|
|
55
97
|
| `nit diff [target]` | JSON diff vs HEAD, branch, or commit |
|
|
@@ -80,41 +122,27 @@ Platforms verify your identity by challenging you to sign a nonce — no shared
|
|
|
80
122
|
|
|
81
123
|
nit also derives blockchain wallet addresses from your keypair — Solana (Ed25519 native) and EVM chains (Ethereum, BSC, Polygon, etc.) via a deterministic secp256k1 derivation. Run `nit status` to see your addresses.
|
|
82
124
|
|
|
83
|
-
###
|
|
125
|
+
### Login
|
|
84
126
|
|
|
85
|
-
|
|
127
|
+
When you log into an app, you sign a domain-bound payload with your private key. The app verifies it by fetching your public card. No OAuth, no API keys, no human account.
|
|
86
128
|
|
|
87
|
-
`nit
|
|
129
|
+
`nit sign --login <domain>` does two things automatically:
|
|
130
|
+
1. Switches to the domain's branch (creates it if it doesn't exist)
|
|
131
|
+
2. Generates the signed login payload
|
|
88
132
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Your card can store skills as **pointers** — just `{ "id": "skill-name" }` — resolved from SKILL.md files at commit time. SKILL.md is the single source of truth when present.
|
|
92
|
-
|
|
93
|
-
nit auto-discovers your skills directory from all major agent frameworks:
|
|
94
|
-
|
|
95
|
-
- `.claude/skills/` — Claude Code
|
|
96
|
-
- `.cursor/skills/` — Cursor
|
|
97
|
-
- `.windsurf/skills/` — Windsurf
|
|
98
|
-
- `.codex/skills/` — OpenAI Codex
|
|
99
|
-
- `.openclaw/workspace/skills/` — OpenClaw
|
|
100
|
-
|
|
101
|
-
The discovered path is stored in `.nit/config`. When `nit sign --login <domain>` creates a new branch, it auto-creates a SKILL.md template and adds a pointer to the card. The committed card always contains fully resolved, self-contained skill data.
|
|
133
|
+
The domain is baked into the signature — a signature for `faam.io` is mathematically invalid for `discord.com`.
|
|
102
134
|
|
|
103
135
|
### Remote Protocol
|
|
104
136
|
|
|
105
137
|
The main branch is public. Non-main branches require signed-challenge authentication:
|
|
106
138
|
|
|
107
139
|
```
|
|
108
|
-
GET /.well-known/agent-card.json
|
|
109
|
-
GET /.well-known/agent-card.json?branch=faam.io
|
|
110
|
-
GET ... + X-Nit-Signature + X-Nit-Challenge
|
|
140
|
+
GET /.well-known/agent-card.json → main card (public)
|
|
141
|
+
GET /.well-known/agent-card.json?branch=faam.io → 401 { challenge }
|
|
142
|
+
GET ... + X-Nit-Signature + X-Nit-Challenge → branch card
|
|
111
143
|
```
|
|
112
144
|
|
|
113
|
-
nit is the client. Any server can implement the protocol. [newtype-ai.org](https://newtype-ai.org) is the recommended free hosting
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
nit remote set-url origin https://my-server.com
|
|
117
|
-
```
|
|
145
|
+
nit is the client. Any server can implement the protocol. [newtype-ai.org](https://newtype-ai.org) is the recommended free hosting, but you can point to any compatible server.
|
|
118
146
|
|
|
119
147
|
## Directory Structure
|
|
120
148
|
|
|
@@ -157,13 +185,6 @@ const addresses = await getWalletAddresses('/path/to/.nit');
|
|
|
157
185
|
// → { solana: "C54kvW3...", ethereum: "0x2317..." }
|
|
158
186
|
```
|
|
159
187
|
|
|
160
|
-
## Design Principles
|
|
161
|
-
|
|
162
|
-
- **Zero runtime dependencies** — uses only Node.js builtins
|
|
163
|
-
- **nit is neutral** — knows nothing about any specific platform
|
|
164
|
-
- **Agent card is the identity** — the keypair proves "I am this agent"
|
|
165
|
-
- **Like git, not GitHub** — nit is the tool, newtype-ai.org is a hosting service
|
|
166
|
-
|
|
167
188
|
## License
|
|
168
189
|
|
|
169
190
|
MIT
|
|
@@ -320,11 +320,11 @@ import { promises as fs4 } from "fs";
|
|
|
320
320
|
import { join as join4, resolve } from "path";
|
|
321
321
|
import { homedir } from "os";
|
|
322
322
|
var FRAMEWORK_MARKERS = [
|
|
323
|
-
{ marker: ".claude", skillsPath: ".claude/skills" },
|
|
324
|
-
{ marker: ".cursor", skillsPath: ".cursor/skills" },
|
|
325
|
-
{ marker: ".codex", skillsPath: ".codex/skills" },
|
|
326
|
-
{ marker: ".windsurf", skillsPath: ".windsurf/skills" },
|
|
327
|
-
{ marker: ".openclaw", skillsPath: ".openclaw/workspace/skills" }
|
|
323
|
+
{ marker: ".claude", skillsPath: ".claude/skills", innerSkillsPath: "skills" },
|
|
324
|
+
{ marker: ".cursor", skillsPath: ".cursor/skills", innerSkillsPath: "skills" },
|
|
325
|
+
{ marker: ".codex", skillsPath: ".codex/skills", innerSkillsPath: "skills" },
|
|
326
|
+
{ marker: ".windsurf", skillsPath: ".windsurf/skills", innerSkillsPath: "skills" },
|
|
327
|
+
{ marker: ".openclaw", skillsPath: ".openclaw/workspace/skills", innerSkillsPath: ".agent/skills" }
|
|
328
328
|
];
|
|
329
329
|
var GLOBAL_SKILLS_DIRS = [
|
|
330
330
|
{ marker: ".claude", skillsPath: ".claude/skills" },
|
|
@@ -334,9 +334,9 @@ var GLOBAL_SKILLS_DIRS = [
|
|
|
334
334
|
async function discoverSkillsDir(projectDir2) {
|
|
335
335
|
const absProject = resolve(projectDir2);
|
|
336
336
|
const home = homedir();
|
|
337
|
-
for (const { marker,
|
|
337
|
+
for (const { marker, innerSkillsPath } of FRAMEWORK_MARKERS) {
|
|
338
338
|
if (absProject.includes(`/${marker}/`) || absProject.includes(`/${marker}`)) {
|
|
339
|
-
return join4(absProject,
|
|
339
|
+
return join4(absProject, innerSkillsPath);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
for (const { marker, skillsPath } of FRAMEWORK_MARKERS) {
|
|
@@ -435,6 +435,8 @@ async function discoverSkills(projectDir2) {
|
|
|
435
435
|
join4(projectDir2, ".cursor", "skills"),
|
|
436
436
|
join4(projectDir2, ".windsurf", "skills"),
|
|
437
437
|
join4(projectDir2, ".codex", "skills"),
|
|
438
|
+
join4(projectDir2, ".agent", "skills"),
|
|
439
|
+
// OpenClaw
|
|
438
440
|
join4(projectDir2, ".agents", "skills"),
|
|
439
441
|
// User-global
|
|
440
442
|
join4(home, ".claude", "skills"),
|
package/dist/cli.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
remoteSetUrl,
|
|
16
16
|
sign,
|
|
17
17
|
status
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7LNGTHKO.js";
|
|
19
19
|
|
|
20
20
|
// src/update-check.ts
|
|
21
21
|
import { execSync } from "child_process";
|
|
@@ -28,7 +28,7 @@ var FETCH_TIMEOUT_MS = 3e3;
|
|
|
28
28
|
var REGISTRY_URL = "https://registry.npmjs.org/@newtype-ai/nit/latest";
|
|
29
29
|
function getCurrentVersion() {
|
|
30
30
|
try {
|
|
31
|
-
return "0.4.
|
|
31
|
+
return "0.4.8";
|
|
32
32
|
} catch {
|
|
33
33
|
return "0.0.0";
|
|
34
34
|
}
|
package/dist/index.js
CHANGED