Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/remove-lazy-init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@perstack/core": patch
"@perstack/skill-manager": patch
"@perstack/runtime": patch
"@perstack/installer": patch
---

Remove dead `lazyInit` field from schemas, types, and all usages
1 change: 0 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
e2e/perstack-cli/providers.test.ts
e2e/perstack-cli/error-handling.test.ts
e2e/perstack-cli/interactive.test.ts
e2e/perstack-cli/lazy-init.test.ts
e2e/perstack-cli/bundled-base.test.ts
e2e/perstack-cli/versioned-base.test.ts
e2e/perstack-cli/runtime-version.test.ts
Expand Down
2 changes: 0 additions & 2 deletions apps/create-expert/perstack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ pick = ["readTextFile", "writeTextFile", "listDirectory", "think", "attemptCompl
# args = ["-y", "some-mcp-server"]
# requiredEnv = ["API_KEY"]
# rule = "Instructions for using this skill"
# lazyInit = false
```

## Your Workflow
Expand Down Expand Up @@ -115,5 +114,4 @@ description = "Test-run expert definitions to verify they work correctly"
command = "npx"
packageName = "@perstack/create-expert-skill"
requiredEnv = ["PROVIDER_API_KEY"]
lazyInit = true
rule = "After creating or modifying an expert in perstack.toml, use runExpert to test it with a simple query. Review the activities to verify correctness."
1 change: 0 additions & 1 deletion benchmarks/mcp-startup/perstack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ description = "Browser automation capabilities using Firecrawl"
command = "npx"
packageName = "firecrawl-mcp"
requiredEnv = ["FIRECRAWL_API_KEY"]
lazyInit = false
1 change: 0 additions & 1 deletion benchmarks/production-perf/perstack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ pick = ["attemptCompletion"]
type = "mcpStdioSkill"
command = "node"
args = ["../../e2e/fixtures/minimal-mcp-server.mjs"]
lazyInit = false
1 change: 0 additions & 1 deletion docs/references/perstack-toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ requiredEnv = ["API_KEY"]
| `omit` | string[] | No | Tools to exclude (blacklist) |
| `requiredEnv` | string[] | No | Required environment variables |
| `allowedDomains` | string[] | No | Allowed domain patterns for network access |
| `lazyInit` | boolean | No | Delay initialization until first use (default: `false`) |

### MCP SSE Skill

Expand Down
54 changes: 0 additions & 54 deletions e2e/experts/lazy-init.toml

This file was deleted.

1 change: 0 additions & 1 deletion e2e/experts/mixed-tools.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ description = "Web search"
command = "npx"
args = ["-y", "exa-mcp-server"]
requiredEnv = ["EXA_API_KEY"]
lazyInit = false

[experts."e2e-mixed-tools".skills."user-input"]
type = "interactiveSkill"
Expand Down
1 change: 0 additions & 1 deletion e2e/experts/skills.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ description = "Web search"
command = "npx"
args = ["-y", "exa-mcp-server"]
requiredEnv = ["EXA_API_KEY"]
lazyInit = false

[experts."e2e-multi-skill".skills."@perstack/base"]
type = "mcpStdioSkill"
Expand Down
1 change: 0 additions & 1 deletion e2e/experts/special-tools.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ description = "Web search"
command = "npx"
args = ["-y", "exa-mcp-server"]
requiredEnv = ["EXA_API_KEY"]
lazyInit = false

[experts."e2e-special-tools".skills."@perstack/base"]
type = "mcpStdioSkill"
Expand Down
125 changes: 0 additions & 125 deletions e2e/perstack-cli/lazy-init.test.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/src/schemas/expert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const expertSchema = z.object({
pick: [],
omit: [],
requiredEnv: [],
lazyInit: false,
} satisfies SkillWithoutName,
})
.transform((skills) => {
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/schemas/perstack-toml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ export type PerstackConfigSkill =
args?: string[]
requiredEnv?: string[]
allowedDomains?: string[]
lazyInit?: boolean
}
| {
type: "mcpSseSkill"
Expand Down Expand Up @@ -264,7 +263,6 @@ export const perstackConfigSchema = z.object({
args: z.array(z.string()).optional(),
requiredEnv: z.array(z.string()).optional(),
allowedDomains: z.array(domainPatternSchema).optional(),
lazyInit: z.boolean().optional().default(false),
}),
z.object({
type: z.literal("mcpSseSkill"),
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/schemas/skill.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe("@perstack/core: mcpStdioSkillSchema", () => {
expect(result.name).toBe("test-skill")
expect(result.pick).toEqual([])
expect(result.omit).toEqual([])
expect(result.lazyInit).toBe(false)
})

it("applies default values", () => {
Expand All @@ -26,7 +25,6 @@ describe("@perstack/core: mcpStdioSkillSchema", () => {
expect(result.omit).toEqual([])
expect(result.args).toEqual([])
expect(result.requiredEnv).toEqual([])
expect(result.lazyInit).toBe(false)
})
})

Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/schemas/skill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export interface McpStdioSkill {
args: string[]
/** Environment variables required by this skill */
requiredEnv: string[]
/** Whether to delay initialization until first use */
lazyInit: boolean
}

export const mcpStdioSkillSchema = z.object({
Expand All @@ -85,7 +83,6 @@ export const mcpStdioSkillSchema = z.object({
packageName: z.string().optional(),
args: z.array(z.string()).optional().default([]),
requiredEnv: z.array(z.string()).optional().default([]),
lazyInit: z.boolean().optional().default(false),
})
mcpStdioSkillSchema satisfies z.ZodType<McpStdioSkill>

Expand Down
2 changes: 0 additions & 2 deletions packages/installer/src/expert-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export function toRuntimeExpert(key: string, expert: PublishedExpertData): Exper
command: skill.command,
packageName: skill.packageName,
requiredEnv: skill.requiredEnv ?? [],
lazyInit: false,
},
]
case "mcpSseSkill":
Expand All @@ -80,7 +79,6 @@ export function toRuntimeExpert(key: string, expert: PublishedExpertData): Exper
pick: skill.pick ?? [],
omit: skill.omit ?? [],
endpoint: skill.endpoint,
lazyInit: false,
},
]
case "interactiveSkill":
Expand Down
1 change: 0 additions & 1 deletion packages/runtime/src/helpers/resolve-expert.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function createTestExpert(overrides: Partial<Expert> = {}): Expert {
requiredEnv: [],
pick: [],
omit: [],
lazyInit: false,
},
},
delegates: [],
Expand Down
2 changes: 0 additions & 2 deletions packages/runtime/src/helpers/resolve-expert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ function toRuntimeExpert(
command: skill.command,
packageName: skill.packageName,
requiredEnv: skill.requiredEnv ?? [],
lazyInit: false,
},
]
case "mcpSseSkill":
Expand All @@ -104,7 +103,6 @@ function toRuntimeExpert(
pick: skill.pick ?? [],
omit: skill.omit ?? [],
endpoint: skill.endpoint,
lazyInit: false,
},
]
case "interactiveSkill":
Expand Down
3 changes: 1 addition & 2 deletions packages/runtime/src/messages/message.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ describe("@perstack/messages: instruction-message", () => {
requiredEnv: [],
pick: [],
omit: [],
lazyInit: false,

rule: "Always use this skill carefully.",
},
},
Expand Down Expand Up @@ -565,7 +565,6 @@ describe("@perstack/messages: instruction-message", () => {
requiredEnv: [],
pick: [],
omit: [],
lazyInit: false,
},
},
delegates: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function createBaseSkill() {
requiredEnv: [],
pick: [],
omit: [],
lazyInit: false,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function createMockSkill(overrides: Partial<McpStdioSkill> = {}): McpStdioSkill
requiredEnv: [],
pick: [],
omit: [],
lazyInit: false,

...overrides,
} as McpStdioSkill
}
Expand Down
1 change: 0 additions & 1 deletion packages/skill-manager/src/adapters/lockfile-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export class LockfileSkillAdapter extends SkillAdapter {
command: overrideCommand,
packageName: undefined,
args: overrideArgs,
lazyInit: false,
} as McpStdioSkill
}
return skill
Expand Down
Loading