@newtype-ai/nit 0.2.4 → 0.2.5

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 (2) hide show
  1. package/README.md +15 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -57,7 +57,7 @@ nit push --all
57
57
  | `nit checkout <branch>` | Switch branch (overwrites agent-card.json) |
58
58
  | `nit push [--all]` | Push branch(es) to remote |
59
59
  | `nit sign "msg"` | Sign a message with your Ed25519 key |
60
- | `nit sign --login <domain>` | Generate login payload for an app |
60
+ | `nit sign --login <domain>` | Auto-switch to domain branch + generate login payload |
61
61
  | `nit remote` | Show remote URL and credential status |
62
62
  | `nit remote add <name> <url>` | Add a new remote |
63
63
  | `nit remote set-url <name> <url>` | Change a remote's URL |
@@ -84,7 +84,9 @@ Each branch is a different agent card for a different platform. Branch name = ro
84
84
 
85
85
  ### Skill Resolution
86
86
 
87
- At commit time, nit discovers SKILL.md files from all major agent frameworks:
87
+ 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.
88
+
89
+ nit auto-discovers your skills directory from all major agent frameworks:
88
90
 
89
91
  - `.claude/skills/` — Claude Code
90
92
  - `.cursor/skills/` — Cursor
@@ -92,7 +94,7 @@ At commit time, nit discovers SKILL.md files from all major agent frameworks:
92
94
  - `.codex/skills/` — OpenAI Codex
93
95
  - `.agents/skills/` — Generic
94
96
 
95
- Skills referenced in your card are resolved against these files, and the committed card contains a self-contained snapshot.
97
+ 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.
96
98
 
97
99
  ### Remote Protocol
98
100
 
@@ -116,10 +118,11 @@ nit remote set-url origin https://my-server.com
116
118
  your-project/
117
119
  ├── .nit/ # nit repository (gitignored)
118
120
  │ ├── HEAD # Current branch ref
119
- │ ├── config # Remote URL and credentials
121
+ │ ├── config # Remote URL, credentials, skills directory
120
122
  │ ├── identity/
121
123
  │ │ ├── agent.pub # Ed25519 public key
122
- │ │ └── agent.key # Ed25519 private key (0600)
124
+ │ │ ├── agent.key # Ed25519 private key (0600)
125
+ │ │ └── agent-id # UUIDv5 derived from public key
123
126
  │ ├── objects/ # Content-addressable store
124
127
  │ └── refs/heads/ # Branch pointers
125
128
  ├── agent-card.json # Working copy (changes with checkout)
@@ -129,12 +132,15 @@ your-project/
129
132
  ## Programmatic API
130
133
 
131
134
  ```typescript
132
- import { init, commit, checkout, branch, push, status } from '@newtype-ai/nit';
135
+ import { init, commit, checkout, branch, push, status, sign, loginPayload } from '@newtype-ai/nit';
133
136
 
134
137
  await init();
135
- await branch('faam.io');
136
- await checkout('faam.io');
137
- // modify agent-card.json...
138
+
139
+ // Log into an app (auto-creates and switches to domain branch)
140
+ const payload = await loginPayload('faam.io');
141
+ // → { agent_id, domain, timestamp, signature, switchedBranch, createdSkill }
142
+
143
+ // Customize card, then commit & push
138
144
  await commit('FAAM config');
139
145
  await push({ all: true });
140
146
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtype-ai/nit",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Version control for agent cards",
5
5
  "type": "module",
6
6
  "bin": {