@agentic-kit/cli 0.16.4 → 0.17.0
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/config.d.ts +0 -6
- package/config.js +0 -42
- package/esm/config.d.ts +0 -6
- package/esm/config.js +0 -41
- package/package.json +4 -4
package/config.d.ts
CHANGED
|
@@ -38,12 +38,6 @@ interface ManifestFile {
|
|
|
38
38
|
manifest?: SkillsManifest;
|
|
39
39
|
}
|
|
40
40
|
export declare function defaultManifest(): SkillsManifest;
|
|
41
|
-
/**
|
|
42
|
-
* Move a pre-shared-store sign-in (`agent/account.json` +
|
|
43
|
-
* `agent/backend-config.json`) into the store, once. The originals are renamed
|
|
44
|
-
* rather than deleted, so a downgrade still finds them.
|
|
45
|
-
*/
|
|
46
|
-
export declare function importLegacyAgentFiles(store: ConfigStore, legacyDir: string): void;
|
|
47
41
|
export declare function loadConfig(baseDir?: string): AgentCliConfig;
|
|
48
42
|
export declare function saveManifestFile(config: AgentCliConfig, file: ManifestFile): void;
|
|
49
43
|
export {};
|
package/config.js
CHANGED
|
@@ -35,15 +35,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.OVERLAY_LAYER = exports.BASE_LAYER = exports.DEFAULT_SKILLS_PIN = exports.TOOL_NAME = exports.STASH_NAME = exports.DEFAULT_SKILLS_REPO = void 0;
|
|
37
37
|
exports.defaultManifest = defaultManifest;
|
|
38
|
-
exports.importLegacyAgentFiles = importLegacyAgentFiles;
|
|
39
38
|
exports.loadConfig = loadConfig;
|
|
40
39
|
exports.saveManifestFile = saveManifestFile;
|
|
41
40
|
const harness_1 = require("@agentic-kit/harness");
|
|
42
41
|
const appstash_1 = require("appstash");
|
|
43
42
|
const fs = __importStar(require("fs"));
|
|
44
43
|
const path = __importStar(require("path"));
|
|
45
|
-
const account_store_1 = require("./account-store");
|
|
46
|
-
const backend_store_1 = require("./backend-store");
|
|
47
44
|
exports.DEFAULT_SKILLS_REPO = 'constructive-io/constructive-skills';
|
|
48
45
|
/**
|
|
49
46
|
* Directory identity shared with the csdk CLI and the desktop app, so a sign-in
|
|
@@ -61,44 +58,6 @@ function defaultManifest() {
|
|
|
61
58
|
sources: [{ name: exports.BASE_LAYER }, { name: exports.OVERLAY_LAYER }]
|
|
62
59
|
};
|
|
63
60
|
}
|
|
64
|
-
function readLegacyFile(file) {
|
|
65
|
-
if (!fs.existsSync(file))
|
|
66
|
-
return null;
|
|
67
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Move a pre-shared-store sign-in (`agent/account.json` +
|
|
71
|
-
* `agent/backend-config.json`) into the store, once. The originals are renamed
|
|
72
|
-
* rather than deleted, so a downgrade still finds them.
|
|
73
|
-
*/
|
|
74
|
-
function importLegacyAgentFiles(store, legacyDir) {
|
|
75
|
-
const accountFile = path.join(legacyDir, 'account.json');
|
|
76
|
-
const backendFile = path.join(legacyDir, 'backend-config.json');
|
|
77
|
-
if (!fs.existsSync(accountFile) && !fs.existsSync(backendFile))
|
|
78
|
-
return;
|
|
79
|
-
const backend = readLegacyFile(backendFile);
|
|
80
|
-
if (backend?.apiEndpoint && backend.authEndpoint && backend.modulesEndpoint) {
|
|
81
|
-
(0, backend_store_1.saveBackendConfig)(store, backend);
|
|
82
|
-
}
|
|
83
|
-
const legacy = readLegacyFile(accountFile);
|
|
84
|
-
if (legacy?.token && legacy.userId) {
|
|
85
|
-
const session = {
|
|
86
|
-
userId: legacy.userId,
|
|
87
|
-
email: legacy.email ?? '',
|
|
88
|
-
accessToken: legacy.token,
|
|
89
|
-
accessTokenExpiresAt: legacy.accessTokenExpiresAt,
|
|
90
|
-
apiKey: legacy.apiKey,
|
|
91
|
-
keyId: legacy.keyId,
|
|
92
|
-
apiKeyExpiresAt: legacy.apiKeyExpiresAt,
|
|
93
|
-
signedInAt: legacy.signedInAt ?? Date.now()
|
|
94
|
-
};
|
|
95
|
-
(0, account_store_1.saveSession)(store, session);
|
|
96
|
-
}
|
|
97
|
-
for (const file of [accountFile, backendFile]) {
|
|
98
|
-
if (fs.existsSync(file))
|
|
99
|
-
fs.renameSync(file, `${file}.migrated`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
61
|
function loadConfig(baseDir) {
|
|
103
62
|
const dirs = (0, harness_1.harnessDirs)('constructive', baseDir);
|
|
104
63
|
const agentDir = path.join(dirs.stash.data, 'agent');
|
|
@@ -107,7 +66,6 @@ function loadConfig(baseDir) {
|
|
|
107
66
|
const store = (0, appstash_1.createConfigStore)(exports.TOOL_NAME, { stashName: exports.STASH_NAME, baseDir });
|
|
108
67
|
fs.mkdirSync(agentDir, { recursive: true });
|
|
109
68
|
fs.mkdirSync(overlayDir, { recursive: true });
|
|
110
|
-
importLegacyAgentFiles(store, path.join(dirs.stash.config, 'agent'));
|
|
111
69
|
let file = {};
|
|
112
70
|
if (fs.existsSync(manifestFile)) {
|
|
113
71
|
file = JSON.parse(fs.readFileSync(manifestFile, 'utf8'));
|
package/esm/config.d.ts
CHANGED
|
@@ -38,12 +38,6 @@ interface ManifestFile {
|
|
|
38
38
|
manifest?: SkillsManifest;
|
|
39
39
|
}
|
|
40
40
|
export declare function defaultManifest(): SkillsManifest;
|
|
41
|
-
/**
|
|
42
|
-
* Move a pre-shared-store sign-in (`agent/account.json` +
|
|
43
|
-
* `agent/backend-config.json`) into the store, once. The originals are renamed
|
|
44
|
-
* rather than deleted, so a downgrade still finds them.
|
|
45
|
-
*/
|
|
46
|
-
export declare function importLegacyAgentFiles(store: ConfigStore, legacyDir: string): void;
|
|
47
41
|
export declare function loadConfig(baseDir?: string): AgentCliConfig;
|
|
48
42
|
export declare function saveManifestFile(config: AgentCliConfig, file: ManifestFile): void;
|
|
49
43
|
export {};
|
package/esm/config.js
CHANGED
|
@@ -2,8 +2,6 @@ import { harnessDirs } from '@agentic-kit/harness';
|
|
|
2
2
|
import { createConfigStore } from 'appstash';
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as path from 'path';
|
|
5
|
-
import { saveSession } from './account-store';
|
|
6
|
-
import { saveBackendConfig } from './backend-store';
|
|
7
5
|
export const DEFAULT_SKILLS_REPO = 'constructive-io/constructive-skills';
|
|
8
6
|
/**
|
|
9
7
|
* Directory identity shared with the csdk CLI and the desktop app, so a sign-in
|
|
@@ -21,44 +19,6 @@ export function defaultManifest() {
|
|
|
21
19
|
sources: [{ name: BASE_LAYER }, { name: OVERLAY_LAYER }]
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
function readLegacyFile(file) {
|
|
25
|
-
if (!fs.existsSync(file))
|
|
26
|
-
return null;
|
|
27
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Move a pre-shared-store sign-in (`agent/account.json` +
|
|
31
|
-
* `agent/backend-config.json`) into the store, once. The originals are renamed
|
|
32
|
-
* rather than deleted, so a downgrade still finds them.
|
|
33
|
-
*/
|
|
34
|
-
export function importLegacyAgentFiles(store, legacyDir) {
|
|
35
|
-
const accountFile = path.join(legacyDir, 'account.json');
|
|
36
|
-
const backendFile = path.join(legacyDir, 'backend-config.json');
|
|
37
|
-
if (!fs.existsSync(accountFile) && !fs.existsSync(backendFile))
|
|
38
|
-
return;
|
|
39
|
-
const backend = readLegacyFile(backendFile);
|
|
40
|
-
if (backend?.apiEndpoint && backend.authEndpoint && backend.modulesEndpoint) {
|
|
41
|
-
saveBackendConfig(store, backend);
|
|
42
|
-
}
|
|
43
|
-
const legacy = readLegacyFile(accountFile);
|
|
44
|
-
if (legacy?.token && legacy.userId) {
|
|
45
|
-
const session = {
|
|
46
|
-
userId: legacy.userId,
|
|
47
|
-
email: legacy.email ?? '',
|
|
48
|
-
accessToken: legacy.token,
|
|
49
|
-
accessTokenExpiresAt: legacy.accessTokenExpiresAt,
|
|
50
|
-
apiKey: legacy.apiKey,
|
|
51
|
-
keyId: legacy.keyId,
|
|
52
|
-
apiKeyExpiresAt: legacy.apiKeyExpiresAt,
|
|
53
|
-
signedInAt: legacy.signedInAt ?? Date.now()
|
|
54
|
-
};
|
|
55
|
-
saveSession(store, session);
|
|
56
|
-
}
|
|
57
|
-
for (const file of [accountFile, backendFile]) {
|
|
58
|
-
if (fs.existsSync(file))
|
|
59
|
-
fs.renameSync(file, `${file}.migrated`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
22
|
export function loadConfig(baseDir) {
|
|
63
23
|
const dirs = harnessDirs('constructive', baseDir);
|
|
64
24
|
const agentDir = path.join(dirs.stash.data, 'agent');
|
|
@@ -67,7 +27,6 @@ export function loadConfig(baseDir) {
|
|
|
67
27
|
const store = createConfigStore(TOOL_NAME, { stashName: STASH_NAME, baseDir });
|
|
68
28
|
fs.mkdirSync(agentDir, { recursive: true });
|
|
69
29
|
fs.mkdirSync(overlayDir, { recursive: true });
|
|
70
|
-
importLegacyAgentFiles(store, path.join(dirs.stash.config, 'agent'));
|
|
71
30
|
let file = {};
|
|
72
31
|
if (fs.existsSync(manifestFile)) {
|
|
73
32
|
file = JSON.parse(fs.readFileSync(manifestFile, 'utf8'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-kit/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "agent — the pi coding agent with the Constructive harness baked in, purely a shell",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@agentic-kit/harness": "0.16.0",
|
|
36
|
-
"@agentic-kit/pi": "0.25.
|
|
37
|
-
"@constructive-io/sdk": "^1.19.
|
|
36
|
+
"@agentic-kit/pi": "0.25.5",
|
|
37
|
+
"@constructive-io/sdk": "^1.19.5",
|
|
38
38
|
"@earendil-works/pi-coding-agent": "0.79.6",
|
|
39
39
|
"appstash": "^0.8.0",
|
|
40
40
|
"inquirerer": "^4.9.4"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"pi",
|
|
46
46
|
"harness"
|
|
47
47
|
],
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "34e91da5b3dd9c0cae14875afe609993acf53a84"
|
|
49
49
|
}
|