@kairyou/agent-tools 0.1.0 → 0.3.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/README.md +147 -69
- package/README.zh-CN.md +143 -67
- package/dist/vision/cli.mjs +1972 -0
- package/dist/vision/mcp-server.mjs +32858 -0
- package/{statusline/claude/statusline.mjs → integrations/statusline/claude-statusline.mjs} +4 -2
- package/integrations/usage/cli.mjs +27 -0
- package/{hooks/codex/usage-hook.mjs → integrations/usage/codex-hook.mjs} +1 -1
- package/{lib/usage.mjs → integrations/usage/core.mjs} +5 -1
- package/{plugins/opencode/usage-plugin.mjs → integrations/usage/opencode-plugin.mjs} +1 -1
- package/integrations/usage/skills/at-usage/SKILL.md +16 -0
- package/integrations/vision/lib/cli.mjs +137 -0
- package/integrations/vision/lib/config.mjs +159 -0
- package/integrations/vision/lib/errors.mjs +35 -0
- package/integrations/vision/lib/image-source.mjs +273 -0
- package/integrations/vision/lib/inspect.mjs +108 -0
- package/integrations/vision/lib/providers/anthropic-compatible.mjs +59 -0
- package/integrations/vision/lib/providers/openai-compatible.mjs +56 -0
- package/integrations/vision/lib/providers/shared.mjs +251 -0
- package/integrations/vision/lib/rate-limit.mjs +188 -0
- package/integrations/vision/lib/redact.mjs +30 -0
- package/integrations/vision/mcp-server.mjs +96 -0
- package/integrations/vision/skills/at-vision/SKILL.md +66 -0
- package/package.json +15 -10
- package/scripts/build-vision.mjs +35 -0
- package/scripts/capture-codex-tools.mjs +48 -0
- package/scripts/install.mjs +511 -29
- package/scripts/release.mjs +126 -0
- package/skills/integrations/at-zentao/SKILL.md +148 -0
- package/skills/workflow/at-commit/SKILL.md +3 -8
- package/skills/workflow/at-review/SKILL.md +9 -4
- package/skills/workflow/at-simplify/SKILL.md +1 -0
- package/hooks/claude/.gitkeep +0 -1
- package/hooks/codex/.gitkeep +0 -1
- package/hooks/common/.gitkeep +0 -1
- package/hooks/opencode/.gitkeep +0 -1
- package/statusline/.gitkeep +0 -1
- package/statusline/codex/.gitkeep +0 -1
- /package/{plugins/opencode/usage-tui.mjs → integrations/usage/opencode-tui.mjs} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { build } from "esbuild";
|
|
7
|
+
|
|
8
|
+
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
9
|
+
const OUT_DIR = path.join(ROOT, "dist", "vision");
|
|
10
|
+
const STAGE_DIR = path.join(ROOT, "dist", `.vision-build-${process.pid}-${Date.now()}`);
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
await build({
|
|
14
|
+
entryPoints: {
|
|
15
|
+
"mcp-server": path.join(ROOT, "integrations", "vision", "mcp-server.mjs"),
|
|
16
|
+
cli: path.join(ROOT, "integrations", "vision", "lib", "cli.mjs"),
|
|
17
|
+
},
|
|
18
|
+
outdir: STAGE_DIR,
|
|
19
|
+
bundle: true,
|
|
20
|
+
platform: "node",
|
|
21
|
+
format: "esm",
|
|
22
|
+
target: "node22",
|
|
23
|
+
mainFields: ["module", "main"],
|
|
24
|
+
outExtension: { ".js": ".mjs" },
|
|
25
|
+
packages: "bundle",
|
|
26
|
+
sourcemap: false,
|
|
27
|
+
legalComments: "none",
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
fs.rmSync(OUT_DIR, { recursive: true, force: true });
|
|
31
|
+
fs.renameSync(STAGE_DIR, OUT_DIR);
|
|
32
|
+
console.log(`built ${path.relative(ROOT, OUT_DIR)}`);
|
|
33
|
+
} finally {
|
|
34
|
+
fs.rmSync(STAGE_DIR, { recursive: true, force: true });
|
|
35
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Capture the tools array from one Codex Responses API request, then exit.
|
|
3
|
+
// The request intentionally receives HTTP 503; no data is forwarded upstream.
|
|
4
|
+
//
|
|
5
|
+
// Terminal 1:
|
|
6
|
+
// node ./scripts/capture-codex-tools.mjs 8787
|
|
7
|
+
//
|
|
8
|
+
// Find the active custom provider name:
|
|
9
|
+
// grep '^model_provider' "$HOME/.codex/config.toml"
|
|
10
|
+
// Select-String "$HOME/.codex/config.toml" -Pattern '^model_provider' # PowerShell
|
|
11
|
+
//
|
|
12
|
+
// Terminal 2 (replace <model_provider_name>, then reproduce the issue):
|
|
13
|
+
// codex -c 'model_providers.<model_provider_name>.base_url="http://127.0.0.1:8787"'
|
|
14
|
+
|
|
15
|
+
import http from "node:http";
|
|
16
|
+
|
|
17
|
+
const port = Number(process.argv[2] || 8787);
|
|
18
|
+
|
|
19
|
+
const server = http.createServer((req, res) => {
|
|
20
|
+
const chunks = [];
|
|
21
|
+
req.on("data", (chunk) => chunks.push(chunk));
|
|
22
|
+
req.on("end", () => {
|
|
23
|
+
try {
|
|
24
|
+
const body = JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
25
|
+
const tools = Array.isArray(body.tools) ? body.tools : [];
|
|
26
|
+
const names = tools.map((tool) => tool.name || tool.function?.name || tool.type || "<unnamed>");
|
|
27
|
+
const hasInspectImage = JSON.stringify(tools).includes("inspect_image");
|
|
28
|
+
const mcpTools = tools.filter((tool) => {
|
|
29
|
+
const name = tool.name || tool.function?.name || "";
|
|
30
|
+
return name.startsWith("mcp__") || JSON.stringify(tool).includes("inspect_image");
|
|
31
|
+
});
|
|
32
|
+
console.log(`request: ${req.method} ${req.url}`);
|
|
33
|
+
console.log(`inspect_image reference: ${hasInspectImage ? "present" : "absent"}`);
|
|
34
|
+
console.log(`tools (${tools.length}): ${names.join(", ") || "<none>"}`);
|
|
35
|
+
console.log(`MCP tool definitions:\n${JSON.stringify(mcpTools, null, 2)}`);
|
|
36
|
+
} catch (err) {
|
|
37
|
+
console.error(`Could not parse request JSON: ${err.message}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
res.writeHead(503, { "content-type": "application/json" });
|
|
41
|
+
res.end(JSON.stringify({ error: { message: "Diagnostic capture complete" } }));
|
|
42
|
+
server.close();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
server.listen(port, "127.0.0.1", () => {
|
|
47
|
+
console.log(`Waiting for one Codex API request on http://127.0.0.1:${port} ...`);
|
|
48
|
+
});
|