@anaclumos/taal 2.0.1 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anaclumos/taal",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "CLI tool to sync MCP server configs and Agent Skills across AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {
package/src/mcp.ts CHANGED
@@ -8,7 +8,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
8
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9
9
  import { isError } from "es-toolkit/predicate";
10
10
  import YAML from "yaml";
11
- import { z } from "zod/v4";
11
+ import { z } from "zod";
12
12
  import { collectAndUpdateConfig } from "./commands/collect.js";
13
13
  import { diff } from "./commands/diff.js";
14
14
  import { init } from "./commands/init.js";
@@ -205,10 +205,10 @@ export function createTaalMcpServer() {
205
205
  "taal_init",
206
206
  {
207
207
  description: "Initialize TAAL configuration and collect existing MCPs.",
208
- inputSchema: {
208
+ inputSchema: z.object({
209
209
  baseDir: baseDirSchema,
210
210
  force: forceSchema,
211
- },
211
+ }),
212
212
  },
213
213
  async ({ baseDir, force }) => {
214
214
  try {
@@ -224,10 +224,10 @@ export function createTaalMcpServer() {
224
224
  "taal_config_read",
225
225
  {
226
226
  description: "Read TAAL config.yaml (parsed and optionally raw).",
227
- inputSchema: {
227
+ inputSchema: z.object({
228
228
  baseDir: baseDirSchema,
229
229
  includeRaw: includeRawSchema,
230
- },
230
+ }),
231
231
  },
232
232
  async ({ baseDir, includeRaw }) => {
233
233
  try {
@@ -256,9 +256,9 @@ export function createTaalMcpServer() {
256
256
  {
257
257
  description:
258
258
  "Collect MCP servers from installed providers and merge into config.",
259
- inputSchema: {
259
+ inputSchema: z.object({
260
260
  baseDir: baseDirSchema,
261
- },
261
+ }),
262
262
  },
263
263
  async ({ baseDir }) => {
264
264
  try {
@@ -274,13 +274,13 @@ export function createTaalMcpServer() {
274
274
  "taal_mcp_add",
275
275
  {
276
276
  description: "Add or update an MCP server entry in config.yaml.",
277
- inputSchema: {
277
+ inputSchema: z.object({
278
278
  baseDir: baseDirSchema,
279
279
  createIfMissing: createIfMissingSchema,
280
280
  overwrite: overwriteSchema,
281
281
  name: mcpNameSchema,
282
282
  server: z.object(mcpServerInputSchema),
283
- },
283
+ }),
284
284
  },
285
285
  async ({
286
286
  baseDir,
@@ -331,11 +331,11 @@ export function createTaalMcpServer() {
331
331
  "taal_mcp_delete",
332
332
  {
333
333
  description: "Delete an MCP server entry from config.yaml.",
334
- inputSchema: {
334
+ inputSchema: z.object({
335
335
  baseDir: baseDirSchema,
336
336
  errorIfMissing: errorIfMissingSchema,
337
337
  name: mcpNameSchema,
338
- },
338
+ }),
339
339
  },
340
340
  async ({ baseDir, errorIfMissing, name }) => {
341
341
  try {
@@ -378,11 +378,11 @@ export function createTaalMcpServer() {
378
378
  "taal_skill_path_add",
379
379
  {
380
380
  description: "Add a skills path to config.yaml.",
381
- inputSchema: {
381
+ inputSchema: z.object({
382
382
  baseDir: baseDirSchema,
383
383
  createIfMissing: createIfMissingSchema,
384
384
  path: skillPathSchema,
385
- },
385
+ }),
386
386
  },
387
387
  async ({ baseDir, createIfMissing, path }) => {
388
388
  try {
@@ -424,11 +424,11 @@ export function createTaalMcpServer() {
424
424
  "taal_skill_path_delete",
425
425
  {
426
426
  description: "Remove a skills path from config.yaml.",
427
- inputSchema: {
427
+ inputSchema: z.object({
428
428
  baseDir: baseDirSchema,
429
429
  errorIfMissing: errorIfMissingSchema,
430
430
  path: skillPathSchema,
431
- },
431
+ }),
432
432
  },
433
433
  async ({ baseDir, errorIfMissing, path }) => {
434
434
  try {
@@ -476,9 +476,9 @@ export function createTaalMcpServer() {
476
476
  "taal_validate",
477
477
  {
478
478
  description: "Validate TAAL configuration.",
479
- inputSchema: {
479
+ inputSchema: z.object({
480
480
  baseDir: baseDirSchema,
481
- },
481
+ }),
482
482
  },
483
483
  async ({ baseDir }) => {
484
484
  try {
@@ -494,10 +494,10 @@ export function createTaalMcpServer() {
494
494
  "taal_diff",
495
495
  {
496
496
  description: "Show pending MCP changes without writing.",
497
- inputSchema: {
497
+ inputSchema: z.object({
498
498
  baseDir: baseDirSchema,
499
499
  provider: providerSchema,
500
- },
500
+ }),
501
501
  },
502
502
  async ({ baseDir, provider }) => {
503
503
  try {
@@ -513,10 +513,10 @@ export function createTaalMcpServer() {
513
513
  "taal_sync",
514
514
  {
515
515
  description: "Sync MCP configs and skills to enabled providers.",
516
- inputSchema: {
516
+ inputSchema: z.object({
517
517
  baseDir: baseDirSchema,
518
518
  provider: providerSchema,
519
- },
519
+ }),
520
520
  },
521
521
  async ({ baseDir, provider }) => {
522
522
  try {
@@ -532,9 +532,9 @@ export function createTaalMcpServer() {
532
532
  "taal_list",
533
533
  {
534
534
  description: "List configured MCP servers, skills, and providers.",
535
- inputSchema: {
535
+ inputSchema: z.object({
536
536
  baseDir: baseDirSchema,
537
- },
537
+ }),
538
538
  },
539
539
  async ({ baseDir }) => {
540
540
  try {
@@ -550,9 +550,9 @@ export function createTaalMcpServer() {
550
550
  "taal_providers",
551
551
  {
552
552
  description: "List supported providers and their status.",
553
- inputSchema: {
553
+ inputSchema: z.object({
554
554
  baseDir: baseDirSchema,
555
- },
555
+ }),
556
556
  },
557
557
  async ({ baseDir }) => {
558
558
  try {
@@ -1,7 +1,6 @@
1
1
  import { join } from "node:path";
2
2
  import type { McpServer } from "../config/schema.js";
3
3
  import { BaseProvider } from "./base.js";
4
- import { readConfig, writeConfig as writeConfigUtil } from "./utils.js";
5
4
 
6
5
  export class ClaudeCodeProvider extends BaseProvider {
7
6
  name = "claude-code";
@@ -10,9 +9,6 @@ export class ClaudeCodeProvider extends BaseProvider {
10
9
  mcpKey = "mcpServers";
11
10
  skillsPath = (home: string) => join(home, ".claude", "skills");
12
11
 
13
- private readonly cliConfigPath = (home: string) => join(home, ".claude.json");
14
- private transformedServersCache: Record<string, unknown> = {};
15
-
16
12
  transformMcpServers(
17
13
  servers: Record<string, McpServer>
18
14
  ): Record<string, unknown> {
@@ -37,7 +33,6 @@ export class ClaudeCodeProvider extends BaseProvider {
37
33
  }
38
34
  }
39
35
 
40
- this.transformedServersCache = transformed;
41
36
  return transformed;
42
37
  }
43
38
 
@@ -57,29 +52,4 @@ export class ClaudeCodeProvider extends BaseProvider {
57
52
  enabledMcpjsonServers: mergedEnabled,
58
53
  };
59
54
  }
60
-
61
- async writeConfig(config: unknown, home?: string): Promise<void> {
62
- await super.writeConfig(config, home);
63
-
64
- const homeDir = home || (await import("node:os")).homedir();
65
- const cliPath = this.cliConfigPath(homeDir);
66
- const cliConfig = (await readConfig(cliPath, "json")) as Record<
67
- string,
68
- unknown
69
- >;
70
-
71
- const existingCliServers =
72
- (cliConfig.mcpServers as Record<string, unknown>) || {};
73
- const mergedCliServers = {
74
- ...existingCliServers,
75
- ...this.transformedServersCache,
76
- };
77
-
78
- const newCliConfig = {
79
- ...cliConfig,
80
- mcpServers: mergedCliServers,
81
- };
82
-
83
- writeConfigUtil(cliPath, "json", newCliConfig);
84
- }
85
55
  }