toolcraft 0.0.1 → 0.0.2

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 CHANGED
@@ -7,8 +7,8 @@ Typed command and group definitions built on top of `toolcraft-schema`.
7
7
  ## Usage
8
8
 
9
9
  ```ts
10
- import { defineCommand, defineGroup } from "agent-kit";
11
- import { S } from "agent-kit-schema";
10
+ import { defineCommand, defineGroup } from "toolcraft";
11
+ import { S } from "toolcraft-schema";
12
12
 
13
13
  const deploy = defineCommand({
14
14
  name: "deploy",
@@ -1,4 +1,4 @@
1
- import { S } from "agent-kit-schema";
1
+ import { S } from "toolcraft-schema";
2
2
  import { defineCommand, defineGroup } from "./index.js";
3
3
  import { runCLI } from "./cli.js";
4
4
  const ignoredCommand = defineCommand({
package/dist/cli.js CHANGED
@@ -9,10 +9,10 @@ const RESERVED_SERVICE_NAMES = new Set(["params", "secrets", "fetch", "fs", "env
9
9
  function inferProgramName(argv) {
10
10
  const entrypoint = argv[1];
11
11
  if (typeof entrypoint !== "string" || entrypoint.length === 0) {
12
- return "agent-kit";
12
+ return "toolcraft";
13
13
  }
14
14
  const parsed = path.parse(entrypoint);
15
- return parsed.name.length > 0 ? parsed.name : "agent-kit";
15
+ return parsed.name.length > 0 ? parsed.name : "toolcraft";
16
16
  }
17
17
  function normalizeRoots(roots, argv) {
18
18
  if (!Array.isArray(roots)) {
@@ -1084,7 +1084,7 @@ function createFixtureEnvValues(command) {
1084
1084
  return values;
1085
1085
  }
1086
1086
  async function resolveFixtureRuntime(command, services, requirementOptions) {
1087
- const selector = process.env.AGENT_KIT_FIXTURE;
1087
+ const selector = process.env.TOOLCRAFT_FIXTURE;
1088
1088
  if (selector === undefined || selector.length === 0) {
1089
1089
  return {
1090
1090
  env: createEnv(),
@@ -1,4 +1,4 @@
1
- import { S } from "agent-kit-schema";
1
+ import { S } from "toolcraft-schema";
2
2
  import { defineCommand, defineGroup } from "./index.js";
3
3
  const ignoredScope = ["cli", "sdk"];
4
4
  const ignoredSecrets = {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ObjectSchema, Static } from "agent-kit-schema";
1
+ import type { ObjectSchema, Static } from "toolcraft-schema";
2
2
  import type { LoggerOutput, RenderTableOptions, ThemePalette } from "@poe-code/design-system";
3
3
  type ScopeValue = "cli" | "mcp" | "sdk";
4
4
  type AnyObjectSchema = ObjectSchema<Record<string, never>>;
@@ -160,5 +160,5 @@ export declare function defineGroup<TServices extends object = EmptyServices, TN
160
160
  scope?: TOwnScope;
161
161
  }): Group<TServices> & TypedGroupMetadata<TServices, TName, TChildren, TOwnScope>;
162
162
  export declare function getCommandSourcePath(command: Command<any, any, any, any>): string | undefined;
163
- export { S, toJsonSchema } from "agent-kit-schema";
164
- export type { AnySchema, ArraySchema, BooleanSchema, EnumSchema, JsonSchema, NumberSchema, ObjectSchema, OptionalSchema, Static, StringSchema } from "agent-kit-schema";
163
+ export { S, toJsonSchema } from "toolcraft-schema";
164
+ export type { AnySchema, ArraySchema, BooleanSchema, EnumSchema, JsonSchema, NumberSchema, ObjectSchema, OptionalSchema, Static, StringSchema } from "toolcraft-schema";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { fileURLToPath } from "node:url";
2
- const commandConfigSymbol = Symbol("agent-kit.command.config");
3
- const groupConfigSymbol = Symbol("agent-kit.group.config");
4
- const commandSourcePathSymbol = Symbol("agent-kit.command.sourcePath");
2
+ const commandConfigSymbol = Symbol("toolcraft.command.config");
3
+ const groupConfigSymbol = Symbol("toolcraft.group.config");
4
+ const commandSourcePathSymbol = Symbol("toolcraft.command.sourcePath");
5
5
  export class UserError extends Error {
6
6
  constructor(message) {
7
7
  super(message);
@@ -82,9 +82,9 @@ function inferCommandSourcePath() {
82
82
  if (candidate === undefined) {
83
83
  continue;
84
84
  }
85
- if (candidate.includes("/packages/agent-kit/src/index.ts") ||
86
- candidate.includes("/packages/agent-kit/dist/index.js") ||
87
- candidate.includes("/node_modules/agent-kit/dist/index.js")) {
85
+ if (candidate.includes("/packages/toolcraft/src/index.ts") ||
86
+ candidate.includes("/packages/toolcraft/dist/index.js") ||
87
+ candidate.includes("/node_modules/toolcraft/dist/index.js")) {
88
88
  continue;
89
89
  }
90
90
  return candidate;
@@ -363,4 +363,4 @@ export function defineGroup(config) {
363
363
  export function getCommandSourcePath(command) {
364
364
  return command[commandSourcePathSymbol];
365
365
  }
366
- export { S, toJsonSchema } from "agent-kit-schema";
366
+ export { S, toJsonSchema } from "toolcraft-schema";
@@ -1,4 +1,4 @@
1
- import { S } from "agent-kit-schema";
1
+ import { S } from "toolcraft-schema";
2
2
  import { defineCommand, defineGroup } from "./index.js";
3
3
  import { createMCPServer, runMCP } from "./mcp.js";
4
4
  const ignoredRoot = defineGroup({
@@ -15,7 +15,7 @@ const ignoredRoot = defineGroup({
15
15
  ],
16
16
  });
17
17
  const ignoredOptions = {
18
- name: "cmdkit-test",
18
+ name: "toolcraft-test",
19
19
  version: "1.0.0",
20
20
  tools: ["usage"],
21
21
  casing: "snake",
package/dist/mcp.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { access, readFile, writeFile } from "node:fs/promises";
2
2
  import { createServer, JSON_RPC_ERROR_CODES, ToolError, } from "tiny-stdio-mcp-server";
3
- import { toJsonSchema } from "agent-kit-schema";
3
+ import { toJsonSchema } from "toolcraft-schema";
4
4
  import { UserError, assertCommandRequirements, resolveCommandSecrets } from "./index.js";
5
5
  import { getExpectedNumberDescription, isValidNumberSchemaValue } from "./number-schema.js";
6
6
  import { filterSchemaForScope } from "./schema-scope.js";
@@ -1,3 +1,3 @@
1
- import type { NumberSchema } from "agent-kit-schema";
1
+ import type { NumberSchema } from "toolcraft-schema";
2
2
  export declare function isValidNumberSchemaValue(value: unknown, schema: NumberSchema): value is number;
3
3
  export declare function getExpectedNumberDescription(schema: NumberSchema): string;
@@ -1,4 +1,4 @@
1
- import type { AnySchema } from "agent-kit-schema";
1
+ import type { AnySchema } from "toolcraft-schema";
2
2
  type SchemaScope = "cli" | "mcp" | "sdk";
3
3
  export declare function filterSchemaForScope(schema: AnySchema, scope: SchemaScope): AnySchema | undefined;
4
4
  export {};
@@ -1,4 +1,4 @@
1
- import { S } from "agent-kit-schema";
1
+ import { S } from "toolcraft-schema";
2
2
  import { defineCommand, defineGroup } from "./index.js";
3
3
  import { createSDK } from "./sdk.js";
4
4
  const ignoredRoot = defineGroup({
package/dist/sdk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ObjectSchema, Static } from "agent-kit-schema";
1
+ import type { ObjectSchema, Static } from "toolcraft-schema";
2
2
  import type { Group, Scope } from "./index.js";
3
3
  type ScopeInput = readonly Scope[] | undefined;
4
4
  type Primitive = string | number | boolean | bigint | symbol | null | undefined;
@@ -1,2 +1,2 @@
1
- export { isCancel } from "@clack/core";
1
+ export { isCancel } from "@clack/prompts";
2
2
  export declare function cancel(msg?: string): void;
@@ -1,5 +1,5 @@
1
1
  import chalk from "chalk";
2
- export { isCancel } from "@clack/core";
2
+ export { isCancel } from "@clack/prompts";
3
3
  import { resolveOutputFormat } from "../../internal/output-format.js";
4
4
  export function cancel(msg = "") {
5
5
  if (resolveOutputFormat() !== "terminal") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "scripts": {
26
26
  "build": "rm -rf dist && tsc",
27
- "test": "cd ../.. && vitest run packages/agent-kit/src/*.test.ts",
28
- "test:unit": "cd ../.. && vitest run packages/agent-kit/src/*.test.ts",
29
- "lint": "cd ../.. && eslint packages/agent-kit/src --ext ts && tsc -p packages/agent-kit/tsconfig.json --noEmit",
27
+ "test": "cd ../.. && vitest run packages/toolcraft/src/*.test.ts",
28
+ "test:unit": "cd ../.. && vitest run packages/toolcraft/src/*.test.ts",
29
+ "lint": "cd ../.. && eslint packages/toolcraft/src --ext ts && tsc -p packages/toolcraft/tsconfig.json --noEmit",
30
30
  "prepack": "node ../../scripts/manage-bundled-workspace-deps.mjs prepare . @poe-code/design-system",
31
31
  "postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . @poe-code/design-system"
32
32
  },
@@ -34,11 +34,11 @@
34
34
  "@clack/core": "^1.0.0",
35
35
  "@clack/prompts": "^1.0.0",
36
36
  "@poe-code/design-system": "^0.0.1",
37
- "toolcraft-schema": "^0.0.1",
38
37
  "chalk": "^5.6.2",
39
38
  "commander": "^14.0.3",
40
39
  "console-table-printer": "^2.15.0",
41
- "tiny-stdio-mcp-server": "^0.1.0"
40
+ "tiny-stdio-mcp-server": "^0.1.0",
41
+ "toolcraft-schema": "^0.0.2"
42
42
  },
43
43
  "files": [
44
44
  "dist"
@@ -49,7 +49,7 @@
49
49
  "repository": {
50
50
  "type": "git",
51
51
  "url": "git+https://github.com/poe-platform/poe-code.git",
52
- "directory": "packages/agent-kit"
52
+ "directory": "packages/toolcraft"
53
53
  },
54
54
  "bundleDependencies": [
55
55
  "@poe-code/design-system"