fix: read version from package.json instead of hardcoded 0.1.0 (closes #3)
- Read CLI version dynamically from package.json via createRequire - Fix unused variable lint errors (branch destructuring) - Bump version to 0.2.3 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
faae1dd2b5
commit
304044a2f1
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "takt",
|
"name": "takt",
|
||||||
"version": "0.2.5",
|
"version": "0.2.3",
|
||||||
"description": "TAKT: Task Agent Koordination Tool - AI Agent Workflow Orchestration",
|
"description": "TAKT: Task Agent Koordination Tool - AI Agent Workflow Orchestration",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
10
src/cli.ts
10
src/cli.ts
@ -12,6 +12,7 @@
|
|||||||
* takt /config - Select permission mode interactively
|
* takt /config - Select permission mode interactively
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { createRequire } from 'node:module';
|
||||||
import { Command } from 'commander';
|
import { Command } from 'commander';
|
||||||
import { resolve } from 'node:path';
|
import { resolve } from 'node:path';
|
||||||
import {
|
import {
|
||||||
@ -42,6 +43,9 @@ import { summarizeTaskName } from './task/summarize.js';
|
|||||||
import { DEFAULT_WORKFLOW_NAME } from './constants.js';
|
import { DEFAULT_WORKFLOW_NAME } from './constants.js';
|
||||||
import { checkForUpdates } from './utils/updateNotifier.js';
|
import { checkForUpdates } from './utils/updateNotifier.js';
|
||||||
|
|
||||||
|
const require = createRequire(import.meta.url);
|
||||||
|
const { version: cliVersion } = require('../package.json') as { version: string };
|
||||||
|
|
||||||
const log = createLogger('cli');
|
const log = createLogger('cli');
|
||||||
|
|
||||||
checkForUpdates();
|
checkForUpdates();
|
||||||
@ -85,7 +89,7 @@ const program = new Command();
|
|||||||
program
|
program
|
||||||
.name('takt')
|
.name('takt')
|
||||||
.description('TAKT: Task Agent Koordination Tool')
|
.description('TAKT: Task Agent Koordination Tool')
|
||||||
.version('0.1.0');
|
.version(cliVersion);
|
||||||
|
|
||||||
program
|
program
|
||||||
.argument('[task]', 'Task to execute or slash command')
|
.argument('[task]', 'Task to execute or slash command')
|
||||||
@ -119,7 +123,7 @@ program
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.info('TAKT CLI starting', {
|
log.info('TAKT CLI starting', {
|
||||||
version: '0.1.0',
|
version: cliVersion,
|
||||||
cwd,
|
cwd,
|
||||||
task: task || null,
|
task: task || null,
|
||||||
verbose,
|
verbose,
|
||||||
@ -226,7 +230,7 @@ program
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ask whether to create a worktree
|
// Ask whether to create a worktree
|
||||||
const { execCwd, isWorktree, branch } = await confirmAndCreateWorktree(cwd, task);
|
const { execCwd, isWorktree } = await confirmAndCreateWorktree(cwd, task);
|
||||||
|
|
||||||
log.info('Starting task execution', { task, workflow: selectedWorkflow, worktree: isWorktree });
|
log.info('Starting task execution', { task, workflow: selectedWorkflow, worktree: isWorktree });
|
||||||
const taskSuccess = await executeTask(task, execCwd, selectedWorkflow, cwd);
|
const taskSuccess = await executeTask(task, execCwd, selectedWorkflow, cwd);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ export async function executeAndCompleteTask(
|
|||||||
const executionLog: string[] = [];
|
const executionLog: string[] = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { execCwd, execWorkflow, isWorktree, branch } = await resolveTaskExecution(task, cwd, workflowName);
|
const { execCwd, execWorkflow, isWorktree } = await resolveTaskExecution(task, cwd, workflowName);
|
||||||
|
|
||||||
// cwd is always the project root; pass it as projectCwd so reports/sessions go there
|
// cwd is always the project root; pass it as projectCwd so reports/sessions go there
|
||||||
const taskSuccess = await executeTask(task.content, execCwd, execWorkflow, cwd);
|
const taskSuccess = await executeTask(task.content, execCwd, execWorkflow, cwd);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user