@aiti-ai/aiti-debug-inject 0.3.9 → 0.3.11
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 +14 -23
- package/README.zh-CN.md +30 -0
- package/dev-pack.mjs +16 -3
- package/icon.svg +1 -1
- package/index.ts +17 -1
- package/package.json +12 -3
package/README.md
CHANGED
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
# @aiti-ai/aiti-debug-inject
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Minimal remote-debug injection — injects another pi-web instance's debugger into this instance's pages; the service URL is a text feature in extman, off by default
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
English · [简体中文](./README.zh-CN.md)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## About aiti
|
|
8
8
|
|
|
9
|
-
This package is part of the **aiti** ecosystem — a personal AI development workbench powered by [pi](https://pi.dev): **aiti-agent** (a self-hosted web workbench built on the open-source [pi-web](https://github.com/aiti-ai/
|
|
9
|
+
This package is part of the **aiti** ecosystem — a personal AI development workbench powered by [pi](https://pi.dev): **aiti-agent** (a self-hosted web workbench built on the open-source [pi-web](https://github.com/aiti-ai/aiti-ai)) plus debug injection into mainstream dev tools (aiti-devtools) and a rich extension system.
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- 官网 / site: <https://aiti.pw>
|
|
11
|
+
- Workbench & monorepo: <https://github.com/aiti-ai/aiti-ai>
|
|
12
|
+
- Site: <https://aiti.pw>
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
Category: Page debug injection · Tags: `inject` · `launcher` · `cross-instance` · `debug` · `fab`
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
## Install
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Bundled with **aiti-agent** (`@aiti-ai/pi-web`) — enable it from the in-app extension manager (ExtMan / App Center).
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Manual install: place this package at `~/.pi/web/extensions/aiti-debug-inject/` and reload pi-web.
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
## Documentation
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
# 部署到 ~/.pi/web/extensions/aiti-debug-inject/ 后 reload
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## 文档 · Documentation
|
|
32
|
-
|
|
33
|
-
- 中文完整文档(aiti-docs): <https://aiti.pw/extensions/aiti-debug-inject.html>
|
|
34
|
-
- English docs: <https://aiti.pw/en/extensions/aiti-debug-inject.html>
|
|
35
|
-
- 扩展注册表 / registry: <https://aiti.pw/extensions.html> · machine-readable <https://aiti.pw/extensions.json>
|
|
24
|
+
- Documentation (English): <https://aiti.pw/en/extensions/aiti-debug-inject.html>
|
|
25
|
+
- 文档(中文): <https://aiti.pw/extensions/aiti-debug-inject.html>
|
|
26
|
+
- Extension registry: <https://aiti.pw/extensions.html> · machine-readable <https://aiti.pw/extensions.json>
|
|
36
27
|
|
|
37
28
|
## License
|
|
38
29
|
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @aiti-ai/aiti-debug-inject
|
|
2
|
+
|
|
3
|
+
> 极简远程调试注入 —— 把另一个 pi-web 实例的调试器注入本实例页面,服务地址是 extman 里的文本 feature,默认关闭
|
|
4
|
+
|
|
5
|
+
[English](./README.md) · 简体中文
|
|
6
|
+
|
|
7
|
+
## 关于 aiti
|
|
8
|
+
|
|
9
|
+
本包是 **aiti** 生态的组成部分——以 [pi](https://pi.dev) 为引擎的个人 AI 开发工作台与本地调试注入生态:**aiti-agent**(自托管 Web 工作台,基于开源项目 [pi-web](https://github.com/aiti-ai/aiti-ai) 构建,浏览器为主操作面)+ 各开发工具内的调试注入(aiti-devtools)+ 丰富的扩展体系。
|
|
10
|
+
|
|
11
|
+
- 工作台 / 生态仓库(aiti-agent,基于 pi-web): <https://github.com/aiti-ai/aiti-ai>
|
|
12
|
+
- 官网: <https://aiti.pw>
|
|
13
|
+
|
|
14
|
+
分类: 页面调试注入 · tags: `inject` · `launcher` · `cross-instance` · `debug` · `fab`
|
|
15
|
+
|
|
16
|
+
## 安装
|
|
17
|
+
|
|
18
|
+
随 **aiti-agent**(`@aiti-ai/pi-web`)捆绑发行——在工作台内的扩展管理器(ExtMan / 应用中心)启用即可。
|
|
19
|
+
|
|
20
|
+
手动安装:把本包放到 `~/.pi/web/extensions/aiti-debug-inject/` 后 reload。
|
|
21
|
+
|
|
22
|
+
## 文档
|
|
23
|
+
|
|
24
|
+
- 中文文档: <https://aiti.pw/extensions/aiti-debug-inject.html>
|
|
25
|
+
- Documentation (English): <https://aiti.pw/en/extensions/aiti-debug-inject.html>
|
|
26
|
+
- 扩展注册表: <https://aiti.pw/extensions.html> · machine-readable <https://aiti.pw/extensions.json>
|
|
27
|
+
|
|
28
|
+
## 许可证
|
|
29
|
+
|
|
30
|
+
MIT
|
package/dev-pack.mjs
CHANGED
|
@@ -77,7 +77,7 @@ export function agentsMdTemplate(extId) {
|
|
|
77
77
|
|
|
78
78
|
/** 默认 tools/build.mjs(esbuild 单包零配置;扩展自带 tools/build.mjs 则不走到这里)。 */
|
|
79
79
|
function buildMjsTemplate(extId, extRoot, clientOut, entryRel) {
|
|
80
|
-
|
|
80
|
+
// No hardcoded checkout path: candidates are resolved at run time (see repoCandidates below).
|
|
81
81
|
return `/**
|
|
82
82
|
* ${extId} · 现场构建入口(dev-pack 默认模板,esbuild 单包零配置)
|
|
83
83
|
* 用法:node tools/build.mjs
|
|
@@ -96,12 +96,25 @@ const entryRel = ${JSON.stringify(entryRel || "")};
|
|
|
96
96
|
|
|
97
97
|
// esbuild 解析:部署目录 node_modules → 源码仓 node_modules(本机开发场景)→ PATH 上的 esbuild → npm exec 现拉。
|
|
98
98
|
// 注意:node_modules/esbuild/bin/esbuild 是原生二进制(ELF/Mach-O),必须直接执行(不能当 JS 跑)。
|
|
99
|
+
// Checkout roots are discovered by walking up from the extension dir (a root has node_modules/),
|
|
100
|
+
// plus AITI_REPO_ROOT when set — no machine-specific absolute paths baked into generated files.
|
|
101
|
+
function repoCandidates() {
|
|
102
|
+
const out = [];
|
|
103
|
+
if (process.env.AITI_REPO_ROOT) out.push(process.env.AITI_REPO_ROOT.split(pathSep).join("/") + "/node_modules/esbuild/bin/esbuild");
|
|
104
|
+
let d = extRoot;
|
|
105
|
+
for (let i = 0; i < 8; i++) {
|
|
106
|
+
out.push(d.split(pathSep).join("/") + "/node_modules/esbuild/bin/esbuild");
|
|
107
|
+
const up = dirname(d);
|
|
108
|
+
if (up === d) break;
|
|
109
|
+
d = up;
|
|
110
|
+
}
|
|
111
|
+
return out;
|
|
112
|
+
}
|
|
99
113
|
function findEsbuild() {
|
|
100
114
|
const home = (process.env.HOME || process.env.USERPROFILE || "").split(pathSep).join("/");
|
|
101
115
|
const candidates = [
|
|
102
116
|
extRoot + "/node_modules/esbuild/bin/esbuild",
|
|
103
|
-
|
|
104
|
-
"C:/workspace/aiti-ai/node_modules/esbuild/bin/esbuild", // windows dev box(源码在 D 盘)
|
|
117
|
+
...repoCandidates(),
|
|
105
118
|
];
|
|
106
119
|
for (const c of candidates) {
|
|
107
120
|
if (!existsSync(c)) continue;
|
package/icon.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 2 4 4-3 3-4-4z"/><path d="M8 12l4 4"/><path d="M14 2 4 12 3 18 9 17 19 7a4 4 0 0 0-5-5z"/><path d="M8 12 4 8"/></svg>
|
package/index.ts
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
export default {
|
|
16
16
|
id: "aiti-debug-inject",
|
|
17
17
|
name: "AITI 远程调试注入(可配置目标 pi-web)",
|
|
18
|
-
version: "0.3.0",
|
|
19
18
|
icon: "icon.svg",
|
|
20
19
|
client: "dist/aiti-debug-inject-client.mjs",
|
|
21
20
|
|
|
@@ -40,6 +39,23 @@ export default {
|
|
|
40
39
|
},
|
|
41
40
|
],
|
|
42
41
|
|
|
42
|
+
|
|
43
|
+
ui: {
|
|
44
|
+
// English manifest-text overrides (name/description/feature labels); zh source lives in the manifest.
|
|
45
|
+
i18n: {
|
|
46
|
+
"zh-CN": {
|
|
47
|
+
"ext.displayName": "远程调试注入",
|
|
48
|
+
},
|
|
49
|
+
en: {
|
|
50
|
+
"feat.service.url.desc": "Target pi-web base URL (with sub-path, e.g. https://host:port/dev)",
|
|
51
|
+
"feat.inject.enabled.desc": "When on, injects the AITI debug launcher into the target pi-web's pages (visible only after that instance's pages refresh)",
|
|
52
|
+
"ext.displayName": "Remote Debug Inject",
|
|
53
|
+
"feat.service.url": "Service URL",
|
|
54
|
+
"feat.inject.enabled": "Enable injection",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
|
|
43
59
|
server: {
|
|
44
60
|
startup() {
|
|
45
61
|
console.log("[aiti-debug-inject] 就绪(纯 client 注入;feature 控制:service.url + inject.enabled)");
|
package/package.json
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiti-ai/aiti-debug-inject",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.11",
|
|
4
|
+
"description": "Minimal remote-debug injection — injects another pi-web instance's debugger into this instance's pages; the service URL is a text feature in extman, off by default",
|
|
5
|
+
"displayNameI18n": {
|
|
6
|
+
"en": "Remote Debug Inject"
|
|
7
|
+
},
|
|
8
|
+
"descriptionI18n": {
|
|
9
|
+
"zh-CN": "极简远程调试注入 —— 把另一个 pi-web 实例的调试器注入本实例页面,服务地址是 extman 里的文本 feature,默认关闭"
|
|
10
|
+
},
|
|
5
11
|
"soul": "调试器该穿在哪件衣服里,由你说了算。",
|
|
12
|
+
"soulI18n": {
|
|
13
|
+
"en": "Which outfit the debugger wears is up to you."
|
|
14
|
+
},
|
|
6
15
|
"scripts": {
|
|
7
16
|
"build:client": "node -e \"const fs=require('fs');fs.mkdirSync('dist',{recursive:true});for(const f of fs.readdirSync('client/src'))if(f.endsWith('.mjs'))fs.copyFileSync('client/src/'+f,'dist/'+f)\""
|
|
8
17
|
},
|
|
9
18
|
"aitiExtProtocol": "1.0",
|
|
10
19
|
"license": "MIT",
|
|
11
|
-
"contentHash": "
|
|
20
|
+
"contentHash": "3ee8367d54b1e00b",
|
|
12
21
|
"repository": {
|
|
13
22
|
"type": "git",
|
|
14
23
|
"url": "git+https://github.com/aiti-ai/aiti-ai.git",
|