@evandu/super-pi 0.1.275 → 0.1.278

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.
Files changed (56) hide show
  1. package/agents/code-designer.md +1 -0
  2. package/agents/document-organizer.md +1 -0
  3. package/agents/group-rsi.md +44 -2
  4. package/agents/rsi-builder.md +58 -0
  5. package/agents/solution-designer.md +1 -0
  6. package/desktop/main.cjs +10 -5
  7. package/desktop/preload.cjs +2 -2
  8. package/desktop/shell-entries.cjs +14 -2
  9. package/desktop/window-state.cjs +59 -0
  10. package/dist/.super-pi-check-inputs.json +4 -0
  11. package/dist/client/.super-pi-client-sources.json +10 -9
  12. package/dist/client/assets/{CodeMirrorEditor-DJgZdigq.js → CodeMirrorEditor-CmfIAppR.js} +1 -1
  13. package/dist/client/assets/{GitDiffEditor-lOnvlR42.js → GitDiffEditor-BZ2Kff1j.js} +3 -3
  14. package/dist/client/assets/{GitDiffEditor-DIRyUxnb.css → GitDiffEditor-DP0DQ9Y5.css} +1 -1
  15. package/dist/client/assets/index-B5TLGyEw.css +1 -0
  16. package/dist/client/assets/{index-BWm699nV.js → index-sXiJhOAC.js} +15 -15
  17. package/dist/client/index.html +2 -2
  18. package/dist/server/agents.d.ts +1 -1
  19. package/dist/server/agents.js +1 -1
  20. package/dist/server/application/group-chat-service.d.ts +18 -0
  21. package/dist/server/application/group-chat-service.js +42 -4
  22. package/dist/server/application/group-execution.js +4 -1
  23. package/dist/server/application/group-rsi.d.ts +1 -0
  24. package/dist/server/application/group-rsi.js +34 -6
  25. package/dist/server/application/rsi-service.d.ts +49 -0
  26. package/dist/server/application/rsi-service.js +372 -0
  27. package/dist/server/application/run-service.d.ts +4 -0
  28. package/dist/server/application/run-service.js +43 -8
  29. package/dist/server/http-server.js +4 -1
  30. package/dist/server/index.js +35 -1
  31. package/dist/server/length-continuation.d.ts +2 -9
  32. package/dist/server/length-continuation.js +10 -10
  33. package/dist/server/native-tools-extension.js +9 -4
  34. package/dist/server/pi-session-events.js +3 -1
  35. package/dist/server/rsi-evidence.d.ts +2 -0
  36. package/dist/server/rsi-evidence.js +7 -0
  37. package/dist/server/rsi-http.d.ts +3 -0
  38. package/dist/server/rsi-http.js +105 -0
  39. package/dist/server/runtime.d.ts +5 -1
  40. package/dist/server/runtime.js +15 -1
  41. package/dist/server/server-context.d.ts +2 -0
  42. package/dist/server/tool-runner.js +8 -3
  43. package/dist/server/turn-failure.d.ts +2 -0
  44. package/dist/server/turn-failure.js +15 -1
  45. package/dist/server/user-tools-extension.d.ts +5 -0
  46. package/dist/server/user-tools-extension.js +50 -0
  47. package/dist/server/user-tools.d.ts +86 -0
  48. package/dist/server/user-tools.js +259 -0
  49. package/dist/shared/group-chat.d.ts +18 -0
  50. package/dist/shared/output-recovery.d.ts +4 -0
  51. package/dist/shared/output-recovery.js +6 -0
  52. package/dist/shared/rsi.d.ts +44 -0
  53. package/dist/shared/rsi.js +1 -0
  54. package/package.json +5 -1
  55. package/skills/super-pi-capability-development/SKILL.md +32 -0
  56. package/dist/client/assets/index-CnNljc5p.css +0 -1
@@ -0,0 +1,259 @@
1
+ import { createHash, randomUUID } from "node:crypto";
2
+ import { isDeepStrictEqual } from "node:util";
3
+ import { mkdir, readFile, writeFile, rename } from "node:fs/promises";
4
+ import { join } from "node:path";
5
+ import { ToolRegistry } from "./tool-registry.js";
6
+ import { ToolRunner } from "./tool-runner.js";
7
+ const slugPattern = /^[a-z0-9][a-z0-9-]{0,47}$/;
8
+ class UserToolArtifactError extends Error {
9
+ }
10
+ function required(value, max, label) {
11
+ if (typeof value !== "string" || !value.trim() || value.length > max)
12
+ throw new Error(`${label}不能为空且不得超过 ${max} 字符。`);
13
+ return value.trim();
14
+ }
15
+ /** User assets live outside the application installation; execution reuses the sidebar tool runner. */
16
+ export class UserTools {
17
+ directory;
18
+ registry;
19
+ runner;
20
+ entries = [];
21
+ usage = [];
22
+ lane = Promise.resolve();
23
+ active = new Set();
24
+ validations = new Map();
25
+ constructor(directory) {
26
+ this.directory = directory;
27
+ this.registry = new ToolRegistry(directory);
28
+ this.runner = new ToolRunner(directory);
29
+ }
30
+ static async open(directory) {
31
+ const service = new UserTools(directory);
32
+ try {
33
+ const saved = JSON.parse(await readFile(join(directory, "capabilities.json"), "utf8"));
34
+ service.entries = saved.entries ?? [];
35
+ service.usage = saved.usage ?? [];
36
+ }
37
+ catch (error) {
38
+ if (error.code !== "ENOENT")
39
+ throw error;
40
+ }
41
+ for (const entry of service.entries)
42
+ if (entry.status === "draft") {
43
+ entry.status = "failed";
44
+ entry.testResults = [{ runId: "", passed: false, error: "服务重启,验证中断;请重新验证。" }];
45
+ }
46
+ await service.save();
47
+ return service;
48
+ }
49
+ async save() {
50
+ await mkdir(this.directory, { recursive: true });
51
+ const temporary = join(this.directory, `capabilities.${randomUUID()}.tmp`);
52
+ await writeFile(temporary, JSON.stringify({ entries: this.entries, usage: this.usage }, null, 2), { mode: 0o600 });
53
+ await rename(temporary, join(this.directory, "capabilities.json"));
54
+ }
55
+ serial(work) {
56
+ const job = this.lane.then(work);
57
+ this.lane = job.catch(() => { });
58
+ return job;
59
+ }
60
+ list(includeDrafts = false) {
61
+ const latest = new Map();
62
+ for (const entry of this.entries)
63
+ if (includeDrafts || entry.status === "ready")
64
+ latest.set(entry.slug, entry);
65
+ return structuredClone([...latest.values()]);
66
+ }
67
+ receipts(slug) { return structuredClone(this.usage.filter(item => !slug || item.slug === slug).slice(-100)); }
68
+ async register(input) {
69
+ return this.serial(async () => {
70
+ const slug = required(input.slug, 48, "能力标识");
71
+ if (!slugPattern.test(slug))
72
+ throw new Error("能力标识只能包含小写字母、数字和连字符。");
73
+ if (this.entries.length >= 512)
74
+ throw new Error("用户能力版本数量达到上限,请整理已有版本。");
75
+ const kind = input.kind === "skill" ? "skill" : input.kind === "tool" ? "tool" : undefined;
76
+ if (!kind)
77
+ throw new Error("能力类型须为 tool 或 skill。");
78
+ if (this.entries.some(entry => entry.slug === slug && entry.kind !== kind))
79
+ throw new Error("同名能力不能改变 tool/skill 类型,请使用独立标识。");
80
+ const version = Math.max(0, ...this.entries.filter(item => item.slug === slug).map(item => item.version)) + 1;
81
+ const entry = {
82
+ slug, version, kind, name: required(input.name, 120, "名称"), description: required(input.description, 1600, "说明"),
83
+ applicability: required(input.applicability, 1600, "适用范围"), instructions: required(input.instructions, 16000, "使用说明"),
84
+ status: "draft", createdAt: new Date().toISOString(), source: typeof input.source === "string" ? input.source.slice(0, 160) : undefined, tests: [],
85
+ };
86
+ if (kind === "tool") {
87
+ if (!Array.isArray(input.tests) || input.tests.length < 2 || input.tests.length > 8)
88
+ throw new Error("至少提供两个真实输入/预期 JSON 输出用例,最多八个。");
89
+ entry.tests = input.tests.map((test) => {
90
+ if (!test || typeof test.params !== "object" || !test.params || Array.isArray(test.params) || !test.expected || typeof test.expected !== "object" || Array.isArray(test.expected))
91
+ throw new Error("测试必须包含 params 和 expected JSON 对象。");
92
+ return { params: test.params, expected: test.expected };
93
+ });
94
+ if (entry.tests.some((test, index) => entry.tests.slice(0, index).some(other => isDeepStrictEqual(other.params, test.params))))
95
+ throw new Error("测试用例必须包含不同输入,不能重复同一个用例。");
96
+ if (JSON.stringify(entry.tests).length > 64000)
97
+ throw new Error("测试数据过大,请保留最小复现输入。");
98
+ const script = input.script;
99
+ if (!script || typeof script !== "object" || !Array.isArray(input.files))
100
+ throw new Error("工具须提供完整 files 和 Python script 声明。");
101
+ const tool = await this.registry.register({ slug: `${slug}-v${version}`, name: entry.name, description: entry.description,
102
+ files: [...input.files.filter(file => file.path !== "index.html"), { path: "index.html", content: "<!doctype html><meta charset=utf-8><title>User capability</title><p>Agent callable capability</p>" }],
103
+ script, environment: input.environment });
104
+ entry.toolId = tool.id;
105
+ entry.definition = tool.script;
106
+ entry.sourceAssets = await Promise.all(input.files.filter(file => file.path !== "index.html").map(async (file) => ({ path: file.path, digest: createHash("sha256").update(file.content, "utf8").digest("hex") })));
107
+ }
108
+ this.entries.push(entry);
109
+ await this.save();
110
+ return structuredClone(entry);
111
+ });
112
+ }
113
+ async execute(entry, params, owner, signal) {
114
+ if (!entry.toolId || !entry.definition)
115
+ throw new Error("这项能力没有可执行脚本。");
116
+ signal?.throwIfAborted();
117
+ const resolved = await this.registry.resolve(entry.toolId, entry.definition.path);
118
+ if (!resolved)
119
+ throw new UserToolArtifactError("能力文件不存在。");
120
+ for (const asset of entry.sourceAssets ?? []) {
121
+ const source = await this.registry.resolve(entry.toolId, asset.path);
122
+ if (!source || createHash("sha256").update(await readFile(source.file)).digest("hex") !== asset.digest)
123
+ throw new UserToolArtifactError("已注册版本的源文件发生变化,请注册并验证新版本。");
124
+ }
125
+ const run = this.runner.start({ toolId: entry.toolId, script: resolved.file, cwd: resolved.root, definition: entry.definition, params, environment: resolved.tool.environment, ownerId: owner });
126
+ const active = { id: run.id, toolId: entry.toolId };
127
+ this.active.add(active);
128
+ const cancel = () => this.runner.cancel(run.id, entry.toolId);
129
+ signal?.addEventListener("abort", cancel, { once: true });
130
+ try {
131
+ for (;;) {
132
+ if (signal?.aborted)
133
+ cancel();
134
+ const latest = this.runner.get(run.id, entry.toolId);
135
+ if (!latest)
136
+ throw new Error("工具执行记录丢失。");
137
+ if (latest.status !== "running")
138
+ return latest;
139
+ await new Promise(resolve => setTimeout(resolve, 40));
140
+ }
141
+ }
142
+ finally {
143
+ signal?.removeEventListener("abort", cancel);
144
+ this.active.delete(active);
145
+ }
146
+ }
147
+ async validate(slug, version, owner, signal) {
148
+ const key = `${slug}:${version}`;
149
+ if (this.validations.has(key))
150
+ return this.validations.get(key);
151
+ const work = (async () => {
152
+ const entry = await this.serial(async () => {
153
+ const entry = this.entries.find(item => item.slug === slug && item.version === version);
154
+ if (!entry)
155
+ throw new Error("能力版本不存在。");
156
+ if (entry.kind === "skill")
157
+ throw new Error("Skill 必须关联已经实测通过的工具才能激活;请使用 activate-skill 并指定工具。");
158
+ entry.status = "draft";
159
+ entry.testResults = [];
160
+ await this.save();
161
+ return entry;
162
+ });
163
+ if (!entry)
164
+ throw new Error("能力版本不存在。");
165
+ const results = [];
166
+ for (const test of entry.tests) {
167
+ try {
168
+ const run = await this.execute(entry, test.params, owner, signal);
169
+ const passed = run.status === "succeeded" && isDeepStrictEqual(run.result, test.expected);
170
+ results.push({ runId: run.id, passed, ...(passed ? {} : { error: run.error ?? "实际输出与预期输出不一致。" }) });
171
+ }
172
+ catch (error) {
173
+ results.push({ runId: "", passed: false, error: error instanceof Error ? error.message : String(error) });
174
+ }
175
+ if (signal?.aborted)
176
+ break;
177
+ }
178
+ return this.serial(async () => {
179
+ entry.testResults = results;
180
+ entry.status = results.length === entry.tests.length && results.every(item => item.passed) ? "ready" : "failed";
181
+ await this.save();
182
+ return structuredClone(entry);
183
+ });
184
+ })();
185
+ this.validations.set(key, work);
186
+ try {
187
+ return await work;
188
+ }
189
+ finally {
190
+ this.validations.delete(key);
191
+ }
192
+ }
193
+ async activateSkill(slug, version, testedTool) {
194
+ return this.serial(async () => {
195
+ const entry = this.entries.find(item => item.slug === slug && item.version === version && item.kind === "skill");
196
+ if (!entry || !this.list().some(item => item.slug === testedTool && item.kind === "tool"))
197
+ throw new Error("Skill 需要关联一项已验证可用的用户工具。");
198
+ if (entry.status === "ready") {
199
+ if (entry.validatedWith?.slug !== testedTool)
200
+ throw new Error("已激活的 Skill 不可更改关联,请注册新版本。");
201
+ return structuredClone(entry);
202
+ }
203
+ const tool = this.list().find(item => item.slug === testedTool && item.kind === "tool");
204
+ entry.validatedWith = { slug: tool.slug, version: tool.version };
205
+ entry.status = "ready";
206
+ await this.save();
207
+ return structuredClone(entry);
208
+ });
209
+ }
210
+ async invoke(slug, params, owner, signal, version) {
211
+ if (version !== undefined && (!Number.isInteger(version) || version < 1))
212
+ throw new Error("工具版本须为正整数。");
213
+ const entry = version === undefined ? this.list().find(item => item.slug === slug) : structuredClone(this.entries.find(item => item.slug === slug && item.version === version && item.status === 'ready'));
214
+ if (!entry)
215
+ throw new Error("找不到已通过验证的用户能力。");
216
+ if (entry.kind === "skill")
217
+ return { instructions: entry.instructions, applicability: entry.applicability, validatedWith: entry.validatedWith };
218
+ const began = Date.now();
219
+ let run;
220
+ try {
221
+ run = await this.execute(entry, params, owner, signal);
222
+ }
223
+ catch (error) {
224
+ await this.serial(async () => {
225
+ if (error instanceof UserToolArtifactError) {
226
+ const actual = this.entries.find(item => item.slug === entry.slug && item.version === entry.version);
227
+ if (actual)
228
+ actual.status = "failed";
229
+ }
230
+ this.usage = [...this.usage.slice(-999), { slug, version: entry.version, conversationId: owner, status: "rejected", durationMs: Date.now() - began, at: new Date().toISOString() }];
231
+ await this.save();
232
+ });
233
+ throw error;
234
+ }
235
+ await this.serial(async () => { this.usage = [...this.usage.slice(-999), { slug, version: entry.version, conversationId: owner, runId: run.id, status: run.status, durationMs: Date.now() - began, at: new Date().toISOString() }]; await this.save(); });
236
+ if (run.status !== "succeeded")
237
+ throw new Error(run.error ?? `工具执行 ${run.status}`);
238
+ return { result: run.result, receipt: { slug, version: entry.version, runId: run.id, durationMs: Date.now() - began } };
239
+ }
240
+ async action(body, owner, manage, signal) {
241
+ if (body.action === "list")
242
+ return this.list(manage && body.includeDrafts === true);
243
+ if (body.action === "invoke")
244
+ return this.invoke(required(body.slug, 48, "能力标识"), body.params ?? {}, owner, signal, body.version);
245
+ if (!manage)
246
+ throw new Error("当前角色没有用户能力管理权限。");
247
+ if (body.action === "register")
248
+ return this.register(body);
249
+ if (body.action === "validate")
250
+ return this.validate(body.slug, body.version, owner, signal);
251
+ if (body.action === "activate-skill")
252
+ return this.activateSkill(body.slug, body.version, body.testedTool);
253
+ if (body.action === "receipts")
254
+ return this.receipts(body.slug);
255
+ throw new Error("用户能力操作无效。");
256
+ }
257
+ close() { for (const active of this.active)
258
+ this.runner.cancel(active.id, active.toolId); }
259
+ }
@@ -19,6 +19,16 @@ export type GroupRsiFinding = {
19
19
  applicability: string;
20
20
  disposition?: "accepted" | "dismissed";
21
21
  feedback?: string;
22
+ ownership?: "platform" | "user" | "mixed" | "unclassified";
23
+ ownershipReason?: string;
24
+ capability?: {
25
+ kind: "tool" | "skill";
26
+ slug: string;
27
+ name: string;
28
+ acceptance: string;
29
+ repeatToolIds?: string[];
30
+ baseVersion?: number;
31
+ };
22
32
  };
23
33
  export type GroupRsiReport = {
24
34
  id: string;
@@ -31,6 +41,12 @@ export type GroupRsiReport = {
31
41
  retrospective: string;
32
42
  findings: GroupRsiFinding[];
33
43
  model?: GroupModel;
44
+ artifactReads?: string[];
45
+ runEvidence?: {
46
+ startedAt: string;
47
+ finishedAt: string;
48
+ elapsedMs: number;
49
+ }[];
34
50
  };
35
51
  export type GroupRsi = {
36
52
  enabled: boolean;
@@ -42,6 +58,7 @@ export type GroupRsi = {
42
58
  sourceKey?: string;
43
59
  reports: GroupRsiReport[];
44
60
  pending?: boolean;
61
+ automaticImprovements?: boolean;
45
62
  };
46
63
  export type GroupModerator = {
47
64
  model?: GroupModel;
@@ -90,6 +107,7 @@ export type GroupExecutionStep = GroupExecutionStepBase & ({
90
107
  detail?: string;
91
108
  lastUpdateAt?: string;
92
109
  durationMs?: number;
110
+ result?: string;
93
111
  });
94
112
  export type GroupExecutionTrace = {
95
113
  steps: GroupExecutionStep[];
@@ -0,0 +1,4 @@
1
+ export declare const LENGTH_CONTINUATION_ENVELOPE = "continue_output";
2
+ export declare const MANUAL_OUTPUT_RECOVERY_TEXT = "\u8BF7\u57FA\u4E8E\u4E0A\u9762\u7684\u8BF7\u6C42\u3001\u5DF2\u8F93\u51FA\u7684\u5185\u5BB9\u548C\u5DF2\u5B8C\u6210\u7684\u64CD\u4F5C\u7EE7\u7EED\u5B8C\u6210\u4EFB\u52A1\u3002\u4F18\u5148\u7ED9\u51FA\u7B80\u6D01\u7ED3\u8BBA\u6216\u6267\u884C\u5FC5\u8981\u7684\u5C0F\u6B65\u9AA4\uFF0C\u4E0D\u8981\u91CD\u590D\u5DF2\u6709\u5185\u5BB9\u6216\u5DF2\u6210\u529F\u7684\u5199\u5165\u3002";
3
+ /** Decode a system recovery order without displaying its transport envelope. */
4
+ export declare function outputRecoveryText(content: string): string | undefined;
@@ -0,0 +1,6 @@
1
+ export const LENGTH_CONTINUATION_ENVELOPE = "continue_output";
2
+ export const MANUAL_OUTPUT_RECOVERY_TEXT = "请基于上面的请求、已输出的内容和已完成的操作继续完成任务。优先给出简洁结论或执行必要的小步骤,不要重复已有内容或已成功的写入。";
3
+ /** Decode a system recovery order without displaying its transport envelope. */
4
+ export function outputRecoveryText(content) {
5
+ return /^\s*<continue_output>([\s\S]*?)<\/continue_output>\s*$/.exec(content)?.[1].trim();
6
+ }
@@ -0,0 +1,44 @@
1
+ import type { GroupRsi, GroupRsiFinding } from "./group-chat.js";
2
+ export type RsiSource = {
3
+ kind: "session" | "group";
4
+ id: string;
5
+ workspaceId: string;
6
+ };
7
+ export type RsiImprovement = {
8
+ id: string;
9
+ key: string;
10
+ source: RsiSource;
11
+ findingId: string;
12
+ reportId: string;
13
+ slug: string;
14
+ kind: "tool" | "skill";
15
+ name: string;
16
+ acceptance: string;
17
+ status: "queued" | "running" | "available" | "failed" | "interrupted" | "cancelled";
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ conversationId?: string;
21
+ error?: string;
22
+ evidence: GroupRsiFinding["evidence"];
23
+ version?: number;
24
+ evidenceContext?: string;
25
+ };
26
+ export type RsiSnapshot = {
27
+ state: GroupRsi;
28
+ improvements: RsiImprovement[];
29
+ capabilities: {
30
+ slug: string;
31
+ name: string;
32
+ kind: "tool" | "skill";
33
+ version: number;
34
+ applicability: string;
35
+ }[];
36
+ usage: {
37
+ slug: string;
38
+ version: number;
39
+ status: string;
40
+ durationMs: number;
41
+ at: string;
42
+ }[];
43
+ };
44
+ export declare const rsiKey: (source: RsiSource) => string;
@@ -0,0 +1 @@
1
+ export const rsiKey = (source) => `${source.kind}:${source.workspaceId}:${source.id}`;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "superPi": {
4
4
  "managedDirectListener": true
5
5
  },
6
- "version": "0.1.275",
6
+ "version": "0.1.278",
7
7
  "description": "Web control plane and companion for Pi",
8
8
  "license": "MIT",
9
9
  "type": "module",
@@ -54,6 +54,9 @@
54
54
  "pack:server": "npm run build && node scripts/pack-server.mjs"
55
55
  },
56
56
  "check:logic": [
57
+ "scripts/rsi-capability-loop.test.mjs",
58
+
59
+ "scripts/desktop-window-state.test.mjs",
57
60
  "scripts/remote-listener.test.mjs",
58
61
  "scripts/group-member-sessions.test.mjs",
59
62
  "scripts/group-member-pi-history.test.mjs",
@@ -327,6 +330,7 @@
327
330
  "scripts/session-reminder-pmo-rights.test.mjs"
328
331
  ],
329
332
  "check:browser": [
333
+ "scripts/rsi-session-browser.test.mjs",
330
334
  "scripts/message-source-links-browser.test.mjs",
331
335
  "scripts/settings-number-drafts-browser.test.mjs",
332
336
  "scripts/remote-tool-runtime-browser.test.mjs",
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: super-pi-capability-development
3
+ description: Turn recurring enterprise scripts and validated workflows into persistent agent-callable user tools and skills, using user_tool and user_tool_manage.
4
+ ---
5
+
6
+ # Reusable user capabilities
7
+
8
+ Use this for recurring analysis of company-specific systems, private data formats, or specialized business procedures. First call `user_tool` with `action: "list"`. Read applicability and instructions; reuse an existing suitable tool instead of rebuilding it. General platform deficiencies belong in the RSI platform findings and are not hot-patched into the installed application.
9
+
10
+ For a new agent-callable tool, use `user_tool_manage` action `register` with `specification`:
11
+
12
+ ```json
13
+ {
14
+ "kind": "tool",
15
+ "slug": "company-result-summary",
16
+ "name": "Company result summary",
17
+ "description": "Summarize numeric values in the company's result format",
18
+ "applicability": "Numeric values from the internal results adapter",
19
+ "instructions": "Call user_tool invoke with values; empty input returns zero.",
20
+ "files": [{"path":"run.py","content":"import json,sys\np=json.load(sys.stdin)\nprint(json.dumps({'sum':sum(p['values'])}))\n"}],
21
+ "script": {"path":"run.py","parameters":{"values":{"type":"array","required":true}}},
22
+ "tests": [{"params":{"values":[2,3]},"expected":{"sum":5}},{"params":{"values":[]},"expected":{"sum":0}}]
23
+ }
24
+ ```
25
+
26
+ Registration returns the immutable version. Then call `validate` with the slug and version. The platform runs actual Python tests. Failed candidates stay unavailable; fix them by registering a new version. Use real normal and edge cases from the task, not fabricated success receipts. Dependencies use exact `pkg==version` pins in `environment.requires`. Python receives JSON on stdin and prints one JSON object; do not build a second server or model client.
27
+
28
+ Verified tools are discovered by subsequent ordinary sessions and group members through `user_tool`. Use `invoke` with slug, params, and optionally a pinned version. Instructions can be registered as kind `skill`, then activated with `activate-skill` and a `testedTool` already validated by the platform. Pure untested prompt text must remain a draft, not a verified workflow.
29
+
30
+ The platform owns storage outside its npm installation. Do not edit `node_modules` or rewrite an existing registered version's files. Reuse enterprise MCP connections when available; do not embed personal credentials in files or test fixtures. A sidebar page for humans uses the separate super-pi-tool-development skill and `tool_register`.
31
+
32
+ Report actual tests and usage receipts. Functional readiness alone does not prove task-level speed or quality improvement; keep those claims pending until observed in later work.