fix: suppress ExperimentalWarning, PEP 668 guidance, setup help (#116) #117
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
"@united-workforce/cli": patch
|
||||||
|
"@united-workforce/agent-hermes": patch
|
||||||
|
"@united-workforce/agent-claude-code": patch
|
||||||
|
"@united-workforce/agent-builtin": patch
|
||||||
|
"@united-workforce/agent-mock": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: suppress ExperimentalWarning, PEP 668 pip guidance, setup help (#116)
|
||||||
|
|
||||||
|
- All CLI bins use shebang `#!/usr/bin/env -S node --disable-warning=ExperimentalWarning`
|
||||||
|
- Remove NODE_OPTIONS injection from spawn (shebang handles it)
|
||||||
|
- Bootstrap pip install guidance covers venv/pipx/source options for PEP 668 systems
|
||||||
|
- `uwf setup --help` mentions interactive wizard mode
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env -S node --disable-warning=ExperimentalWarning
|
||||||
|
|
||||||
// eslint-disable-next-line -- dynamic import for version
|
// eslint-disable-next-line -- dynamic import for version
|
||||||
const pkg = await import("../package.json", { with: { type: "json" } });
|
const pkg = await import("../package.json", { with: { type: "json" } });
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env -S node --disable-warning=ExperimentalWarning
|
||||||
|
|
||||||
// eslint-disable-next-line -- dynamic import for version
|
// eslint-disable-next-line -- dynamic import for version
|
||||||
const pkg = await import("../package.json", { with: { type: "json" } });
|
const pkg = await import("../package.json", { with: { type: "json" } });
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ describe("Issue #551 — bin entry & engines", () => {
|
|||||||
const pkg = JSON.parse(readFileSync(join(PKG_ROOT, "package.json"), "utf-8"));
|
const pkg = JSON.parse(readFileSync(join(PKG_ROOT, "package.json"), "utf-8"));
|
||||||
const binPath = pkg.bin["uwf-hermes"];
|
const binPath = pkg.bin["uwf-hermes"];
|
||||||
const content = readFileSync(join(PKG_ROOT, binPath), "utf-8");
|
const content = readFileSync(join(PKG_ROOT, binPath), "utf-8");
|
||||||
expect(content.startsWith("#!/usr/bin/env node")).toBe(true);
|
expect(content.startsWith("#!/usr/bin/env")).toBe(true);
|
||||||
|
expect(content).toContain("node");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("README.md explains uwf-hermes is an adapter", () => {
|
test("README.md explains uwf-hermes is an adapter", () => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env -S node --disable-warning=ExperimentalWarning
|
||||||
|
|
||||||
// eslint-disable-next-line -- dynamic import for version
|
// eslint-disable-next-line -- dynamic import for version
|
||||||
const pkg = await import("../package.json", { with: { type: "json" } });
|
const pkg = await import("../package.json", { with: { type: "json" } });
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env -S node --disable-warning=ExperimentalWarning
|
||||||
|
|
||||||
// eslint-disable-next-line -- dynamic import for version
|
// eslint-disable-next-line -- dynamic import for version
|
||||||
const pkg = await import("../package.json", { with: { type: "json" } });
|
const pkg = await import("../package.json", { with: { type: "json" } });
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env -S node --disable-warning=ExperimentalWarning
|
||||||
|
|
||||||
import type { CasRef, ThreadId, ThreadStatus } from "@united-workforce/protocol";
|
import type { CasRef, ThreadId, ThreadStatus } from "@united-workforce/protocol";
|
||||||
import { Command } from "commander";
|
import { Command } from "commander";
|
||||||
@@ -542,7 +542,7 @@ prompt
|
|||||||
|
|
||||||
program
|
program
|
||||||
.command("setup")
|
.command("setup")
|
||||||
.description("Configure provider, model, and agent")
|
.description("Configure provider, model, and agent. Run without options for interactive wizard.")
|
||||||
.option("--provider <name>", "Provider name")
|
.option("--provider <name>", "Provider name")
|
||||||
.option("--base-url <url>", "OpenAI-compatible API base URL")
|
.option("--base-url <url>", "OpenAI-compatible API base URL")
|
||||||
.option("--api-key <key>", "API key")
|
.option("--api-key <key>", "API key")
|
||||||
|
|||||||
@@ -103,9 +103,16 @@ Install an agent adapter (at least one is required):
|
|||||||
| uwf-claude-code | \`pnpm add -g @united-workforce/agent-claude-code\` | When using Claude Code CLI directly |
|
| uwf-claude-code | \`pnpm add -g @united-workforce/agent-claude-code\` | When using Claude Code CLI directly |
|
||||||
| uwf-builtin | \`pnpm add -g @united-workforce/agent-builtin\` | Lightweight built-in agent (no external dependency) |
|
| uwf-builtin | \`pnpm add -g @united-workforce/agent-builtin\` | Lightweight built-in agent (no external dependency) |
|
||||||
|
|
||||||
**uwf-hermes** also requires the Hermes ACP plugin. After installing \`hermes-agent\`, run:
|
**uwf-hermes** also requires the Hermes ACP plugin:
|
||||||
\`\`\`bash
|
\`\`\`bash
|
||||||
pip install hermes-agent[acp] # or: pip install -e .[acp] if installed from source
|
# Option A: install into hermes venv (recommended)
|
||||||
|
source ~/.hermes/hermes-agent/.venv/bin/activate && pip install hermes-agent[acp]
|
||||||
|
|
||||||
|
# Option B: pipx
|
||||||
|
pipx install 'hermes-agent[acp]'
|
||||||
|
|
||||||
|
# Option C: if installed from source
|
||||||
|
pip install -e '.[acp]'
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
Verify the adapter is installed: \`uwf-hermes --version\` (or whichever you chose).
|
Verify the adapter is installed: \`uwf-hermes --version\` (or whichever you chose).
|
||||||
|
|||||||
@@ -1001,12 +1001,6 @@ function spawnAgent(
|
|||||||
stdio: ["ignore", "pipe", "pipe"],
|
stdio: ["ignore", "pipe", "pipe"],
|
||||||
maxBuffer: 50 * 1024 * 1024, // 50 MB — stream-json output can be large
|
maxBuffer: 50 * 1024 * 1024, // 50 MB — stream-json output can be large
|
||||||
cwd,
|
cwd,
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
NODE_OPTIONS: [process.env.NODE_OPTIONS, "--disable-warning=ExperimentalWarning"]
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(" "),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const err = e as NodeJS.ErrnoException & { stderr?: Buffer | string | null };
|
const err = e as NodeJS.ErrnoException & { stderr?: Buffer | string | null };
|
||||||
@@ -1254,12 +1248,6 @@ async function cmdThreadStepBackground(
|
|||||||
const child = spawn(scriptPath, args, {
|
const child = spawn(scriptPath, args, {
|
||||||
detached: true,
|
detached: true,
|
||||||
stdio: "ignore",
|
stdio: "ignore",
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
NODE_OPTIONS: [process.env.NODE_OPTIONS, "--disable-warning=ExperimentalWarning"]
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(" "),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
child.unref();
|
child.unref();
|
||||||
|
|||||||
Reference in New Issue
Block a user