@newtype-ai/nit 0.4.17 → 0.4.18
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/dist/{chunk-3XE36C3X.js → chunk-MZBUNLHW.js} +8 -16
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -125,7 +125,7 @@ async function resolveHead(nitDir) {
|
|
|
125
125
|
return (await fs2.readFile(refPath, "utf-8")).trim();
|
|
126
126
|
} catch {
|
|
127
127
|
throw new Error(
|
|
128
|
-
`Branch ref ${head.ref} does not exist.
|
|
128
|
+
`Branch ref ${head.ref} does not exist. Workspace may be empty.`
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -3270,22 +3270,14 @@ var NIT_DIR = ".nit";
|
|
|
3270
3270
|
var CARD_FILE = "agent-card.json";
|
|
3271
3271
|
var DEFAULT_API_BASE = "https://api.newtype-ai.org";
|
|
3272
3272
|
function findNitDir(startDir) {
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
} catch {
|
|
3280
|
-
}
|
|
3281
|
-
const parent = resolve2(dir, "..");
|
|
3282
|
-
if (parent === dir) {
|
|
3283
|
-
throw new Error(
|
|
3284
|
-
"Not a nit repository (or any parent directory). Run `nit init` first."
|
|
3285
|
-
);
|
|
3286
|
-
}
|
|
3287
|
-
dir = parent;
|
|
3273
|
+
const dir = resolve2(startDir || process.cwd());
|
|
3274
|
+
const candidate = join5(dir, NIT_DIR);
|
|
3275
|
+
try {
|
|
3276
|
+
const s = statSync(candidate);
|
|
3277
|
+
if (s.isDirectory()) return candidate;
|
|
3278
|
+
} catch {
|
|
3288
3279
|
}
|
|
3280
|
+
throw new Error("Not a nit workspace. Run `nit init` first.");
|
|
3289
3281
|
}
|
|
3290
3282
|
function projectDir(nitDir) {
|
|
3291
3283
|
return resolve2(nitDir, "..");
|
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
sign,
|
|
26
26
|
signTx,
|
|
27
27
|
status
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MZBUNLHW.js";
|
|
29
29
|
import "./chunk-M6SR6QMR.js";
|
|
30
30
|
import "./chunk-4HRQSCNQ.js";
|
|
31
31
|
|
|
@@ -40,7 +40,7 @@ var FETCH_TIMEOUT_MS = 3e3;
|
|
|
40
40
|
var REGISTRY_URL = "https://registry.npmjs.org/@newtype-ai/nit/latest";
|
|
41
41
|
function getCurrentVersion() {
|
|
42
42
|
try {
|
|
43
|
-
return "0.4.
|
|
43
|
+
return "0.4.18";
|
|
44
44
|
} catch {
|
|
45
45
|
return "0.0.0";
|
|
46
46
|
}
|
|
@@ -210,7 +210,7 @@ async function main() {
|
|
|
210
210
|
}
|
|
211
211
|
async function cmdInit() {
|
|
212
212
|
const result = await init();
|
|
213
|
-
console.log(bold("Initialized nit
|
|
213
|
+
console.log(bold("Initialized nit workspace"));
|
|
214
214
|
console.log();
|
|
215
215
|
console.log(` Agent ID: ${green(result.agentId)}`);
|
|
216
216
|
console.log(` Public key: ${dim(result.publicKey)}`);
|
package/dist/index.d.ts
CHANGED
|
@@ -288,8 +288,8 @@ declare function signEvmHash(nitDir: string, hash: Uint8Array): Promise<{
|
|
|
288
288
|
declare function signSolanaBytes(nitDir: string, message: Uint8Array): Promise<Uint8Array>;
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
|
-
*
|
|
292
|
-
*
|
|
291
|
+
* Find .nit/ in the given directory (or cwd).
|
|
292
|
+
* Identity is explicit — no upward directory walking.
|
|
293
293
|
*/
|
|
294
294
|
declare function findNitDir(startDir?: string): string;
|
|
295
295
|
interface InitResult {
|
|
@@ -302,7 +302,7 @@ interface InitResult {
|
|
|
302
302
|
nitSkillPath: string;
|
|
303
303
|
}
|
|
304
304
|
/**
|
|
305
|
-
* Initialize a new nit
|
|
305
|
+
* Initialize a new nit workspace in the project directory.
|
|
306
306
|
*
|
|
307
307
|
* 1. Create .nit/ directory structure
|
|
308
308
|
* 2. Generate Ed25519 keypair
|
package/dist/index.js
CHANGED