monk-pi 0.1.0 → 0.10.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/README.md +85 -6
- package/dist/chunk-37UZNIY3.js +1772 -0
- package/dist/cli.js +6 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +9 -1
- package/package.json +10 -2
- package/dist/chunk-DHF5QVTM.js +0 -812
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
printBanner,
|
|
9
9
|
runCommand,
|
|
10
10
|
statusCommand
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-37UZNIY3.js";
|
|
12
12
|
|
|
13
13
|
// src/cli.ts
|
|
14
14
|
import { Command } from "commander";
|
|
@@ -55,9 +55,13 @@ async function main() {
|
|
|
55
55
|
console.log(` ${pc.cyan('monk-pi --model monk-fast "\u5FEB\u901F\u5BA1\u67E5\u8FD9\u4E2A\u63D0\u4EA4"')}`);
|
|
56
56
|
console.log();
|
|
57
57
|
console.log(` ${pc.dim("# \u6062\u590D\u4E0A\u4E00\u8F6E\u5386\u53F2\u4F1A\u8BDD")}`);
|
|
58
|
-
console.log(` ${pc.cyan("monk-pi --continue")}`);
|
|
58
|
+
console.log(` ${pc.cyan("monk-pi --continue (\u6216 monk-pi continue)")}`);
|
|
59
|
+
console.log();
|
|
60
|
+
console.log(` ${pc.dim("# \u53EF\u89C6\u5316\u6D4F\u89C8\u5E76\u6062\u590D\u4EE5\u5F80\u5386\u53F2\u4EFB\u52A1")}`);
|
|
61
|
+
console.log(` ${pc.cyan("monk-pi -r (\u6216 monk-pi resume)")}`);
|
|
59
62
|
console.log();
|
|
60
63
|
console.log(` ${pc.bold("\u4E13\u5C5E\u7BA1\u7406\u6307\u4EE4:")}`);
|
|
64
|
+
console.log(` ${pc.yellow("monk-pi resume (\u6216 -r)")} \u53EF\u89C6\u5316\u6D4F\u89C8\u5E76\u6062\u590D\u5386\u53F2\u4F1A\u8BDD (\u65AD\u70B9\u7EED\u5199)`);
|
|
61
65
|
console.log(` ${pc.yellow("monk-pi login")} \u914D\u7F6E / \u66F4\u65B0 Monk API Key`);
|
|
62
66
|
console.log(` ${pc.yellow("monk-pi status")} \u68C0\u6D4B API \u5EF6\u8FDF\u3001Key \u72B6\u6001\u4E0E\u8FDE\u901A\u6027`);
|
|
63
67
|
console.log(` ${pc.yellow("monk-pi model [name]")} \u67E5\u770B\u6216\u5207\u6362\u9ED8\u8BA4\u4E3B\u529B\u6A21\u578B`);
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ declare function getMonkConfigFile(): string;
|
|
|
30
30
|
declare function getPiHomeDir(): string;
|
|
31
31
|
declare function getPiModelsFile(): string;
|
|
32
32
|
declare function getPiSettingsFile(): string;
|
|
33
|
+
declare function getPiExtensionsDir(): string;
|
|
34
|
+
declare function getPiMonkExtensionFile(): string;
|
|
33
35
|
|
|
34
36
|
interface MonkLocalConfig {
|
|
35
37
|
apiKey?: string;
|
|
@@ -56,6 +58,15 @@ declare function syncPiModelsJson(apiKey?: string): {
|
|
|
56
58
|
path: string;
|
|
57
59
|
error?: string;
|
|
58
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Safely writes or updates the Monk native extension in ~/.pi/agent/extensions/monk.ts
|
|
63
|
+
*/
|
|
64
|
+
declare function syncPiExtension(force?: boolean): {
|
|
65
|
+
success: boolean;
|
|
66
|
+
path: string;
|
|
67
|
+
updated: boolean;
|
|
68
|
+
error?: string;
|
|
69
|
+
};
|
|
59
70
|
/**
|
|
60
71
|
* Gets the current default model
|
|
61
72
|
*/
|
|
@@ -119,6 +130,7 @@ interface LaunchPiOptions {
|
|
|
119
130
|
*/
|
|
120
131
|
declare function launchPi(options: LaunchPiOptions): number;
|
|
121
132
|
|
|
133
|
+
declare function openBrowser(url: string): boolean;
|
|
122
134
|
declare function printBanner(): void;
|
|
123
135
|
declare function logSuccess(msg: string): void;
|
|
124
136
|
declare function logInfo(msg: string): void;
|
|
@@ -126,7 +138,7 @@ declare function logWarn(msg: string): void;
|
|
|
126
138
|
declare function logError(msg: string): void;
|
|
127
139
|
declare function logStep(step: number, total: number, msg: string): void;
|
|
128
140
|
/**
|
|
129
|
-
* Interactive prompt for API Key
|
|
141
|
+
* Interactive prompt for API Key with one-click browser checkout option
|
|
130
142
|
*/
|
|
131
143
|
declare function promptForApiKey(currentKey?: string): Promise<string>;
|
|
132
144
|
/**
|
|
@@ -149,4 +161,4 @@ declare function doctorCommand(): Promise<void>;
|
|
|
149
161
|
|
|
150
162
|
declare function runCommand(passthroughArgs: string[]): Promise<number>;
|
|
151
163
|
|
|
152
|
-
export { type CompletionTestResult, DEFAULT_MONK_MODEL, type LaunchPiOptions, MONK_ACCOUNT_URL, MONK_BASE_URL, MONK_MODELS, MONK_WEBSITE, type MonkLocalConfig, type MonkModelId, type PiBinaryType, type ResolvedPi, type ValidateResult, detectPackageManager, detectPi, doctorCommand, getDefaultModel, getMonkConfigFile, getMonkHomeDir, getPiHomeDir, getPiModelsFile, getPiSettingsFile, installPi, launchPi, loadMonkConfig, logError, logInfo, logStep, logSuccess, logWarn, loginCommand, maskKey, modelCommand, printBanner, promptForApiKey, promptInstallPi, promptSelectModel, resolveApiKey, resolvePiBinary, runCommand, saveMonkConfig, statusCommand, syncPiModelsJson, testChatCompletion, validateApiKey };
|
|
164
|
+
export { type CompletionTestResult, DEFAULT_MONK_MODEL, type LaunchPiOptions, MONK_ACCOUNT_URL, MONK_BASE_URL, MONK_MODELS, MONK_WEBSITE, type MonkLocalConfig, type MonkModelId, type PiBinaryType, type ResolvedPi, type ValidateResult, detectPackageManager, detectPi, doctorCommand, getDefaultModel, getMonkConfigFile, getMonkHomeDir, getPiExtensionsDir, getPiHomeDir, getPiModelsFile, getPiMonkExtensionFile, getPiSettingsFile, installPi, launchPi, loadMonkConfig, logError, logInfo, logStep, logSuccess, logWarn, loginCommand, maskKey, modelCommand, openBrowser, printBanner, promptForApiKey, promptInstallPi, promptSelectModel, resolveApiKey, resolvePiBinary, runCommand, saveMonkConfig, statusCommand, syncPiExtension, syncPiModelsJson, testChatCompletion, validateApiKey };
|
package/dist/index.js
CHANGED
|
@@ -10,8 +10,10 @@ import {
|
|
|
10
10
|
getDefaultModel,
|
|
11
11
|
getMonkConfigFile,
|
|
12
12
|
getMonkHomeDir,
|
|
13
|
+
getPiExtensionsDir,
|
|
13
14
|
getPiHomeDir,
|
|
14
15
|
getPiModelsFile,
|
|
16
|
+
getPiMonkExtensionFile,
|
|
15
17
|
getPiSettingsFile,
|
|
16
18
|
installPi,
|
|
17
19
|
launchPi,
|
|
@@ -24,6 +26,7 @@ import {
|
|
|
24
26
|
loginCommand,
|
|
25
27
|
maskKey,
|
|
26
28
|
modelCommand,
|
|
29
|
+
openBrowser,
|
|
27
30
|
printBanner,
|
|
28
31
|
promptForApiKey,
|
|
29
32
|
promptInstallPi,
|
|
@@ -33,10 +36,11 @@ import {
|
|
|
33
36
|
runCommand,
|
|
34
37
|
saveMonkConfig,
|
|
35
38
|
statusCommand,
|
|
39
|
+
syncPiExtension,
|
|
36
40
|
syncPiModelsJson,
|
|
37
41
|
testChatCompletion,
|
|
38
42
|
validateApiKey
|
|
39
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-37UZNIY3.js";
|
|
40
44
|
export {
|
|
41
45
|
DEFAULT_MONK_MODEL,
|
|
42
46
|
MONK_ACCOUNT_URL,
|
|
@@ -49,8 +53,10 @@ export {
|
|
|
49
53
|
getDefaultModel,
|
|
50
54
|
getMonkConfigFile,
|
|
51
55
|
getMonkHomeDir,
|
|
56
|
+
getPiExtensionsDir,
|
|
52
57
|
getPiHomeDir,
|
|
53
58
|
getPiModelsFile,
|
|
59
|
+
getPiMonkExtensionFile,
|
|
54
60
|
getPiSettingsFile,
|
|
55
61
|
installPi,
|
|
56
62
|
launchPi,
|
|
@@ -63,6 +69,7 @@ export {
|
|
|
63
69
|
loginCommand,
|
|
64
70
|
maskKey,
|
|
65
71
|
modelCommand,
|
|
72
|
+
openBrowser,
|
|
66
73
|
printBanner,
|
|
67
74
|
promptForApiKey,
|
|
68
75
|
promptInstallPi,
|
|
@@ -72,6 +79,7 @@ export {
|
|
|
72
79
|
runCommand,
|
|
73
80
|
saveMonkConfig,
|
|
74
81
|
statusCommand,
|
|
82
|
+
syncPiExtension,
|
|
75
83
|
syncPiModelsJson,
|
|
76
84
|
testChatCompletion,
|
|
77
85
|
validateApiKey
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monk-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Zero-config harness for running Pi Coding Agent with Monk API (monk.party)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/cli.js",
|
|
@@ -25,7 +25,15 @@
|
|
|
25
25
|
"harness",
|
|
26
26
|
"cli"
|
|
27
27
|
],
|
|
28
|
-
"author": "",
|
|
28
|
+
"author": "yaoleifly",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/yaoleifly/monk-pi.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/yaoleifly/monk-pi#readme",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/yaoleifly/monk-pi/issues"
|
|
36
|
+
},
|
|
29
37
|
"license": "MIT",
|
|
30
38
|
"engines": {
|
|
31
39
|
"node": ">=18.0.0"
|