@aiti-ai/aiti-debug-inject 0.3.9 → 0.3.10

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 CHANGED
@@ -1,38 +1,30 @@
1
1
  # @aiti-ai/aiti-debug-inject
2
2
 
3
- > 极简远程调试注入 —— 把另一个 pi-web 实例的调试器注入本实例页面,服务地址是 extman 里的文本 feature,默认关闭
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
- ## 来源 · Origin
5
+ English · [简体中文](./README.zh-CN.md)
6
6
 
7
- 本包是 **aiti** 生态的组成部分——以 [pi](https://pi.dev) 为引擎的个人 AI 开发工作台与本地调试注入生态:**aiti-agent**(自托管 Web 工作台,基于开源项目 [pi-web](https://github.com/aiti-ai/pi-web) 构建,浏览器为主操作面)+ 各开发工具内的调试注入(aiti-devtools)+ 丰富的扩展体系。
7
+ ## About aiti
8
8
 
9
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/pi-web)) plus debug injection into mainstream dev tools (aiti-devtools) and a rich extension system.
10
10
 
11
- - 工作台 / workbench: <https://github.com/aiti-ai/pi-web>
12
- - 生态仓库 / monorepo: <https://github.com/aiti-ai/aiti-ai>
13
- - 官网 / site: <https://aiti.pw>
11
+ - Workbench (aiti-agent, built on pi-web): <https://github.com/aiti-ai/pi-web>
12
+ - Ecosystem monorepo: <https://github.com/aiti-ai/aiti-ai>
13
+ - Site: <https://aiti.pw>
14
14
 
15
- ## 功能定位(中文)
15
+ Category: Page debug injection · Tags: `inject` · `launcher` · `cross-instance` · `debug` · `fab`
16
16
 
17
- 极简远程调试注入 —— 把另一个 pi-web 实例的调试器注入本实例页面,服务地址是 extman 里的文本 feature,默认关闭
17
+ ## Install
18
18
 
19
- 页面调试注入 · tags: `inject` · `launcher` · `cross-instance` · `debug` · `fab`
19
+ Bundled with **aiti-agent** (`@aiti-ai/pi-web`) — enable it from the in-app extension manager (ExtMan / App Center).
20
20
 
21
- ## Positioning (English)
21
+ Manual install: place this package at `~/.pi/web/extensions/aiti-debug-inject/` and reload pi-web.
22
22
 
23
- 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
23
+ ## Documentation
24
24
 
25
- ## 安装 / 部署
26
-
27
- ```bash
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>
25
+ - Documentation (English): <https://aiti.pw/en/extensions/aiti-debug-inject.html>
26
+ - 文档(中文): <https://aiti.pw/extensions/aiti-debug-inject.html>
27
+ - Extension registry: <https://aiti.pw/extensions.html> · machine-readable <https://aiti.pw/extensions.json>
36
28
 
37
29
  ## License
38
30
 
@@ -0,0 +1,31 @@
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/pi-web) 构建,浏览器为主操作面)+ 各开发工具内的调试注入(aiti-devtools)+ 丰富的扩展体系。
10
+
11
+ - 工作台(aiti-agent,基于 pi-web): <https://github.com/aiti-ai/pi-web>
12
+ - 生态仓库: <https://github.com/aiti-ai/aiti-ai>
13
+ - 官网: <https://aiti.pw>
14
+
15
+ 分类: 页面调试注入 · tags: `inject` · `launcher` · `cross-instance` · `debug` · `fab`
16
+
17
+ ## 安装
18
+
19
+ 随 **aiti-agent**(`@aiti-ai/pi-web`)捆绑发行——在工作台内的扩展管理器(ExtMan / 应用中心)启用即可。
20
+
21
+ 手动安装:把本包放到 `~/.pi/web/extensions/aiti-debug-inject/` 后 reload。
22
+
23
+ ## 文档
24
+
25
+ - 中文文档: <https://aiti.pw/extensions/aiti-debug-inject.html>
26
+ - Documentation (English): <https://aiti.pw/en/extensions/aiti-debug-inject.html>
27
+ - 扩展注册表: <https://aiti.pw/extensions.html> · machine-readable <https://aiti.pw/extensions.json>
28
+
29
+ ## 许可证
30
+
31
+ 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
- const repoHint = "/home/pi/workspace/aiti-ai"; // 现场构建探测源码仓 node_modules 用(三机各不同,缺失时走 npm exec)
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
- home + "/workspace/aiti-ai/node_modules/esbuild/bin/esbuild",
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/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,24 @@ 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
+ "ext.description": "Target pi-web base URL (with sub-path, e.g. https://host:port/dev). After configuring, enable injection below.",
54
+ "feat.service.url": "Service URL",
55
+ "feat.inject.enabled": "Enable injection",
56
+ },
57
+ },
58
+ },
59
+
43
60
  server: {
44
61
  startup() {
45
62
  console.log("[aiti-debug-inject] 就绪(纯 client 注入;feature 控制:service.url + inject.enabled)");
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@aiti-ai/aiti-debug-inject",
3
- "version": "0.3.9",
4
- "description": "可配置远程调试注入",
3
+ "version": "0.3.10",
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
5
  "soul": "调试器该穿在哪件衣服里,由你说了算。",
6
6
  "scripts": {
7
7
  "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
8
  },
9
9
  "aitiExtProtocol": "1.0",
10
10
  "license": "MIT",
11
- "contentHash": "2c6048fd55a50226",
11
+ "contentHash": "0f01c687429e4ba0",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "git+https://github.com/aiti-ai/aiti-ai.git",