taskplane 0.21.1 → 0.21.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.
@@ -1675,7 +1675,7 @@ export default function (pi: ExtensionAPI) {
1675
1675
  // TP-063: Run additive migrations before batch start (primary trigger).
1676
1676
  // Non-fatal — failures warn but never block batch execution.
1677
1677
  try {
1678
- const migrationResult = runMigrations(execCtx.repoRoot);
1678
+ const migrationResult = runMigrations(execCtx.repoRoot, undefined, execCtx.pointer?.configRoot);
1679
1679
  if (migrationResult.messages.length > 0) {
1680
1680
  ctx.ui.notify(migrationResult.messages.join("\n"), "info");
1681
1681
  }
@@ -3134,7 +3134,7 @@ export default function (pi: ExtensionAPI) {
3134
3134
  // This ensures migrations run even if the user doesn't invoke /orch.
3135
3135
  // Non-fatal — failures are silently swallowed so startup is never blocked.
3136
3136
  try {
3137
- const migrationResult = runMigrations(execCtx.repoRoot);
3137
+ const migrationResult = runMigrations(execCtx.repoRoot, undefined, execCtx.pointer?.configRoot);
3138
3138
  if (migrationResult.messages.length > 0) {
3139
3139
  ctx.ui.notify(migrationResult.messages.join("\n"), "info");
3140
3140
  }
@@ -31,10 +31,11 @@ export interface Migration {
31
31
  *
32
32
  * @param projectRoot - Project root directory
33
33
  * @param packageRoot - Taskplane package root (for template resolution)
34
+ * @param configRoot - Config root directory (e.g., ".pi" in repo mode, "shared-libs/.taskplane" in workspace mode)
34
35
  * @returns A short message describing what was created, or null if skipped (already exists)
35
36
  * @throws If the migration cannot complete (e.g., missing template source)
36
37
  */
37
- run(projectRoot: string, packageRoot: string): string | null;
38
+ run(projectRoot: string, packageRoot: string, configRoot: string): string | null;
38
39
  }
39
40
 
40
41
  /**
@@ -165,9 +166,9 @@ export function resolvePackageRoot(importMetaUrl?: string): string {
165
166
  export const MIGRATION_REGISTRY: Migration[] = [
166
167
  {
167
168
  id: "add-supervisor-local-template-v1",
168
- description: "Create .pi/agents/supervisor.md from template if missing",
169
- run(projectRoot: string, packageRoot: string): string | null {
170
- const targetPath = join(projectRoot, ".pi", "agents", "supervisor.md");
169
+ description: "Create agents/supervisor.md from template if missing",
170
+ run(projectRoot: string, packageRoot: string, configRoot: string): string | null {
171
+ const targetPath = join(configRoot, "agents", "supervisor.md");
171
172
 
172
173
  // Skip if file already exists — never overwrite
173
174
  if (existsSync(targetPath)) {
@@ -187,7 +188,7 @@ export const MIGRATION_REGISTRY: Migration[] = [
187
188
  mkdirSync(dirname(targetPath), { recursive: true });
188
189
  copyFileSync(templatePath, targetPath);
189
190
 
190
- return "Created .pi/agents/supervisor.md from template";
191
+ return `Created ${targetPath} from template`;
191
192
  },
192
193
  },
193
194
  ];
@@ -213,8 +214,10 @@ export const MIGRATION_REGISTRY: Migration[] = [
213
214
  export function runMigrations(
214
215
  projectRoot: string,
215
216
  packageRoot?: string,
217
+ configRoot?: string,
216
218
  ): MigrationRunResult {
217
219
  const pkgRoot = packageRoot ?? resolvePackageRoot();
220
+ const cfgRoot = configRoot ?? join(projectRoot, ".pi");
218
221
  const result: MigrationRunResult = {
219
222
  applied: [],
220
223
  skipped: [],
@@ -236,7 +239,7 @@ export function runMigrations(
236
239
  }
237
240
 
238
241
  try {
239
- const message = migration.run(projectRoot, pkgRoot);
242
+ const message = migration.run(projectRoot, pkgRoot, cfgRoot);
240
243
 
241
244
  // Record as applied (whether it created something or skipped)
242
245
  migrationState.applied[migration.id] = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.21.1",
3
+ "version": "0.21.2",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",