argsbarg 6.1.6 → 6.1.8

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 (139) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/docs/README.md +1 -1
  3. package/docs/cli-program.md +3 -3
  4. package/docs/config-schema.md +12 -9
  5. package/docs/decisions.md +1 -1
  6. package/docs/json-schema-subset.md +38 -12
  7. package/docs/output-schema.md +1 -1
  8. package/package.json +3 -2
  9. package/src/builtins/builtins.test.ts +4 -4
  10. package/src/builtins/completion-bash.ts +1 -1
  11. package/src/builtins/completion-fish.ts +1 -1
  12. package/src/builtins/completion-group.ts +3 -3
  13. package/src/builtins/completion-zsh.ts +1 -1
  14. package/src/builtins/config.test.ts +3 -3
  15. package/src/builtins/config.ts +9 -9
  16. package/src/builtins/configure-copy.ts +2 -2
  17. package/src/builtins/configure.ts +3 -3
  18. package/src/builtins/dispatch.ts +10 -10
  19. package/src/builtins/export.ts +4 -4
  20. package/src/builtins/http.ts +5 -5
  21. package/src/builtins/mcp.ts +3 -3
  22. package/src/builtins/presentation.ts +5 -5
  23. package/src/builtins/registry.ts +3 -3
  24. package/src/builtins/scopes.ts +2 -2
  25. package/src/builtins/version.ts +1 -1
  26. package/src/cli-tool/full-example-capabilities.test.ts +2 -2
  27. package/src/cli-tool/main.ts +1 -1
  28. package/src/cli-tool/program.ts +1 -1
  29. package/src/cli-tool/prompt.ts +1 -1
  30. package/src/config/bindings.test.ts +1 -1
  31. package/src/config/bindings.ts +1 -1
  32. package/src/config/bootstrap.test.ts +1 -1
  33. package/src/config/bootstrap.ts +3 -3
  34. package/src/config/context.test.ts +1 -1
  35. package/src/config/context.ts +1 -1
  36. package/src/config/entry.ts +1 -1
  37. package/src/config/file.test.ts +1 -1
  38. package/src/config/file.ts +3 -3
  39. package/src/config/manifest.ts +1 -1
  40. package/src/config/resolve.test.ts +1 -1
  41. package/src/config/resolve.ts +1 -1
  42. package/src/config/schema.ts +1 -1
  43. package/src/config/validate.test.ts +45 -1
  44. package/src/config/validate.ts +138 -203
  45. package/src/configure/artifacts/binary-placement.test.ts +1 -1
  46. package/src/configure/artifacts/binary-placement.ts +1 -1
  47. package/src/configure/artifacts/gh-release-update.ts +1 -1
  48. package/src/configure/artifacts/install-validate.test.ts +3 -3
  49. package/src/configure/artifacts/mcp-config.ts +1 -1
  50. package/src/configure/artifacts/mcp-opencode.test.ts +1 -1
  51. package/src/configure/artifacts/mcp-opencode.ts +1 -1
  52. package/src/configure/artifacts/paths.ts +5 -5
  53. package/src/configure/artifacts/plan.ts +1 -1
  54. package/src/configure/artifacts/status.test.ts +1 -1
  55. package/src/configure/artifacts/status.ts +2 -2
  56. package/src/configure/artifacts/target-base.ts +1 -1
  57. package/src/configure/artifacts/target-detect.ts +1 -1
  58. package/src/configure/artifacts/target-effective.ts +3 -3
  59. package/src/configure/artifacts/target-mcp-cli.ts +1 -1
  60. package/src/configure/artifacts/target-mcp-json.ts +1 -1
  61. package/src/configure/artifacts/target-plan-build.ts +2 -2
  62. package/src/configure/artifacts/target-scope.ts +3 -3
  63. package/src/configure/artifacts/target-skill.ts +1 -1
  64. package/src/configure/artifacts/target-types.ts +2 -2
  65. package/src/configure/artifacts/targets/app.ts +5 -5
  66. package/src/configure/artifacts/targets/chatgpt-mcp.ts +2 -2
  67. package/src/configure/artifacts/targets/claude-code-mcp.ts +2 -2
  68. package/src/configure/artifacts/targets/claude-desktop-mcp.ts +2 -2
  69. package/src/configure/artifacts/targets/claude-skill.ts +2 -2
  70. package/src/configure/artifacts/targets/codex-mcp.ts +2 -2
  71. package/src/configure/artifacts/targets/codex-skill.ts +2 -2
  72. package/src/configure/artifacts/targets/configure.ts +5 -5
  73. package/src/configure/artifacts/targets/cursor-mcp.ts +2 -2
  74. package/src/configure/artifacts/targets/cursor-skill.ts +2 -2
  75. package/src/configure/artifacts/targets/index.ts +1 -1
  76. package/src/configure/artifacts/targets/openclaw-mcp.ts +2 -2
  77. package/src/configure/artifacts/targets/openclaw-skill.ts +3 -3
  78. package/src/configure/artifacts/targets/opencode-mcp.ts +5 -5
  79. package/src/configure/artifacts/targets/opencode-skill.ts +3 -3
  80. package/src/configure/artifacts/targets.test.ts +1 -1
  81. package/src/configure/artifacts/uninstall.ts +1 -1
  82. package/src/configure/configure.test.ts +9 -9
  83. package/src/configure/index.ts +5 -5
  84. package/src/configure/prompt.ts +1 -1
  85. package/src/core/context.ts +3 -3
  86. package/src/core/json-leaf.test.ts +1 -1
  87. package/src/core/leaf-inputs.test.ts +1 -1
  88. package/src/core/leaf-inputs.ts +2 -2
  89. package/src/core/parse.test.ts +9 -9
  90. package/src/core/parse.ts +2 -2
  91. package/src/core/schema.ts +3 -3
  92. package/src/core/types.ts +1 -1
  93. package/src/core/validate.ts +6 -6
  94. package/src/docs/builtin.ts +3 -3
  95. package/src/docs/cli-guide.test.ts +3 -3
  96. package/src/docs/cli-guide.ts +5 -5
  97. package/src/docs/docs.test.ts +8 -8
  98. package/src/docs/http-guide.ts +7 -7
  99. package/src/docs/mcp-guide.ts +7 -7
  100. package/src/docs/mcp-resources.test.ts +1 -1
  101. package/src/docs/mcp-resources.ts +1 -1
  102. package/src/docs/resolve.ts +4 -4
  103. package/src/docs/save.ts +2 -2
  104. package/src/exports/cli.ts +9 -9
  105. package/src/exports/headless.ts +2 -2
  106. package/src/exports/http.ts +2 -2
  107. package/src/exports/mcp.ts +2 -2
  108. package/src/headless/routing.ts +2 -2
  109. package/src/headless/tool-call.ts +11 -11
  110. package/src/hooks/run.ts +6 -6
  111. package/src/http/openapi.ts +3 -3
  112. package/src/http/paths.ts +1 -1
  113. package/src/http/readiness.ts +3 -3
  114. package/src/http/result.ts +1 -1
  115. package/src/http/routes.ts +4 -4
  116. package/src/http/server.ts +6 -6
  117. package/src/log/emitter.ts +1 -1
  118. package/src/mcp/bundle.ts +2 -2
  119. package/src/mcp/claude.test.ts +1 -1
  120. package/src/mcp/claude.ts +4 -4
  121. package/src/mcp/hidden-mcpb.test.ts +5 -5
  122. package/src/mcp/result.ts +2 -2
  123. package/src/mcp/server.ts +3 -3
  124. package/src/mcp/tools.ts +7 -7
  125. package/src/runtime/capabilities.ts +2 -2
  126. package/src/runtime/cli-errors.ts +3 -3
  127. package/src/runtime/cli.ts +22 -22
  128. package/src/runtime/exposure.ts +2 -2
  129. package/src/runtime/invoke.test.ts +6 -6
  130. package/src/server/context.ts +3 -3
  131. package/src/server/overrides.ts +3 -3
  132. package/src/skill/generate.ts +5 -5
  133. package/src/skill/hint.ts +1 -1
  134. package/src/skill/install.ts +2 -2
  135. package/src/skill/naming.ts +1 -1
  136. package/src/test/fixtures.ts +2 -2
  137. package/src/test/integration/config.test.ts +3 -3
  138. package/src/test/integration/http.test.ts +10 -10
  139. package/src/test/integration/mcp.test.ts +6 -6
@@ -2,17 +2,17 @@
2
2
  This module generates Agent Skills content (SKILL.md + reference.md) from a CLI schema.
3
3
  */
4
4
 
5
- import { defaultConfigEntryTitle } from "~/config/entry.ts";
6
- import { collectOptionDefs } from "~/core/parse.ts";
7
- import { CliOptionKind, type CliProgram } from "~/core/types.ts";
8
- import { generateCliGuide } from "~/docs/cli-guide.ts";
5
+ import { defaultConfigEntryTitle } from "../config/entry.ts";
6
+ import { collectOptionDefs } from "../core/parse.ts";
7
+ import { CliOptionKind, type CliProgram } from "../core/types.ts";
8
+ import { generateCliGuide } from "../docs/cli-guide.ts";
9
9
  import {
10
10
  collectMcpTools,
11
11
  type McpToolDef,
12
12
  mcpServerId,
13
13
  resolveMcpSchemaUri,
14
14
  sanitizeToolSegment,
15
- } from "~/mcp/tools.ts";
15
+ } from "../mcp/tools.ts";
16
16
  import type { SkillTarget } from "./naming.ts";
17
17
  import { skillDirNameForTarget, skillFrontmatterName } from "./naming.ts";
18
18
 
package/src/skill/hint.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CliProgram } from "~/core/types.ts";
1
+ import type { CliProgram } from "../core/types.ts";
2
2
 
3
3
  /** YAML frontmatter block at the start of SKILL.md. */
4
4
  export const MARKDOWN_FRONTMATTER_RE = /^---\r?\n[\s\S]*?\r?\n---\r?\n/;
@@ -1,7 +1,7 @@
1
1
  import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
- import type { CliProgram } from "~/core/types.ts";
4
- import { userHome } from "~/paths/host.ts";
3
+ import type { CliProgram } from "../core/types.ts";
4
+ import { userHome } from "../paths/host.ts";
5
5
  import { generateSkillBundle, type SkillTarget } from "./generate.ts";
6
6
  import { applySkillInstallHints } from "./hint.ts";
7
7
 
@@ -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 "~/mcp/tools.ts";
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 {
@@ -1,5 +1,5 @@
1
- import type { CliProgram } from "~/core/types.ts";
2
- import { CliFallbackMode, CliOptionKind } from "~/core/types.ts";
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 "~/config/bootstrap.ts";
10
- import { resolveAppConfigPath } from "~/config/file.ts";
11
- import { mcpRequest, testProgram } from "~/test/fixtures.ts";
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 "~/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";
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 "~/test/fixtures.ts";
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("~/core/types.ts").CliProgram;
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 "~/core/schema.ts";
9
- import { cliValidateProgram } from "~/core/validate.ts";
10
- import type { CliProgram } from "~/index";
11
- import { buildToolCallSuccessFromResponse } from "~/mcp/result.ts";
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 "~/mcp/tools.ts";
19
- import { mcpRequest, nestedMcpFixture, testProgram } from "~/test/fixtures.ts";
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");