toolcraft 0.0.5 → 0.0.6

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 (146) hide show
  1. package/node_modules/@poe-code/agent-defs/dist/agents/claude-code.d.ts +2 -0
  2. package/node_modules/@poe-code/agent-defs/dist/agents/claude-code.js +15 -0
  3. package/node_modules/@poe-code/agent-defs/dist/agents/claude-desktop.d.ts +2 -0
  4. package/node_modules/@poe-code/agent-defs/dist/agents/claude-desktop.js +13 -0
  5. package/node_modules/@poe-code/agent-defs/dist/agents/codex.d.ts +2 -0
  6. package/node_modules/@poe-code/agent-defs/dist/agents/codex.js +14 -0
  7. package/node_modules/@poe-code/agent-defs/dist/agents/goose.d.ts +2 -0
  8. package/node_modules/@poe-code/agent-defs/dist/agents/goose.js +14 -0
  9. package/node_modules/@poe-code/agent-defs/dist/agents/index.d.ts +7 -0
  10. package/node_modules/@poe-code/agent-defs/dist/agents/index.js +7 -0
  11. package/node_modules/@poe-code/agent-defs/dist/agents/kimi.d.ts +2 -0
  12. package/node_modules/@poe-code/agent-defs/dist/agents/kimi.js +15 -0
  13. package/node_modules/@poe-code/agent-defs/dist/agents/opencode.d.ts +2 -0
  14. package/node_modules/@poe-code/agent-defs/dist/agents/opencode.js +14 -0
  15. package/node_modules/@poe-code/agent-defs/dist/agents/poe-agent.d.ts +2 -0
  16. package/node_modules/@poe-code/agent-defs/dist/agents/poe-agent.js +13 -0
  17. package/node_modules/@poe-code/agent-defs/dist/index.d.ts +5 -0
  18. package/node_modules/@poe-code/agent-defs/dist/index.js +3 -0
  19. package/node_modules/@poe-code/agent-defs/dist/registry.d.ts +3 -0
  20. package/node_modules/@poe-code/agent-defs/dist/registry.js +26 -0
  21. package/node_modules/@poe-code/agent-defs/dist/specifier.d.ts +7 -0
  22. package/node_modules/@poe-code/agent-defs/dist/specifier.js +27 -0
  23. package/node_modules/@poe-code/agent-defs/dist/types.d.ts +16 -0
  24. package/node_modules/@poe-code/agent-defs/dist/types.js +1 -0
  25. package/node_modules/@poe-code/agent-defs/package.json +20 -0
  26. package/node_modules/@poe-code/config-mutations/dist/execution/apply-mutation.d.ts +5 -0
  27. package/node_modules/@poe-code/config-mutations/dist/execution/apply-mutation.js +552 -0
  28. package/node_modules/@poe-code/config-mutations/dist/execution/path-utils.d.ts +17 -0
  29. package/node_modules/@poe-code/config-mutations/dist/execution/path-utils.js +58 -0
  30. package/node_modules/@poe-code/config-mutations/dist/execution/run-mutations.d.ts +7 -0
  31. package/node_modules/@poe-code/config-mutations/dist/execution/run-mutations.js +46 -0
  32. package/node_modules/@poe-code/config-mutations/dist/formats/index.d.ts +13 -0
  33. package/node_modules/@poe-code/config-mutations/dist/formats/index.js +49 -0
  34. package/node_modules/@poe-code/config-mutations/dist/formats/json.d.ts +31 -0
  35. package/node_modules/@poe-code/config-mutations/dist/formats/json.js +140 -0
  36. package/node_modules/@poe-code/config-mutations/dist/formats/toml.d.ts +2 -0
  37. package/node_modules/@poe-code/config-mutations/dist/formats/toml.js +72 -0
  38. package/node_modules/@poe-code/config-mutations/dist/formats/yaml.d.ts +2 -0
  39. package/node_modules/@poe-code/config-mutations/dist/formats/yaml.js +73 -0
  40. package/node_modules/@poe-code/config-mutations/dist/fs-utils.d.ts +18 -0
  41. package/node_modules/@poe-code/config-mutations/dist/fs-utils.js +45 -0
  42. package/node_modules/@poe-code/config-mutations/dist/index.d.ts +8 -0
  43. package/node_modules/@poe-code/config-mutations/dist/index.js +8 -0
  44. package/node_modules/@poe-code/config-mutations/dist/mutations/config-mutation.d.ts +47 -0
  45. package/node_modules/@poe-code/config-mutations/dist/mutations/config-mutation.js +34 -0
  46. package/node_modules/@poe-code/config-mutations/dist/mutations/file-mutation.d.ts +52 -0
  47. package/node_modules/@poe-code/config-mutations/dist/mutations/file-mutation.js +46 -0
  48. package/node_modules/@poe-code/config-mutations/dist/mutations/template-mutation.d.ts +40 -0
  49. package/node_modules/@poe-code/config-mutations/dist/mutations/template-mutation.js +32 -0
  50. package/node_modules/@poe-code/config-mutations/dist/template/render.d.ts +7 -0
  51. package/node_modules/@poe-code/config-mutations/dist/template/render.js +28 -0
  52. package/node_modules/@poe-code/config-mutations/dist/testing/format-utils.d.ts +7 -0
  53. package/node_modules/@poe-code/config-mutations/dist/testing/format-utils.js +21 -0
  54. package/node_modules/@poe-code/config-mutations/dist/testing/index.d.ts +3 -0
  55. package/node_modules/@poe-code/config-mutations/dist/testing/index.js +2 -0
  56. package/node_modules/@poe-code/config-mutations/dist/testing/mock-fs.d.ts +25 -0
  57. package/node_modules/@poe-code/config-mutations/dist/testing/mock-fs.js +170 -0
  58. package/node_modules/@poe-code/config-mutations/dist/types.d.ts +156 -0
  59. package/node_modules/@poe-code/config-mutations/dist/types.js +6 -0
  60. package/node_modules/@poe-code/config-mutations/package.json +33 -0
  61. package/node_modules/@poe-code/file-lock/README.md +52 -0
  62. package/node_modules/@poe-code/file-lock/dist/index.d.ts +1 -0
  63. package/node_modules/@poe-code/file-lock/dist/index.js +1 -0
  64. package/node_modules/@poe-code/file-lock/dist/lock.d.ts +27 -0
  65. package/node_modules/@poe-code/file-lock/dist/lock.js +203 -0
  66. package/node_modules/@poe-code/file-lock/package.json +23 -0
  67. package/node_modules/auth-store/README.md +47 -0
  68. package/node_modules/auth-store/dist/create-secret-store.d.ts +2 -0
  69. package/node_modules/auth-store/dist/create-secret-store.js +35 -0
  70. package/node_modules/auth-store/dist/encrypted-file-store.d.ts +39 -0
  71. package/node_modules/auth-store/dist/encrypted-file-store.js +156 -0
  72. package/node_modules/auth-store/dist/index.d.ts +7 -0
  73. package/node_modules/auth-store/dist/index.js +4 -0
  74. package/node_modules/auth-store/dist/keychain-store.d.ts +22 -0
  75. package/node_modules/auth-store/dist/keychain-store.js +111 -0
  76. package/node_modules/auth-store/dist/provider-store.d.ts +10 -0
  77. package/node_modules/auth-store/dist/provider-store.js +28 -0
  78. package/node_modules/auth-store/dist/types.d.ts +20 -0
  79. package/node_modules/auth-store/dist/types.js +1 -0
  80. package/node_modules/auth-store/package.json +25 -0
  81. package/node_modules/mcp-oauth/README.md +31 -0
  82. package/node_modules/mcp-oauth/dist/client/auth-store-session-store.d.ts +14 -0
  83. package/node_modules/mcp-oauth/dist/client/auth-store-session-store.js +97 -0
  84. package/node_modules/mcp-oauth/dist/client/authorization-state.d.ts +8 -0
  85. package/node_modules/mcp-oauth/dist/client/authorization-state.js +34 -0
  86. package/node_modules/mcp-oauth/dist/client/default-oauth-client-provider.d.ts +3 -0
  87. package/node_modules/mcp-oauth/dist/client/default-oauth-client-provider.js +491 -0
  88. package/node_modules/mcp-oauth/dist/client/loopback-authorization.d.ts +20 -0
  89. package/node_modules/mcp-oauth/dist/client/loopback-authorization.js +169 -0
  90. package/node_modules/mcp-oauth/dist/client/pkce.d.ts +2 -0
  91. package/node_modules/mcp-oauth/dist/client/pkce.js +7 -0
  92. package/node_modules/mcp-oauth/dist/client/token-endpoint.d.ts +40 -0
  93. package/node_modules/mcp-oauth/dist/client/token-endpoint.js +143 -0
  94. package/node_modules/mcp-oauth/dist/client/types.d.ts +113 -0
  95. package/node_modules/mcp-oauth/dist/client/types.js +1 -0
  96. package/node_modules/mcp-oauth/dist/index.d.ts +10 -0
  97. package/node_modules/mcp-oauth/dist/index.js +7 -0
  98. package/node_modules/mcp-oauth/dist/resource-indicator.d.ts +1 -0
  99. package/node_modules/mcp-oauth/dist/resource-indicator.js +11 -0
  100. package/node_modules/mcp-oauth/dist/server/jwks-token-verifier.d.ts +27 -0
  101. package/node_modules/mcp-oauth/dist/server/jwks-token-verifier.js +259 -0
  102. package/node_modules/mcp-oauth/dist/types.compile-check.d.ts +1 -0
  103. package/node_modules/mcp-oauth/dist/types.compile-check.js +22 -0
  104. package/node_modules/mcp-oauth/package.json +31 -0
  105. package/node_modules/tiny-mcp-client/.turbo/turbo-build.log +4 -0
  106. package/node_modules/tiny-mcp-client/dist/index.d.ts +2 -0
  107. package/node_modules/tiny-mcp-client/dist/index.js +1 -0
  108. package/node_modules/tiny-mcp-client/dist/internal.d.ts +547 -0
  109. package/node_modules/tiny-mcp-client/dist/internal.js +2404 -0
  110. package/node_modules/tiny-mcp-client/dist/jsonrpc-types.compile-check.d.ts +1 -0
  111. package/node_modules/tiny-mcp-client/dist/jsonrpc-types.compile-check.js +37 -0
  112. package/node_modules/tiny-mcp-client/dist/mcp-lifecycle-types.compile-check.d.ts +1 -0
  113. package/node_modules/tiny-mcp-client/dist/mcp-lifecycle-types.compile-check.js +50 -0
  114. package/node_modules/tiny-mcp-client/dist/mcp-prompt-types.compile-check.d.ts +1 -0
  115. package/node_modules/tiny-mcp-client/dist/mcp-prompt-types.compile-check.js +50 -0
  116. package/node_modules/tiny-mcp-client/dist/mcp-resource-types.compile-check.d.ts +1 -0
  117. package/node_modules/tiny-mcp-client/dist/mcp-resource-types.compile-check.js +51 -0
  118. package/node_modules/tiny-mcp-client/dist/mcp-tool-types.compile-check.d.ts +1 -0
  119. package/node_modules/tiny-mcp-client/dist/mcp-tool-types.compile-check.js +89 -0
  120. package/node_modules/tiny-mcp-client/dist/mcp-transport-types.compile-check.d.ts +1 -0
  121. package/node_modules/tiny-mcp-client/dist/mcp-transport-types.compile-check.js +56 -0
  122. package/node_modules/tiny-mcp-client/dist/mcp-utility-types.compile-check.d.ts +1 -0
  123. package/node_modules/tiny-mcp-client/dist/mcp-utility-types.compile-check.js +145 -0
  124. package/node_modules/tiny-mcp-client/dist/oauth-discovery.d.ts +24 -0
  125. package/node_modules/tiny-mcp-client/dist/oauth-discovery.js +385 -0
  126. package/node_modules/tiny-mcp-client/package.json +22 -0
  127. package/node_modules/tiny-mcp-client/src/http-oauth.integration.test.ts +823 -0
  128. package/node_modules/tiny-mcp-client/src/http-oauth.test.ts +882 -0
  129. package/node_modules/tiny-mcp-client/src/index.ts +94 -0
  130. package/node_modules/tiny-mcp-client/src/internal.ts +3566 -0
  131. package/node_modules/tiny-mcp-client/src/jsonrpc-types.compile-check.ts +66 -0
  132. package/node_modules/tiny-mcp-client/src/mcp-client-http-transport.integration.test.ts +222 -0
  133. package/node_modules/tiny-mcp-client/src/mcp-client-sdk.test.ts +1294 -0
  134. package/node_modules/tiny-mcp-client/src/mcp-client-tiny-stdio-test-server-tools.test.ts +143 -0
  135. package/node_modules/tiny-mcp-client/src/mcp-lifecycle-types.compile-check.ts +65 -0
  136. package/node_modules/tiny-mcp-client/src/mcp-prompt-types.compile-check.ts +66 -0
  137. package/node_modules/tiny-mcp-client/src/mcp-resource-types.compile-check.ts +70 -0
  138. package/node_modules/tiny-mcp-client/src/mcp-tool-types.compile-check.ts +117 -0
  139. package/node_modules/tiny-mcp-client/src/mcp-transport-types.compile-check.ts +75 -0
  140. package/node_modules/tiny-mcp-client/src/mcp-utility-types.compile-check.ts +181 -0
  141. package/node_modules/tiny-mcp-client/src/mock-servers.test.ts +980 -0
  142. package/node_modules/tiny-mcp-client/src/oauth-discovery.ts +583 -0
  143. package/node_modules/tiny-mcp-client/src/transports.test.ts +8139 -0
  144. package/node_modules/tiny-mcp-client/src/utilities.test.ts +372 -0
  145. package/node_modules/tiny-mcp-client/tsconfig.json +11 -0
  146. package/package.json +24 -11
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "../types.js";
2
+ export declare const claudeCodeAgent: AgentDefinition;
@@ -0,0 +1,15 @@
1
+ export const claudeCodeAgent = {
2
+ id: "claude-code",
3
+ name: "claude-code",
4
+ label: "Claude Code",
5
+ summary: "Configure Claude Code to route through Poe.",
6
+ aliases: ["claude"],
7
+ binaryName: "claude",
8
+ configPath: "~/.claude/settings.json",
9
+ branding: {
10
+ colors: {
11
+ dark: "#C15F3C",
12
+ light: "#C15F3C"
13
+ }
14
+ }
15
+ };
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "../types.js";
2
+ export declare const claudeDesktopAgent: AgentDefinition;
@@ -0,0 +1,13 @@
1
+ export const claudeDesktopAgent = {
2
+ id: "claude-desktop",
3
+ name: "claude-desktop",
4
+ label: "Claude Desktop",
5
+ summary: "Anthropic's official desktop application for Claude",
6
+ configPath: "~/.claude/settings.json",
7
+ branding: {
8
+ colors: {
9
+ dark: "#D97757",
10
+ light: "#D97757"
11
+ }
12
+ }
13
+ };
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "../types.js";
2
+ export declare const codexAgent: AgentDefinition;
@@ -0,0 +1,14 @@
1
+ export const codexAgent = {
2
+ id: "codex",
3
+ name: "codex",
4
+ label: "Codex",
5
+ summary: "Configure Codex to use Poe as the model provider.",
6
+ binaryName: "codex",
7
+ configPath: "~/.codex/config.toml",
8
+ branding: {
9
+ colors: {
10
+ dark: "#D5D9DF",
11
+ light: "#7A7F86"
12
+ }
13
+ }
14
+ };
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "../types.js";
2
+ export declare const gooseAgent: AgentDefinition;
@@ -0,0 +1,14 @@
1
+ export const gooseAgent = {
2
+ id: "goose",
3
+ name: "goose",
4
+ label: "Goose",
5
+ summary: "Block's open-source AI agent with ACP support.",
6
+ binaryName: "goose",
7
+ configPath: "~/.config/goose/config.yaml",
8
+ branding: {
9
+ colors: {
10
+ dark: "#FF6B35",
11
+ light: "#E85D26"
12
+ }
13
+ }
14
+ };
@@ -0,0 +1,7 @@
1
+ export { claudeCodeAgent } from "./claude-code.js";
2
+ export { claudeDesktopAgent } from "./claude-desktop.js";
3
+ export { codexAgent } from "./codex.js";
4
+ export { openCodeAgent } from "./opencode.js";
5
+ export { kimiAgent } from "./kimi.js";
6
+ export { gooseAgent } from "./goose.js";
7
+ export { poeAgentAgent } from "./poe-agent.js";
@@ -0,0 +1,7 @@
1
+ export { claudeCodeAgent } from "./claude-code.js";
2
+ export { claudeDesktopAgent } from "./claude-desktop.js";
3
+ export { codexAgent } from "./codex.js";
4
+ export { openCodeAgent } from "./opencode.js";
5
+ export { kimiAgent } from "./kimi.js";
6
+ export { gooseAgent } from "./goose.js";
7
+ export { poeAgentAgent } from "./poe-agent.js";
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "../types.js";
2
+ export declare const kimiAgent: AgentDefinition;
@@ -0,0 +1,15 @@
1
+ export const kimiAgent = {
2
+ id: "kimi",
3
+ name: "kimi",
4
+ label: "Kimi",
5
+ summary: "Configure Kimi CLI to use Poe API",
6
+ aliases: ["kimi-cli"],
7
+ binaryName: "kimi",
8
+ configPath: "~/.kimi/config.toml",
9
+ branding: {
10
+ colors: {
11
+ dark: "#7B68EE",
12
+ light: "#6A5ACD"
13
+ }
14
+ }
15
+ };
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "../types.js";
2
+ export declare const openCodeAgent: AgentDefinition;
@@ -0,0 +1,14 @@
1
+ export const openCodeAgent = {
2
+ id: "opencode",
3
+ name: "opencode",
4
+ label: "OpenCode CLI",
5
+ summary: "Configure OpenCode CLI to use the Poe API.",
6
+ binaryName: "opencode",
7
+ configPath: "~/.config/opencode/config.json",
8
+ branding: {
9
+ colors: {
10
+ dark: "#4A4F55",
11
+ light: "#2F3338"
12
+ }
13
+ }
14
+ };
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "../types.js";
2
+ export declare const poeAgentAgent: AgentDefinition;
@@ -0,0 +1,13 @@
1
+ export const poeAgentAgent = {
2
+ id: "poe-agent",
3
+ name: "poe-agent",
4
+ label: "Poe Agent",
5
+ summary: "Run one-shot prompts with the built-in Poe agent runtime.",
6
+ configPath: "~/.poe-code/config.json",
7
+ branding: {
8
+ colors: {
9
+ dark: "#A465F7",
10
+ light: "#7A3FD3"
11
+ }
12
+ }
13
+ };
@@ -0,0 +1,5 @@
1
+ export type { AgentDefinition } from "./types.js";
2
+ export type { AgentSpecifier } from "./specifier.js";
3
+ export { claudeCodeAgent, claudeDesktopAgent, codexAgent, openCodeAgent, kimiAgent, gooseAgent, poeAgentAgent } from "./agents/index.js";
4
+ export { allAgents, resolveAgentId } from "./registry.js";
5
+ export { parseAgentSpecifier, formatAgentSpecifier, normalizeAgentId } from "./specifier.js";
@@ -0,0 +1,3 @@
1
+ export { claudeCodeAgent, claudeDesktopAgent, codexAgent, openCodeAgent, kimiAgent, gooseAgent, poeAgentAgent } from "./agents/index.js";
2
+ export { allAgents, resolveAgentId } from "./registry.js";
3
+ export { parseAgentSpecifier, formatAgentSpecifier, normalizeAgentId } from "./specifier.js";
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition } from "./types.js";
2
+ export declare const allAgents: AgentDefinition[];
3
+ export declare function resolveAgentId(input: string): string | undefined;
@@ -0,0 +1,26 @@
1
+ import { claudeCodeAgent, claudeDesktopAgent, codexAgent, openCodeAgent, kimiAgent, gooseAgent, poeAgentAgent } from "./agents/index.js";
2
+ export const allAgents = [
3
+ claudeCodeAgent,
4
+ claudeDesktopAgent,
5
+ codexAgent,
6
+ openCodeAgent,
7
+ kimiAgent,
8
+ gooseAgent,
9
+ poeAgentAgent
10
+ ];
11
+ const lookup = new Map();
12
+ for (const agent of allAgents) {
13
+ const values = [agent.id, agent.name, ...(agent.aliases ?? [])];
14
+ for (const value of values) {
15
+ const normalized = value.toLowerCase();
16
+ if (!lookup.has(normalized)) {
17
+ lookup.set(normalized, agent.id);
18
+ }
19
+ }
20
+ }
21
+ export function resolveAgentId(input) {
22
+ if (!input) {
23
+ return undefined;
24
+ }
25
+ return lookup.get(input.toLowerCase());
26
+ }
@@ -0,0 +1,7 @@
1
+ export interface AgentSpecifier {
2
+ agent: string;
3
+ model?: string;
4
+ }
5
+ export declare function parseAgentSpecifier(input: string): AgentSpecifier;
6
+ export declare function formatAgentSpecifier(specifier: AgentSpecifier): string;
7
+ export declare function normalizeAgentId(input: string): string;
@@ -0,0 +1,27 @@
1
+ import { resolveAgentId } from "./registry.js";
2
+ export function parseAgentSpecifier(input) {
3
+ const colonIndex = input.indexOf(":");
4
+ if (colonIndex === -1) {
5
+ return { agent: input.trim() };
6
+ }
7
+ const agent = input.slice(0, colonIndex).trim();
8
+ const model = input.slice(colonIndex + 1).trim();
9
+ return {
10
+ agent,
11
+ ...(model.length > 0 ? { model } : {}),
12
+ };
13
+ }
14
+ export function formatAgentSpecifier(specifier) {
15
+ if (specifier.model) {
16
+ return `${specifier.agent}:${specifier.model}`;
17
+ }
18
+ return specifier.agent;
19
+ }
20
+ export function normalizeAgentId(input) {
21
+ const specifier = parseAgentSpecifier(input.trim());
22
+ const agent = resolveAgentId(specifier.agent) ?? specifier.agent;
23
+ return formatAgentSpecifier({
24
+ agent,
25
+ model: specifier.model
26
+ });
27
+ }
@@ -0,0 +1,16 @@
1
+ export interface AgentDefinition {
2
+ id: string;
3
+ name: string;
4
+ label: string;
5
+ summary: string;
6
+ aliases?: string[];
7
+ /** Binary name for CLI agents. Optional for GUI-only apps like Claude Desktop. */
8
+ binaryName?: string;
9
+ configPath: string;
10
+ branding: {
11
+ colors: {
12
+ dark: string;
13
+ light: string;
14
+ };
15
+ };
16
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@poe-code/agent-defs",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "build": "tsc"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ]
20
+ }
@@ -0,0 +1,5 @@
1
+ import type { Mutation, MutationContext, MutationOutcome, MutationDetails, MutationOptions } from "../types.js";
2
+ export declare function applyMutation(mutation: Mutation, context: MutationContext, options: MutationOptions): Promise<{
3
+ outcome: MutationOutcome;
4
+ details: MutationDetails;
5
+ }>;