@tyrese_guo_peng/recastflow 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/THIRD_PARTY_NOTICES.md +30 -0
- package/dist/global-install.d.ts +96 -0
- package/dist/global-install.js +561 -0
- package/dist/global-install.js.map +1 -0
- package/dist/global-runtime.d.ts +14 -0
- package/dist/global-runtime.js +405 -0
- package/dist/global-runtime.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +486 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +19 -0
- package/dist/init.js +46 -0
- package/dist/init.js.map +1 -0
- package/dist/observe.d.ts +44 -0
- package/dist/observe.js +49 -0
- package/dist/observe.js.map +1 -0
- package/dist/open-browser.d.ts +2 -0
- package/dist/open-browser.js +16 -0
- package/dist/open-browser.js.map +1 -0
- package/dist/postinstall.d.ts +1 -0
- package/dist/postinstall.js +19 -0
- package/dist/postinstall.js.map +1 -0
- package/dist/projects.d.ts +7 -0
- package/dist/projects.js +8 -0
- package/dist/projects.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -0
- package/package.json +41 -3
- package/scripts/postinstall.mjs +11 -0
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TyresePeng
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
- The strict skill guidance in `packages/adapters/src/bootstrap.ts` adapts wording
|
|
4
|
+
from [Superpowers’ `using-superpowers` skill](https://github.com/obra/superpowers/blob/main/skills/using-superpowers/SKILL.md).
|
|
5
|
+
Copyright (c) 2025 Jesse Vincent.
|
|
6
|
+
- The hook signature examples in `docs/superpowers/spikes/2026-11-18-hooks-spike.md`
|
|
7
|
+
are summarized from the [OpenCode plugin types](https://github.com/anomalyco/opencode/tree/dev/packages/plugin).
|
|
8
|
+
Copyright (c) 2025 opencode.
|
|
9
|
+
|
|
10
|
+
The following MIT license applies to the material identified above:
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { CliId } from '@tyrese_guo_peng/recastflow-core';
|
|
2
|
+
export declare const LAUNCH_AGENT_LABEL = "com.caesarflow.service";
|
|
3
|
+
export declare const WIN_AUTOSTART_FILENAME = "caesarflow-service.vbs";
|
|
4
|
+
/**
|
|
5
|
+
* macOS 登录自启 LaunchAgent:登录即起(RunAtLoad)、崩溃即拉(KeepAlive),
|
|
6
|
+
* 服务日志重定向到 dataRoot/logs。仅 darwin;node 路径取 bind 时固化值,
|
|
7
|
+
* 与 recorder 唤起使用同一 install.json.nodePath,重启后无需宿主进程在场。
|
|
8
|
+
*/
|
|
9
|
+
export declare function launchAgentPlist(paths: {
|
|
10
|
+
nodePath: string;
|
|
11
|
+
service: string;
|
|
12
|
+
dataRoot: string;
|
|
13
|
+
log: string;
|
|
14
|
+
}): string;
|
|
15
|
+
/**
|
|
16
|
+
* Windows 登录自启:启动文件夹 VBS 隐藏守护。登录即起(Startup 文件夹语义)、
|
|
17
|
+
* 服务退出自动重拉(崩溃 3s / 正常退出 30s 慢轮询——正常退出多为已有健康实例
|
|
18
|
+
* 去重,慢轮询避免空转);service.mjs 文件消失(unbind)时守护自尽。
|
|
19
|
+
* node 路径取 bind 时固化值,与 recorder 唤起同源。无需管理员权限。
|
|
20
|
+
*/
|
|
21
|
+
export declare function windowsAutostartVbs(paths: {
|
|
22
|
+
nodePath: string;
|
|
23
|
+
service: string;
|
|
24
|
+
dataRoot: string;
|
|
25
|
+
}): string;
|
|
26
|
+
export type GlobalPaths = {
|
|
27
|
+
homeDir: string;
|
|
28
|
+
dataRoot: string;
|
|
29
|
+
claudeSettings: string;
|
|
30
|
+
opencodePlugin: string;
|
|
31
|
+
opencodeAgents: string;
|
|
32
|
+
recorder: string;
|
|
33
|
+
bootstrap: string;
|
|
34
|
+
service: string;
|
|
35
|
+
installManifest: string;
|
|
36
|
+
config: string;
|
|
37
|
+
runtime: string;
|
|
38
|
+
launchAgent: string;
|
|
39
|
+
winAutostart: string;
|
|
40
|
+
serviceLog: string;
|
|
41
|
+
};
|
|
42
|
+
export type GlobalConfig = {
|
|
43
|
+
version: 1;
|
|
44
|
+
enabledTargets: CliId[];
|
|
45
|
+
exclude: string[];
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
};
|
|
48
|
+
export type BindOptions = {
|
|
49
|
+
homeDir?: string;
|
|
50
|
+
dataRoot?: string;
|
|
51
|
+
targets?: CliId[];
|
|
52
|
+
serverEntry?: string;
|
|
53
|
+
version?: string;
|
|
54
|
+
preserveConfig?: boolean;
|
|
55
|
+
/** 测试隔离注入:darwin 才安装 LaunchAgent;缺省取当前平台。 */
|
|
56
|
+
platform?: NodeJS.Platform;
|
|
57
|
+
/** launchctl 注入(darwin 自启):测试用 recorder 隔离真实 launchd。 */
|
|
58
|
+
launchctl?: LaunchctlRunner;
|
|
59
|
+
};
|
|
60
|
+
export type LaunchctlResult = {
|
|
61
|
+
status: number;
|
|
62
|
+
stderr?: string;
|
|
63
|
+
};
|
|
64
|
+
export type LaunchctlRunner = (args: string[]) => LaunchctlResult;
|
|
65
|
+
export type BindResult = {
|
|
66
|
+
paths: GlobalPaths;
|
|
67
|
+
targets: CliId[];
|
|
68
|
+
changed: string[];
|
|
69
|
+
backupDir?: string;
|
|
70
|
+
};
|
|
71
|
+
export type DoctorCheck = {
|
|
72
|
+
name: string;
|
|
73
|
+
ok: boolean;
|
|
74
|
+
detail: string;
|
|
75
|
+
};
|
|
76
|
+
export declare function globalPaths(options?: {
|
|
77
|
+
homeDir?: string;
|
|
78
|
+
dataRoot?: string;
|
|
79
|
+
}): GlobalPaths;
|
|
80
|
+
/**
|
|
81
|
+
* 严格合并 Claude 用户设置;任何受影响的既有形状异常都在写入前抛错。
|
|
82
|
+
* bootstrap 路径给定时(且 install=true),SessionStart 额外追加一条
|
|
83
|
+
* bootstrap hook(matcher startup|clear|compact——resume 不重复注入);
|
|
84
|
+
* 自有条目(recorder + bootstrap)按指纹识别整体移除,用户其他条目保留。
|
|
85
|
+
*/
|
|
86
|
+
export declare function mergeGlobalClaudeSettings(existingText: string | null, recorder: string, install: boolean, bootstrap?: string): string;
|
|
87
|
+
export declare function opencodePluginSource(recorder: string): string;
|
|
88
|
+
/** 安装/升级稳定 shim 并绑定所选 targets。预检全部通过后才产生任何用户配置写入。 */
|
|
89
|
+
export declare function bindGlobal(options?: BindOptions): BindResult;
|
|
90
|
+
/** 精确移除 recastflow 自有条目;历史事件和用户配置始终保留。 */
|
|
91
|
+
export declare function unbindGlobal(options?: BindOptions): BindResult;
|
|
92
|
+
export declare function shouldAutoBind(env: NodeJS.ProcessEnv, interactive: boolean): boolean;
|
|
93
|
+
export declare function diagnoseGlobal(options?: BindOptions): Promise<{
|
|
94
|
+
checks: DoctorCheck[];
|
|
95
|
+
url?: string;
|
|
96
|
+
}>;
|