@askdkc/kiokuko 0.1.14 → 0.1.15
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.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +6 -6
- package/README.zh-CN.md +1 -1
- package/dist/setup/client-detection.d.ts +1 -1
- package/dist/setup/client-detection.d.ts.map +1 -1
- package/dist/setup/client-detection.js +3 -34
- package/dist/setup/client-detection.js.map +1 -1
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install --global @askdkc/kiokuko
|
|
|
13
13
|
kiokuko setup
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
`PATH`上に`hermes`実行ファイルが検出された場合、引数なしの`setup`は有効なHermesプロファイルだけを設定し、Kiokukoデータベースを初期化して同梱標準スキルを配置します。利用できる場合は`hermes config path`で現在のプロファイルを取得し、利用できない場合は有効な`active_profile`または既定の`$HOME/.hermes`を使います。`hermes`実行ファイルがない場合、引数なしのコマンドは対応する全クライアントを設定します。`--clients`を明示した場合は、常にその指定が優先されます。
|
|
17
17
|
|
|
18
18
|
npmパッケージ名は`@askdkc/kiokuko`ですが、インストールされるCLIコマンド名は引き続き`kiokuko`です。
|
|
19
19
|
|
package/README.ko.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install --global @askdkc/kiokuko
|
|
|
13
13
|
kiokuko setup
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
`PATH`에서 `hermes` 실행 파일이 감지되면 인자 없는 `setup`은 유효한 Hermes profile만 설정하고 Kiokuko 데이터베이스를 초기화하며 동봉된 표준 skill을 배치합니다. 가능하면 `hermes config path`로 현재 profile을 확인하고, 그렇지 않으면 유효한 `active_profile` marker 또는 기본 `$HOME/.hermes`를 사용합니다. `hermes` 실행 파일이 없으면 인자 없는 명령은 지원되는 모든 클라이언트를 설정합니다. `--clients`를 명시하면 항상 해당 선택이 우선됩니다.
|
|
17
17
|
|
|
18
18
|
npm 패키지 이름은 `@askdkc/kiokuko`이지만 설치되는 CLI 명령 이름은 계속 `kiokuko`입니다.
|
|
19
19
|
|
package/README.md
CHANGED
|
@@ -20,12 +20,12 @@ npm install --global @askdkc/kiokuko
|
|
|
20
20
|
kiokuko setup
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
If
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
If a `hermes` executable is detected in `PATH`, the no-argument command
|
|
24
|
+
configures only the effective Hermes profile, initializes the Kiokuko database,
|
|
25
|
+
and installs the bundled standard skill. When available, Kiokuko asks Hermes
|
|
26
|
+
for the active profile with `hermes config path`; otherwise it uses the valid
|
|
27
|
+
`active_profile` marker or the default `$HOME/.hermes` root. On machines
|
|
28
|
+
without a `hermes` executable, the no-argument command retains the
|
|
29
29
|
all-supported-clients setup. Explicit `--clients` selection always takes
|
|
30
30
|
precedence.
|
|
31
31
|
|
package/README.zh-CN.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install --global @askdkc/kiokuko
|
|
|
13
13
|
kiokuko setup
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
如果在 `PATH` 中检测到 `hermes` 可执行文件,不带参数的 `setup` 会只配置有效的 Hermes profile、初始化 Kiokuko 数据库并放置内置标准技能。可用时,Kiokuko 会通过 `hermes config path` 获取当前 profile;否则使用有效的 `active_profile` 标记或默认的 `$HOME/.hermes`。如果没有 `hermes` 可执行文件,不带参数的命令会配置所有受支持的客户端。显式传入 `--clients` 时始终优先使用该选择。
|
|
17
17
|
|
|
18
18
|
npm 包名是 `@askdkc/kiokuko`,安装后的 CLI 命令名仍然是 `kiokuko`。
|
|
19
19
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PathEnvironment } from '../config/paths.js';
|
|
2
|
-
/** Detect an
|
|
2
|
+
/** Detect an installed Hermes executable without mutating client state. */
|
|
3
3
|
export declare function isHermesAgentInstalled(options?: PathEnvironment): Promise<boolean>;
|
|
4
4
|
//# sourceMappingURL=client-detection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-detection.d.ts","sourceRoot":"","sources":["../../src/setup/client-detection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"client-detection.d.ts","sourceRoot":"","sources":["../../src/setup/client-detection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA8B1D,2EAA2E;AAC3E,wBAAsB,sBAAsB,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAI5F"}
|
|
@@ -1,34 +1,6 @@
|
|
|
1
1
|
import { constants } from 'node:fs';
|
|
2
2
|
import { access, stat } from 'node:fs/promises';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
async function exists(filePath) {
|
|
5
|
-
try {
|
|
6
|
-
await access(filePath);
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
catch {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function hermesRoots(options) {
|
|
14
|
-
const platform = options.platform ?? process.platform;
|
|
15
|
-
const env = options.env ?? process.env;
|
|
16
|
-
const pathModule = platform === 'win32' ? path.win32 : path.posix;
|
|
17
|
-
const roots = new Set();
|
|
18
|
-
if (env.HERMES_HOME)
|
|
19
|
-
roots.add(env.HERMES_HOME);
|
|
20
|
-
const home = platform === 'win32' ? (env.USERPROFILE ?? env.HOME) : env.HOME;
|
|
21
|
-
if (home)
|
|
22
|
-
roots.add(pathModule.join(home, '.hermes'));
|
|
23
|
-
return { platform, roots: [...roots], pathModule };
|
|
24
|
-
}
|
|
25
|
-
async function hasHermesProfileState(root, pathModule) {
|
|
26
|
-
for (const marker of ['config.yaml', 'active_profile', 'profiles']) {
|
|
27
|
-
if (await exists(pathModule.join(root, marker)))
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
4
|
async function hasHermesExecutable(platform, pathModule, env) {
|
|
33
5
|
const pathValue = env.PATH;
|
|
34
6
|
if (!pathValue)
|
|
@@ -54,13 +26,10 @@ async function hasHermesExecutable(platform, pathModule, env) {
|
|
|
54
26
|
}
|
|
55
27
|
return false;
|
|
56
28
|
}
|
|
57
|
-
/** Detect an
|
|
29
|
+
/** Detect an installed Hermes executable without mutating client state. */
|
|
58
30
|
export async function isHermesAgentInstalled(options = {}) {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
if (await hasHermesProfileState(root, pathModule))
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
31
|
+
const platform = options.platform ?? process.platform;
|
|
32
|
+
const pathModule = platform === 'win32' ? path.win32 : path.posix;
|
|
64
33
|
return hasHermesExecutable(platform, pathModule, options.env ?? process.env);
|
|
65
34
|
}
|
|
66
35
|
//# sourceMappingURL=client-detection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-detection.js","sourceRoot":"","sources":["../../src/setup/client-detection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"client-detection.js","sourceRoot":"","sources":["../../src/setup/client-detection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,KAAK,UAAU,mBAAmB,CAChC,QAAyB,EACzB,UAA6B,EAC7B,GAAsB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