@my-life-buddies/cli 0.13.3 → 0.14.1
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 +11 -7
- package/dist/bin/buddy.js +1 -1
- package/dist/bin/buddy.js.map +1 -1
- package/dist/bin/core.js +233 -54
- package/dist/bin/core.js.map +4 -4
- package/dist/bin/preview.js +281 -19
- package/dist/bin/preview.js.map +4 -4
- package/dist/web/app.css +65 -6
- package/dist/web/app.js +92 -33
- package/dist/web/diagnostics.js +184 -0
- package/dist/web/index.html +34 -34
- package/package.json +3 -3
- package/resources/agent-template/package-lock.json +4 -4
- package/resources/agent-template/package.json +2 -2
package/dist/web/index.html
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<link rel="stylesheet" href="/assets/app.css">
|
|
14
14
|
<script src="/assets/iphone-16-max.js" defer></script>
|
|
15
15
|
<script src="/assets/widgets.js" defer></script>
|
|
16
|
+
<script src="/assets/diagnostics.js" defer></script>
|
|
16
17
|
<script src="/assets/app.js" defer></script>
|
|
17
18
|
<link rel="stylesheet" href="/assets/widgets.css">
|
|
18
19
|
</head>
|
|
@@ -30,16 +31,13 @@
|
|
|
30
31
|
<p class="sidebar-label">开发调试</p>
|
|
31
32
|
<nav class="debug-tabs" role="tablist" aria-label="本地回合调试视图">
|
|
32
33
|
<button id="tab-overview" role="tab" aria-selected="true" aria-controls="panel-overview" tabindex="0">
|
|
33
|
-
<svg aria-hidden="true" viewBox="0 0 24 24"><rect x="4" y="4" width="7" height="7" rx="1.5"/><rect x="13" y="4" width="7" height="7" rx="1.5"/><rect x="4" y="13" width="7" height="7" rx="1.5"/><rect x="13" y="13" width="7" height="7" rx="1.5"/></svg><span
|
|
34
|
+
<svg aria-hidden="true" viewBox="0 0 24 24"><rect x="4" y="4" width="7" height="7" rx="1.5"/><rect x="13" y="4" width="7" height="7" rx="1.5"/><rect x="4" y="13" width="7" height="7" rx="1.5"/><rect x="13" y="13" width="7" height="7" rx="1.5"/></svg><span>运行概况</span>
|
|
34
35
|
</button>
|
|
35
|
-
<button id="tab-
|
|
36
|
-
<svg aria-hidden="true" viewBox="0 0 24 24"><
|
|
37
|
-
</button>
|
|
38
|
-
<button id="tab-context" role="tab" aria-selected="false" aria-controls="panel-context" tabindex="-1">
|
|
39
|
-
<svg aria-hidden="true" viewBox="0 0 24 24"><path d="M4 5h13v10H9l-4 4v-4H4Z"/><path d="M8 9h5M8 12h3M18 8h2v10h-7"/></svg><span>对话记录</span>
|
|
36
|
+
<button id="tab-models" role="tab" aria-selected="false" aria-controls="panel-models" tabindex="-1">
|
|
37
|
+
<svg aria-hidden="true" viewBox="0 0 24 24"><path d="M4 5h16v14H4ZM8 9h8M8 13h5"/></svg><span>模型调用</span>
|
|
40
38
|
</button>
|
|
41
39
|
<button id="tab-protocol" role="tab" aria-selected="false" aria-controls="panel-protocol" tabindex="-1">
|
|
42
|
-
<svg aria-hidden="true" viewBox="0 0 24 24"><rect x="3.5" y="5" width="17" height="14" rx="2"/><path d="m7.5 9 3 3-3 3M13 15h3.5"/></svg><span
|
|
40
|
+
<svg aria-hidden="true" viewBox="0 0 24 24"><rect x="3.5" y="5" width="17" height="14" rx="2"/><path d="m7.5 9 3 3-3 3M13 15h3.5"/></svg><span>运行日志</span>
|
|
43
41
|
</button>
|
|
44
42
|
</nav>
|
|
45
43
|
</div>
|
|
@@ -85,6 +83,18 @@
|
|
|
85
83
|
|
|
86
84
|
<main class="workspace" id="debug-content">
|
|
87
85
|
<section class="debugger" aria-label="本地回合调试器">
|
|
86
|
+
<div class="debug-panels">
|
|
87
|
+
<section id="panel-models" class="debug-panel" role="tabpanel" aria-labelledby="tab-models" hidden>
|
|
88
|
+
<div class="section-heading"><div><h3>模型调用</h3></div></div>
|
|
89
|
+
<div class="diagnostic-filters">
|
|
90
|
+
<label>会话<select id="models-conversation" aria-label="模型会话"><option value="">全部会话</option></select></label>
|
|
91
|
+
<label>类型<select id="models-kind"><option value="">请求与响应</option><option value="request">模型请求</option><option value="response">模型响应</option></select></label>
|
|
92
|
+
<label class="diagnostic-search">搜索<input id="models-search" type="search" placeholder="搜索模型、工具或内容" autocomplete="off"></label>
|
|
93
|
+
</div>
|
|
94
|
+
<p class="diagnostic-note" id="models-count"></p>
|
|
95
|
+
<div id="model-records" class="diagnostic-records"></div>
|
|
96
|
+
</section>
|
|
97
|
+
<section id="panel-overview" class="debug-panel" role="tabpanel" aria-labelledby="tab-overview">
|
|
88
98
|
<div class="run-strip">
|
|
89
99
|
<div class="run-heading">
|
|
90
100
|
<div class="run-identity">
|
|
@@ -93,7 +103,7 @@
|
|
|
93
103
|
<h2 id="run-title">尚无本地回合</h2>
|
|
94
104
|
<span class="status-pill" id="run-status" data-status="idle">等待消息</span>
|
|
95
105
|
</div>
|
|
96
|
-
<details class="run-reference" id="run-reference" hidden><summary
|
|
106
|
+
<details class="run-reference" id="run-reference" hidden><summary>本地发送回执 ID</summary>
|
|
97
107
|
<span id="run-id"></span>
|
|
98
108
|
<button type="button" class="text-button" id="copy-run-id" disabled>复制 ID</button>
|
|
99
109
|
</details>
|
|
@@ -112,28 +122,25 @@
|
|
|
112
122
|
</div>
|
|
113
123
|
|
|
114
124
|
<dl class="run-metrics" aria-label="本地回合指标">
|
|
115
|
-
<div><dt
|
|
116
|
-
<div><dt
|
|
117
|
-
<div><dt
|
|
118
|
-
<div><dt>会话消息</dt><dd id="metric-messages">0</dd></div>
|
|
125
|
+
<div><dt>消息被接收</dt><dd><span id="metric-accept">未记录</span><p class="metric-help">Preview 发起发送至平台确认接收。</p></dd></div>
|
|
126
|
+
<div><dt>首字耗时</dt><dd><span id="metric-first">未记录</span><p class="metric-help">Preview 发起发送至收到首段文字。</p></dd></div>
|
|
127
|
+
<div><dt>回复结束</dt><dd><span id="metric-response">未记录</span><p class="metric-help">Preview 发起发送至观察到回复结束。</p></dd></div>
|
|
128
|
+
<div><dt>会话消息</dt><dd><span id="metric-messages">0</span><p class="metric-help">当前会话的消息总数,包含历史消息。</p></dd></div>
|
|
119
129
|
</dl>
|
|
120
130
|
|
|
121
131
|
</div>
|
|
122
|
-
|
|
123
|
-
<div class="debug-panels">
|
|
124
|
-
<section id="panel-overview" class="debug-panel" role="tabpanel" aria-labelledby="tab-overview">
|
|
125
132
|
<div class="overview-grid">
|
|
126
133
|
<article class="run-summary">
|
|
127
134
|
<div class="section-heading">
|
|
128
|
-
<div><h3
|
|
135
|
+
<div><h3>回复观察</h3></div>
|
|
129
136
|
</div>
|
|
130
137
|
<div class="empty-state" id="overview-empty">
|
|
131
138
|
<h4>发一条消息,开始记录</h4>
|
|
132
|
-
<p
|
|
139
|
+
<p>右侧发送消息后,这里显示消息发送与回复的观察结果。</p>
|
|
133
140
|
</div>
|
|
134
141
|
<div id="overview-content" hidden>
|
|
135
142
|
<ol class="run-progress" id="run-progress" aria-label="回合执行进度"></ol>
|
|
136
|
-
<div class="waterfall" id="waterfall" aria-label="
|
|
143
|
+
<div class="waterfall" id="waterfall" aria-label="消息时间节点,均从发起发送计时"></div>
|
|
137
144
|
<p class="run-summary-copy" id="run-summary-copy"></p>
|
|
138
145
|
</div>
|
|
139
146
|
</article>
|
|
@@ -148,28 +155,21 @@
|
|
|
148
155
|
</dl>
|
|
149
156
|
</article>
|
|
150
157
|
</div>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
<section id="panel-timeline" class="debug-panel" role="tabpanel" aria-labelledby="tab-timeline" hidden>
|
|
154
|
-
<div class="section-heading">
|
|
155
|
-
<div><h3>执行时间线</h3><p>查看当前回合的事件。</p></div>
|
|
156
|
-
</div>
|
|
157
|
-
<ol class="timeline" id="timeline-list"></ol>
|
|
158
|
-
</section>
|
|
159
|
-
|
|
160
|
-
<section id="panel-context" class="debug-panel" role="tabpanel" aria-labelledby="tab-context" hidden>
|
|
161
|
-
<div class="section-heading">
|
|
162
|
-
<div><h3>当前对话记录</h3><p>包含当前会话的历史消息,不限于所选回合。</p></div>
|
|
163
|
-
<span class="source-label" id="context-source">平台聊天记录</span>
|
|
164
|
-
</div>
|
|
165
|
-
<div class="context-list" id="context-list"></div>
|
|
158
|
+
<details class="diagnostic-history"><summary>消息与连接事件</summary><ol class="timeline" id="timeline-list"></ol></details>
|
|
159
|
+
<details class="diagnostic-history"><summary>平台对话记录 <span id="context-source">平台聊天记录</span></summary><div class="context-list" id="context-list"></div></details>
|
|
166
160
|
</section>
|
|
167
161
|
|
|
168
162
|
<section id="panel-protocol" class="debug-panel" role="tabpanel" aria-labelledby="tab-protocol" hidden>
|
|
169
163
|
<div class="section-heading">
|
|
170
|
-
<div><h3
|
|
164
|
+
<div><h3>运行日志</h3></div>
|
|
171
165
|
<button class="text-button" id="copy-protocol" type="button">复制可见日志</button>
|
|
172
166
|
</div>
|
|
167
|
+
<div class="diagnostic-filters">
|
|
168
|
+
<label>会话<select id="logs-conversation" aria-label="日志会话"><option value="">全部会话</option></select></label>
|
|
169
|
+
<label>级别<select id="logs-level"><option value="">全部级别</option><option value="error">ERROR</option><option value="warn">WARN</option><option value="info">INFO</option></select></label>
|
|
170
|
+
<label class="diagnostic-search">搜索<input id="logs-search" type="search" placeholder="搜索日志内容" autocomplete="off"></label>
|
|
171
|
+
</div>
|
|
172
|
+
<p class="diagnostic-note" id="logs-count"></p>
|
|
173
173
|
<div class="protocol-log" id="protocol-log" role="log" aria-live="polite"></div>
|
|
174
174
|
</section>
|
|
175
175
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@my-life-buddies/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "搭搭 Developer Platform 命令行工具",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"ws": "8.21.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@buddy/cli-core": "0.
|
|
43
|
-
"@buddy/preview": "0.
|
|
42
|
+
"@buddy/cli-core": "0.14.1",
|
|
43
|
+
"@buddy/preview": "0.14.1"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "buddy-agent-project",
|
|
9
9
|
"version": "0.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@my-life-buddies/buddy-runtime": "0.
|
|
11
|
+
"@my-life-buddies/buddy-runtime": "0.16.0",
|
|
12
12
|
"typebox": "1.3.7"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
@@ -981,9 +981,9 @@
|
|
|
981
981
|
}
|
|
982
982
|
},
|
|
983
983
|
"node_modules/@my-life-buddies/buddy-runtime": {
|
|
984
|
-
"version": "0.
|
|
985
|
-
"resolved": "https://registry.npmjs.org/@my-life-buddies/buddy-runtime/-/buddy-runtime-0.
|
|
986
|
-
"integrity": "sha512-
|
|
984
|
+
"version": "0.16.0",
|
|
985
|
+
"resolved": "https://registry.npmjs.org/@my-life-buddies/buddy-runtime/-/buddy-runtime-0.16.0.tgz",
|
|
986
|
+
"integrity": "sha512-NkJef6s39Fs/pnxtC5q5ee8dEFMUudPcyO6a4v22xMZmaDIsFBvb/R3D1q1/bVrSCKAvhSaVe0sM9LrhuPn02w==",
|
|
987
987
|
"dependencies": {
|
|
988
988
|
"@earendil-works/pi-agent-core": "0.85.1",
|
|
989
989
|
"@earendil-works/pi-ai": "0.85.1",
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"start": "node start.mjs"
|
|
7
|
+
"start": "node --env-file-if-exists=.env start.mjs"
|
|
8
8
|
},
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=24"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@my-life-buddies/buddy-runtime": "0.
|
|
13
|
+
"@my-life-buddies/buddy-runtime": "0.16.0",
|
|
14
14
|
"typebox": "1.3.7"
|
|
15
15
|
}
|
|
16
16
|
}
|