argsbarg 6.1.6 → 6.1.7
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/CHANGELOG.md +8 -1
- package/package.json +1 -1
- package/src/builtins/builtins.test.ts +4 -4
- package/src/builtins/completion-bash.ts +1 -1
- package/src/builtins/completion-fish.ts +1 -1
- package/src/builtins/completion-group.ts +3 -3
- package/src/builtins/completion-zsh.ts +1 -1
- package/src/builtins/config.test.ts +3 -3
- package/src/builtins/config.ts +9 -9
- package/src/builtins/configure-copy.ts +2 -2
- package/src/builtins/configure.ts +3 -3
- package/src/builtins/dispatch.ts +10 -10
- package/src/builtins/export.ts +4 -4
- package/src/builtins/http.ts +5 -5
- package/src/builtins/mcp.ts +3 -3
- package/src/builtins/presentation.ts +5 -5
- package/src/builtins/registry.ts +3 -3
- package/src/builtins/scopes.ts +2 -2
- package/src/builtins/version.ts +1 -1
- package/src/cli-tool/full-example-capabilities.test.ts +2 -2
- package/src/cli-tool/main.ts +1 -1
- package/src/cli-tool/program.ts +1 -1
- package/src/cli-tool/prompt.ts +1 -1
- package/src/config/bindings.test.ts +1 -1
- package/src/config/bindings.ts +1 -1
- package/src/config/bootstrap.test.ts +1 -1
- package/src/config/bootstrap.ts +3 -3
- package/src/config/context.test.ts +1 -1
- package/src/config/context.ts +1 -1
- package/src/config/entry.ts +1 -1
- package/src/config/file.test.ts +1 -1
- package/src/config/file.ts +3 -3
- package/src/config/manifest.ts +1 -1
- package/src/config/resolve.test.ts +1 -1
- package/src/config/resolve.ts +1 -1
- package/src/config/schema.ts +1 -1
- package/src/config/validate.ts +1 -1
- package/src/configure/artifacts/binary-placement.test.ts +1 -1
- package/src/configure/artifacts/binary-placement.ts +1 -1
- package/src/configure/artifacts/gh-release-update.ts +1 -1
- package/src/configure/artifacts/install-validate.test.ts +3 -3
- package/src/configure/artifacts/mcp-config.ts +1 -1
- package/src/configure/artifacts/mcp-opencode.test.ts +1 -1
- package/src/configure/artifacts/mcp-opencode.ts +1 -1
- package/src/configure/artifacts/paths.ts +5 -5
- package/src/configure/artifacts/plan.ts +1 -1
- package/src/configure/artifacts/status.test.ts +1 -1
- package/src/configure/artifacts/status.ts +2 -2
- package/src/configure/artifacts/target-base.ts +1 -1
- package/src/configure/artifacts/target-detect.ts +1 -1
- package/src/configure/artifacts/target-effective.ts +3 -3
- package/src/configure/artifacts/target-mcp-cli.ts +1 -1
- package/src/configure/artifacts/target-mcp-json.ts +1 -1
- package/src/configure/artifacts/target-plan-build.ts +2 -2
- package/src/configure/artifacts/target-scope.ts +3 -3
- package/src/configure/artifacts/target-skill.ts +1 -1
- package/src/configure/artifacts/target-types.ts +2 -2
- package/src/configure/artifacts/targets/app.ts +5 -5
- package/src/configure/artifacts/targets/chatgpt-mcp.ts +2 -2
- package/src/configure/artifacts/targets/claude-code-mcp.ts +2 -2
- package/src/configure/artifacts/targets/claude-desktop-mcp.ts +2 -2
- package/src/configure/artifacts/targets/claude-skill.ts +2 -2
- package/src/configure/artifacts/targets/codex-mcp.ts +2 -2
- package/src/configure/artifacts/targets/codex-skill.ts +2 -2
- package/src/configure/artifacts/targets/configure.ts +5 -5
- package/src/configure/artifacts/targets/cursor-mcp.ts +2 -2
- package/src/configure/artifacts/targets/cursor-skill.ts +2 -2
- package/src/configure/artifacts/targets/index.ts +1 -1
- package/src/configure/artifacts/targets/openclaw-mcp.ts +2 -2
- package/src/configure/artifacts/targets/openclaw-skill.ts +3 -3
- package/src/configure/artifacts/targets/opencode-mcp.ts +5 -5
- package/src/configure/artifacts/targets/opencode-skill.ts +3 -3
- package/src/configure/artifacts/targets.test.ts +1 -1
- package/src/configure/artifacts/uninstall.ts +1 -1
- package/src/configure/configure.test.ts +9 -9
- package/src/configure/index.ts +5 -5
- package/src/configure/prompt.ts +1 -1
- package/src/core/context.ts +3 -3
- package/src/core/json-leaf.test.ts +1 -1
- package/src/core/leaf-inputs.test.ts +1 -1
- package/src/core/leaf-inputs.ts +2 -2
- package/src/core/parse.test.ts +9 -9
- package/src/core/parse.ts +2 -2
- package/src/core/schema.ts +3 -3
- package/src/core/types.ts +1 -1
- package/src/core/validate.ts +6 -6
- package/src/docs/builtin.ts +3 -3
- package/src/docs/cli-guide.test.ts +3 -3
- package/src/docs/cli-guide.ts +5 -5
- package/src/docs/docs.test.ts +8 -8
- package/src/docs/http-guide.ts +7 -7
- package/src/docs/mcp-guide.ts +7 -7
- package/src/docs/mcp-resources.test.ts +1 -1
- package/src/docs/mcp-resources.ts +1 -1
- package/src/docs/resolve.ts +4 -4
- package/src/docs/save.ts +2 -2
- package/src/exports/cli.ts +9 -9
- package/src/exports/headless.ts +2 -2
- package/src/exports/http.ts +2 -2
- package/src/exports/mcp.ts +2 -2
- package/src/headless/routing.ts +2 -2
- package/src/headless/tool-call.ts +11 -11
- package/src/hooks/run.ts +6 -6
- package/src/http/openapi.ts +3 -3
- package/src/http/paths.ts +1 -1
- package/src/http/readiness.ts +3 -3
- package/src/http/result.ts +1 -1
- package/src/http/routes.ts +4 -4
- package/src/http/server.ts +6 -6
- package/src/log/emitter.ts +1 -1
- package/src/mcp/bundle.ts +2 -2
- package/src/mcp/claude.test.ts +1 -1
- package/src/mcp/claude.ts +4 -4
- package/src/mcp/hidden-mcpb.test.ts +5 -5
- package/src/mcp/result.ts +2 -2
- package/src/mcp/server.ts +3 -3
- package/src/mcp/tools.ts +7 -7
- package/src/runtime/capabilities.ts +2 -2
- package/src/runtime/cli-errors.ts +3 -3
- package/src/runtime/cli.ts +22 -22
- package/src/runtime/exposure.ts +2 -2
- package/src/runtime/invoke.test.ts +6 -6
- package/src/server/context.ts +3 -3
- package/src/server/overrides.ts +3 -3
- package/src/skill/generate.ts +5 -5
- package/src/skill/hint.ts +1 -1
- package/src/skill/install.ts +2 -2
- package/src/skill/naming.ts +1 -1
- package/src/test/fixtures.ts +2 -2
- package/src/test/integration/config.test.ts +3 -3
- package/src/test/integration/http.test.ts +10 -10
- package/src/test/integration/mcp.test.ts +6 -6
package/src/skill/naming.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Agent skill install targets. */
|
|
2
2
|
export type SkillTarget = "cursor" | "claude" | "codex" | "opencode" | "openclaw";
|
|
3
3
|
|
|
4
|
-
import { sanitizeToolSegment } from "
|
|
4
|
+
import { sanitizeToolSegment } from "../mcp/tools.ts";
|
|
5
5
|
|
|
6
6
|
/** Kebab-case skill folder + frontmatter name for agents that require hyphen slugs. */
|
|
7
7
|
export function skillSlug(programKey: string): string {
|
package/src/test/fixtures.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CliProgram } from "
|
|
2
|
-
import { CliFallbackMode, CliOptionKind } from "
|
|
1
|
+
import type { CliProgram } from "../core/types.ts";
|
|
2
|
+
import { CliFallbackMode, CliOptionKind } from "../core/types.ts";
|
|
3
3
|
|
|
4
4
|
export function testProgram(prog: Record<string, unknown> & { key: string; description: string }): CliProgram {
|
|
5
5
|
return { version: "0.0.0", ...prog } as CliProgram;
|
|
@@ -6,9 +6,9 @@ import { expect, test } from "bun:test";
|
|
|
6
6
|
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
9
|
-
import { bootstrapAppConfig } from "
|
|
10
|
-
import { resolveAppConfigPath } from "
|
|
11
|
-
import { mcpRequest, testProgram } from "
|
|
9
|
+
import { bootstrapAppConfig } from "../../config/bootstrap.ts";
|
|
10
|
+
import { resolveAppConfigPath } from "../../config/file.ts";
|
|
11
|
+
import { mcpRequest, testProgram } from "../fixtures.ts";
|
|
12
12
|
|
|
13
13
|
/** Tests that bootstrapAppConfig prefers host env over config file. */
|
|
14
14
|
test("bootstrapAppConfig prefers host env over config file", () => {
|
|
@@ -5,15 +5,15 @@ HTTP API integration tests: routes, tool invocation, CORS, OpenAPI, and validati
|
|
|
5
5
|
import { describe, expect, test } from "bun:test";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { $ } from "bun";
|
|
8
|
-
import { cliValidateProgram } from "
|
|
9
|
-
import { generateOpenApi } from "
|
|
10
|
-
import { API_CORS_HEADERS } from "
|
|
11
|
-
import { handleApiRequest } from "
|
|
12
|
-
import { Cli, CliContext, type CliContext as CliContextType, CliOptionKind, cliErrWithHelp } from "
|
|
13
|
-
import { LogEmitter } from "
|
|
14
|
-
import { createServerRuntime } from "
|
|
15
|
-
import { resolveHttpServeConfig } from "
|
|
16
|
-
import { nestedMcpFixture, testProgram } from "
|
|
8
|
+
import { cliValidateProgram } from "../../core/validate.ts";
|
|
9
|
+
import { generateOpenApi } from "../../http/openapi.ts";
|
|
10
|
+
import { API_CORS_HEADERS } from "../../http/result.ts";
|
|
11
|
+
import { handleApiRequest } from "../../http/server.ts";
|
|
12
|
+
import { Cli, CliContext, type CliContext as CliContextType, CliOptionKind, cliErrWithHelp } from "../../index.ts";
|
|
13
|
+
import { LogEmitter } from "../../log/emitter.ts";
|
|
14
|
+
import { createServerRuntime } from "../../server/context.ts";
|
|
15
|
+
import { resolveHttpServeConfig } from "../../server/overrides.ts";
|
|
16
|
+
import { nestedMcpFixture, testProgram } from "../fixtures.ts";
|
|
17
17
|
|
|
18
18
|
/** Program with HTTP API enabled and handlers that return values. */
|
|
19
19
|
function nestedApiFixture() {
|
|
@@ -175,7 +175,7 @@ describe("httpServer validation", () => {
|
|
|
175
175
|
handler: () => {},
|
|
176
176
|
},
|
|
177
177
|
],
|
|
178
|
-
} as unknown as import("
|
|
178
|
+
} as unknown as import("../../core/types.ts").CliProgram;
|
|
179
179
|
expect(() => cliValidateProgram(root)).toThrow(/httpServer is only supported on the program root/);
|
|
180
180
|
});
|
|
181
181
|
|
|
@@ -5,18 +5,18 @@ Domain-specific regression tests (split from index.test.ts).
|
|
|
5
5
|
import { expect, test } from "bun:test";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { $ } from "bun";
|
|
8
|
-
import { cliSchemaExport } from "
|
|
9
|
-
import { cliValidateProgram } from "
|
|
10
|
-
import type { CliProgram } from "
|
|
11
|
-
import { buildToolCallSuccessFromResponse } from "
|
|
8
|
+
import { cliSchemaExport } from "../../core/schema.ts";
|
|
9
|
+
import { cliValidateProgram } from "../../core/validate.ts";
|
|
10
|
+
import type { CliProgram } from "../../index.ts";
|
|
11
|
+
import { buildToolCallSuccessFromResponse } from "../../mcp/result.ts";
|
|
12
12
|
import {
|
|
13
13
|
collectMcpTools,
|
|
14
14
|
mcpToolCallToArgv,
|
|
15
15
|
mcpToolDescription,
|
|
16
16
|
mcpToolName,
|
|
17
17
|
sanitizeToolSegment,
|
|
18
|
-
} from "
|
|
19
|
-
import { mcpRequest, nestedMcpFixture, testProgram } from "
|
|
18
|
+
} from "../../mcp/tools.ts";
|
|
19
|
+
import { mcpRequest, nestedMcpFixture, testProgram } from "../fixtures.ts";
|
|
20
20
|
|
|
21
21
|
test("sanitizeToolSegment normalizes dotted app keys", () => {
|
|
22
22
|
expect(sanitizeToolSegment("minimal.ts")).toBe("minimal_ts");
|