thoth-agents 0.3.8 → 0.3.10
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/.claude-plugin/marketplace.json +1 -1
- package/README.md +27 -0
- package/dist/agents/prompt-dialects.d.ts +3 -0
- package/dist/{chunk-3WNTCPVK.js → chunk-JBG7XMIG.js} +1291 -290
- package/dist/{chunk-F2K4CS5J.js → chunk-M2WF46BP.js} +186 -128
- package/dist/{chunk-6GQYMWWT.js → chunk-TKIDBRM3.js} +1 -1
- package/dist/cli/commands.d.ts +1 -0
- package/dist/cli/config-io.d.ts +2 -1
- package/dist/cli/index.js +126 -428
- package/dist/cli/install-completion.d.ts +34 -0
- package/dist/cli/install-ledger.d.ts +44 -0
- package/dist/cli/install.d.ts +9 -1
- package/dist/cli/operations/claude-code.d.ts +12 -1
- package/dist/cli/operations/codex.d.ts +16 -0
- package/dist/cli/operations/opencode.d.ts +20 -3
- package/dist/cli/operations/types.d.ts +13 -0
- package/dist/cli/package-version.d.ts +19 -0
- package/dist/cli/tui/index.js +63 -24
- package/dist/harness/core/sdd.d.ts +1 -1
- package/dist/hooks/auto-update-checker/checker.d.ts +0 -5
- package/dist/hooks/auto-update-checker/index.d.ts +1 -2
- package/dist/hooks/auto-update-checker/types.d.ts +0 -1
- package/dist/index.js +98 -251
- package/package.json +1 -1
- package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/agents/orchestrator.md +17 -17
- package/plugin/skills/thoth-archive/SKILL.md +7 -0
- package/plugin/skills/thoth-archive/scripts/archive.mjs +28 -74
- package/plugin/skills/thoth-sdd/references/phases/specify.md +12 -1
- package/plugin/skills/thoth-sdd/scripts/durable-deltas.mjs +158 -0
- package/plugin/skills/thoth-sdd/scripts/validate.mjs +67 -28
- package/plugin/skills/thoth-sdd/templates/spec.md +9 -1
- package/skills/thoth-archive/SKILL.md +7 -0
- package/skills/thoth-archive/scripts/archive.mjs +28 -74
- package/skills/thoth-sdd/references/phases/specify.md +12 -1
- package/skills/thoth-sdd/scripts/durable-deltas.mjs +158 -0
- package/skills/thoth-sdd/scripts/validate.mjs +67 -28
- package/skills/thoth-sdd/templates/spec.md +9 -1
- package/dist/hooks/auto-update-checker/cache.d.ts +0 -7
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type InstallHarnessId, type InstallLedgerOptions, type RecordCompletedInstallResult, recordCompletedInstall } from './install-ledger';
|
|
2
|
+
import { type ThothMemSetupOptions, type ThothMemSetupResult } from './thoth-mem-install';
|
|
3
|
+
export type InstallCompletionLedgerResult = {
|
|
4
|
+
status: 'planned';
|
|
5
|
+
path: string;
|
|
6
|
+
} | {
|
|
7
|
+
status: 'not-attempted';
|
|
8
|
+
path: string;
|
|
9
|
+
} | {
|
|
10
|
+
status: 'recorded';
|
|
11
|
+
path: string;
|
|
12
|
+
repairedInvalidState: boolean;
|
|
13
|
+
backupPath?: string;
|
|
14
|
+
} | {
|
|
15
|
+
status: 'failed';
|
|
16
|
+
path: string;
|
|
17
|
+
error: string;
|
|
18
|
+
};
|
|
19
|
+
export interface HarnessInstallCompletionResult {
|
|
20
|
+
success: boolean;
|
|
21
|
+
provider: ThothMemSetupResult;
|
|
22
|
+
ledger: InstallCompletionLedgerResult;
|
|
23
|
+
error?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface FinalizeHarnessInstallOptions {
|
|
26
|
+
harness: InstallHarnessId;
|
|
27
|
+
version: string;
|
|
28
|
+
dryRun?: boolean;
|
|
29
|
+
cwd: string;
|
|
30
|
+
runThothMemSetup?: (options: ThothMemSetupOptions) => ThothMemSetupResult;
|
|
31
|
+
recordCompletedInstall?: (options: Parameters<typeof recordCompletedInstall>[0]) => RecordCompletedInstallResult;
|
|
32
|
+
ledgerOptions?: InstallLedgerOptions;
|
|
33
|
+
}
|
|
34
|
+
export declare function finalizeHarnessInstall(options: FinalizeHarnessInstallOptions): HarnessInstallCompletionResult;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const INSTALL_LEDGER_SCHEMA_VERSION: 1;
|
|
2
|
+
export type InstallHarnessId = 'opencode' | 'codex' | 'claude';
|
|
3
|
+
export interface InstallLedger {
|
|
4
|
+
schemaVersion: typeof INSTALL_LEDGER_SCHEMA_VERSION;
|
|
5
|
+
harnesses: Partial<Record<InstallHarnessId, {
|
|
6
|
+
version: string;
|
|
7
|
+
}>>;
|
|
8
|
+
}
|
|
9
|
+
export interface InstallLedgerOptions {
|
|
10
|
+
configRoot?: string;
|
|
11
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
12
|
+
homeDir?: string;
|
|
13
|
+
renameFile?: (source: string, destination: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export type InstallLedgerReadResult = {
|
|
16
|
+
status: 'missing';
|
|
17
|
+
path: string;
|
|
18
|
+
} | {
|
|
19
|
+
status: 'valid';
|
|
20
|
+
path: string;
|
|
21
|
+
ledger: InstallLedger;
|
|
22
|
+
} | {
|
|
23
|
+
status: 'invalid';
|
|
24
|
+
path: string;
|
|
25
|
+
error: string;
|
|
26
|
+
};
|
|
27
|
+
export type RecordCompletedInstallResult = {
|
|
28
|
+
success: true;
|
|
29
|
+
path: string;
|
|
30
|
+
ledger: InstallLedger;
|
|
31
|
+
repairedInvalidState: boolean;
|
|
32
|
+
backupPath?: string;
|
|
33
|
+
} | {
|
|
34
|
+
success: false;
|
|
35
|
+
path: string;
|
|
36
|
+
error: string;
|
|
37
|
+
};
|
|
38
|
+
export interface RecordCompletedInstallOptions extends InstallLedgerOptions {
|
|
39
|
+
harness: InstallHarnessId;
|
|
40
|
+
version: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function getInstallLedgerPath(options?: InstallLedgerOptions): string;
|
|
43
|
+
export declare function readInstallLedger(options?: InstallLedgerOptions): InstallLedgerReadResult;
|
|
44
|
+
export declare function recordCompletedInstall(options: RecordCompletedInstallOptions): RecordCompletedInstallResult;
|
package/dist/cli/install.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { updateOpenCodeMainConfig } from './config-manager';
|
|
2
|
+
import { finalizeHarnessInstall } from './install-completion';
|
|
3
|
+
import type { InstallLedgerOptions } from './install-ledger';
|
|
4
|
+
import { type ExecutingPackageVersionResult } from './package-version';
|
|
5
|
+
import type { ThothMemSetupOptions, ThothMemSetupResult } from './thoth-mem-install';
|
|
2
6
|
import type { InstallArgs, InstallConfig } from './types';
|
|
3
7
|
export interface InstallDependencies {
|
|
4
8
|
homeDir?: string;
|
|
5
9
|
opencodeOwnedSkillPackageRoot?: string;
|
|
6
10
|
runThothMemSetup?: (options: ThothMemSetupOptions) => ThothMemSetupResult;
|
|
11
|
+
resolveExecutingPackageVersion?: () => ExecutingPackageVersionResult;
|
|
12
|
+
updateOpenCodeMainConfig?: typeof updateOpenCodeMainConfig;
|
|
13
|
+
finalizeHarnessInstall?: typeof finalizeHarnessInstall;
|
|
14
|
+
installLedgerOptions?: InstallLedgerOptions;
|
|
7
15
|
}
|
|
8
16
|
export declare function createInstallConfig(args: InstallArgs): InstallConfig;
|
|
9
17
|
export declare function install(args: InstallArgs, dependencies?: InstallDependencies): Promise<number>;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { ProviderEvidenceInput } from '../../harness/types';
|
|
2
|
-
import { type ClaudeCommandExecutor } from '../claude-code-install';
|
|
2
|
+
import { applyClaudeCodeSetup, buildClaudeCodeSetupPlan, type ClaudeCommandExecutor } from '../claude-code-install';
|
|
3
3
|
import type { ClaudeCodeInstallScope } from '../claude-code-paths';
|
|
4
|
+
import { type FinalizeHarnessInstallOptions, finalizeHarnessInstall } from '../install-completion';
|
|
5
|
+
import { type InstallLedgerOptions } from '../install-ledger';
|
|
6
|
+
import { type ExecutingPackageVersionResult } from '../package-version';
|
|
7
|
+
import { installRequiredSkill } from '../skills';
|
|
4
8
|
import type { HarnessAction, HarnessStatusReport, ModelConfigInput, ModelRoleInput, OperationApplyResult, OperationContext, OperationPlan } from './types';
|
|
5
9
|
export interface ClaudeCodeOperationContext extends OperationContext {
|
|
6
10
|
scope?: ClaudeCodeInstallScope;
|
|
7
11
|
homeDir?: string;
|
|
8
12
|
packageRoot?: string;
|
|
9
13
|
commandExecutor?: ClaudeCommandExecutor;
|
|
14
|
+
resolveExecutingPackageVersion?: () => ExecutingPackageVersionResult;
|
|
15
|
+
buildClaudeCodeSetupPlan?: typeof buildClaudeCodeSetupPlan;
|
|
16
|
+
applyClaudeCodeSetup?: typeof applyClaudeCodeSetup;
|
|
17
|
+
installRequiredSkill?: typeof installRequiredSkill;
|
|
18
|
+
finalizeHarnessInstall?: (options: FinalizeHarnessInstallOptions) => ReturnType<typeof finalizeHarnessInstall>;
|
|
19
|
+
runThothMemSetup?: FinalizeHarnessInstallOptions['runThothMemSetup'];
|
|
20
|
+
installLedgerOptions?: InstallLedgerOptions;
|
|
10
21
|
}
|
|
11
22
|
export type ClaudeCodeEffortResolution = {
|
|
12
23
|
ok: true;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ProviderEvidenceInput } from '../../harness/types';
|
|
2
|
+
import { applyCodexSetup, buildCodexSetupPlan } from '../codex-install';
|
|
2
3
|
import type { CodexInstallScope } from '../codex-paths';
|
|
4
|
+
import { applyCodexPluginSetup, buildCodexPluginSetupPlan, type CodexCommandExecutor } from '../codex-plugin-install';
|
|
5
|
+
import { type FinalizeHarnessInstallOptions, finalizeHarnessInstall } from '../install-completion';
|
|
6
|
+
import { type InstallLedgerOptions } from '../install-ledger';
|
|
7
|
+
import { type ExecutingPackageVersionResult } from '../package-version';
|
|
8
|
+
import { installRequiredSkill } from '../skills';
|
|
3
9
|
import type { HarnessAction, HarnessStatusReport, ModelConfigInput, ModelRoleInput, OperationApplyResult, OperationContext, OperationPlan } from './types';
|
|
4
10
|
export interface CodexOperationContext extends OperationContext {
|
|
5
11
|
scope?: CodexInstallScope;
|
|
@@ -7,6 +13,16 @@ export interface CodexOperationContext extends OperationContext {
|
|
|
7
13
|
codexHome?: string;
|
|
8
14
|
packageRoot?: string;
|
|
9
15
|
pluginId?: string;
|
|
16
|
+
resolveExecutingPackageVersion?: () => ExecutingPackageVersionResult;
|
|
17
|
+
codexPluginCommandExecutor?: CodexCommandExecutor;
|
|
18
|
+
buildCodexPluginSetupPlan?: typeof buildCodexPluginSetupPlan;
|
|
19
|
+
applyCodexPluginSetup?: typeof applyCodexPluginSetup;
|
|
20
|
+
buildCodexSetupPlan?: typeof buildCodexSetupPlan;
|
|
21
|
+
applyCodexSetup?: typeof applyCodexSetup;
|
|
22
|
+
installRequiredSkill?: typeof installRequiredSkill;
|
|
23
|
+
finalizeHarnessInstall?: (options: FinalizeHarnessInstallOptions) => ReturnType<typeof finalizeHarnessInstall>;
|
|
24
|
+
runThothMemSetup?: FinalizeHarnessInstallOptions['runThothMemSetup'];
|
|
25
|
+
installLedgerOptions?: InstallLedgerOptions;
|
|
10
26
|
}
|
|
11
27
|
export declare const codexOperationAdapter: {
|
|
12
28
|
readonly id: "codex";
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import type { ProviderEvidenceInput } from '../../harness/types';
|
|
2
|
+
import { type OpenCodeMainConfigUpdate, writeLiteConfig } from '../config-io';
|
|
3
|
+
import { type FinalizeHarnessInstallOptions, finalizeHarnessInstall } from '../install-completion';
|
|
4
|
+
import { type InstallLedgerOptions } from '../install-ledger';
|
|
5
|
+
import { type OpenCodeOwnedSkillSyncOptions, type OpenCodeOwnedSkillSyncResult } from '../owned-skills';
|
|
6
|
+
import { type ExecutingPackageVersionResult } from '../package-version';
|
|
7
|
+
import { installRequiredSkill } from '../skills';
|
|
8
|
+
import type { ConfigMergeResult } from '../types';
|
|
2
9
|
import type { HarnessAction, HarnessStatusReport, ModelConfigInput, OperationApplyResult, OperationContext, OperationPlan } from './types';
|
|
10
|
+
export interface OpenCodeOperationContext extends OperationContext {
|
|
11
|
+
resolveExecutingPackageVersion?: () => ExecutingPackageVersionResult;
|
|
12
|
+
updateOpenCodeMainConfig?: (update: OpenCodeMainConfigUpdate) => ConfigMergeResult;
|
|
13
|
+
writeLiteConfig?: typeof writeLiteConfig;
|
|
14
|
+
syncOpenCodeOwnedSkills?: (options: OpenCodeOwnedSkillSyncOptions) => OpenCodeOwnedSkillSyncResult;
|
|
15
|
+
installRequiredSkill?: typeof installRequiredSkill;
|
|
16
|
+
finalizeHarnessInstall?: (options: FinalizeHarnessInstallOptions) => ReturnType<typeof finalizeHarnessInstall>;
|
|
17
|
+
runThothMemSetup?: FinalizeHarnessInstallOptions['runThothMemSetup'];
|
|
18
|
+
installLedgerOptions?: InstallLedgerOptions;
|
|
19
|
+
}
|
|
3
20
|
export declare const opencodeOperationAdapter: {
|
|
4
21
|
readonly id: "opencode";
|
|
5
22
|
readonly displayName: "OpenCode";
|
|
@@ -8,8 +25,8 @@ export declare const opencodeOperationAdapter: {
|
|
|
8
25
|
readonly actions: HarnessAction[];
|
|
9
26
|
};
|
|
10
27
|
export declare function getOpenCodeStatus(context?: OperationContext, evidence?: ProviderEvidenceInput): HarnessStatusReport;
|
|
11
|
-
export declare function buildOpenCodeUpdatePlan(
|
|
12
|
-
export declare function buildOpenCodeSyncPlan(context?:
|
|
13
|
-
export declare function buildOpenCodeInstallPlan(context?:
|
|
28
|
+
export declare function buildOpenCodeUpdatePlan(context?: OpenCodeOperationContext): OperationPlan;
|
|
29
|
+
export declare function buildOpenCodeSyncPlan(context?: OpenCodeOperationContext): OperationPlan;
|
|
30
|
+
export declare function buildOpenCodeInstallPlan(context?: OpenCodeOperationContext): OperationPlan;
|
|
14
31
|
export declare function buildOpenCodeModelPlan(input: ModelConfigInput, _context?: OperationContext): OperationPlan;
|
|
15
32
|
export declare function applyOpenCodePlan(plan: OperationPlan): OperationApplyResult;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { HarnessId, ProviderCapabilityEvidence, ProviderEvidenceInput } from '../../harness/types';
|
|
2
|
+
import type { HarnessInstallCompletionResult } from '../install-completion';
|
|
3
|
+
import { type InstallHarnessId } from '../install-ledger';
|
|
2
4
|
import type { EffortSelection } from '../model-effort';
|
|
3
5
|
export type ManagedState = 'installed' | 'missing' | 'drift' | 'outdated' | 'unknown';
|
|
4
6
|
export type OperationActionKind = 'status' | 'list' | 'install' | 'update' | 'sync' | 'repair' | 'model-config';
|
|
@@ -26,6 +28,17 @@ export interface ManagedTarget {
|
|
|
26
28
|
observed?: string;
|
|
27
29
|
description?: string;
|
|
28
30
|
}
|
|
31
|
+
export declare function getInstallCompletionEvidence(completion: HarnessInstallCompletionResult, options: {
|
|
32
|
+
codePrefix: string;
|
|
33
|
+
version: string;
|
|
34
|
+
fallbackError: string;
|
|
35
|
+
}): {
|
|
36
|
+
targets: ManagedTarget[];
|
|
37
|
+
warnings: OperationWarning[];
|
|
38
|
+
};
|
|
39
|
+
export declare function getCliManagedInstallVersionTarget(harness: InstallHarnessId, context?: Pick<OperationContext, 'env'> & {
|
|
40
|
+
homeDir?: string;
|
|
41
|
+
}): ManagedTarget;
|
|
29
42
|
export interface ManagedSurface {
|
|
30
43
|
id: string;
|
|
31
44
|
label: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type PackageVersionErrorCode = 'package-root-not-found' | 'package-metadata-unreadable' | 'package-metadata-malformed' | 'package-name-mismatch' | 'package-version-invalid';
|
|
2
|
+
export interface PackageVersionError {
|
|
3
|
+
code: PackageVersionErrorCode;
|
|
4
|
+
message: string;
|
|
5
|
+
packageJsonPath?: string;
|
|
6
|
+
}
|
|
7
|
+
export type ExecutingPackageVersionResult = {
|
|
8
|
+
ok: true;
|
|
9
|
+
version: string;
|
|
10
|
+
packageRoot: string;
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
error: PackageVersionError;
|
|
14
|
+
};
|
|
15
|
+
export interface ResolveExecutingPackageVersionOptions {
|
|
16
|
+
moduleUrl?: string | URL;
|
|
17
|
+
}
|
|
18
|
+
export declare function isValidPackageVersion(version: unknown): version is string;
|
|
19
|
+
export declare function resolveExecutingPackageVersion(options?: ResolveExecutingPackageVersionOptions): ExecutingPackageVersionResult;
|
package/dist/cli/tui/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
defaultTuiOperations,
|
|
3
3
|
effortChoicesForModel,
|
|
4
4
|
listOperationHarnesses
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-JBG7XMIG.js";
|
|
6
|
+
import "../../chunk-M2WF46BP.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/tui/index.tsx
|
|
9
9
|
import { render } from "ink";
|
|
@@ -309,6 +309,7 @@ function countByState(report) {
|
|
|
309
309
|
);
|
|
310
310
|
}
|
|
311
311
|
var categoryOrder = [
|
|
312
|
+
"CLI-managed version",
|
|
312
313
|
"Agents",
|
|
313
314
|
"Skills",
|
|
314
315
|
"Plugin/MCP",
|
|
@@ -345,6 +346,20 @@ function categorizeTarget(target) {
|
|
|
345
346
|
const detail = target.state !== "installed" ? target.observed : void 0;
|
|
346
347
|
const agent = path.match(/thoth-agents-([a-z0-9_-]+)\.toml$/i);
|
|
347
348
|
const skill = path.match(/skills\/([^/]+)\/SKILL\.md$/i);
|
|
349
|
+
if (/CLI-managed install version/i.test(label)) {
|
|
350
|
+
const executing = target.expected?.replace(/^executing\s+/i, "") ?? "unknown";
|
|
351
|
+
const recorded = target.observed?.replace(/^recorded\s+/i, "") ?? "unknown";
|
|
352
|
+
return {
|
|
353
|
+
category: "CLI-managed version",
|
|
354
|
+
label: "Last complete install",
|
|
355
|
+
state: target.state,
|
|
356
|
+
detail: `Executing: ${executing} \xB7 Recorded: ${recorded}`,
|
|
357
|
+
notes: [
|
|
358
|
+
"Recorded is the last complete CLI-managed version.",
|
|
359
|
+
"Codex/Claude native marketplace versions are independent."
|
|
360
|
+
]
|
|
361
|
+
};
|
|
362
|
+
}
|
|
348
363
|
if (agent?.[1]) {
|
|
349
364
|
return {
|
|
350
365
|
category: "Agents",
|
|
@@ -483,19 +498,32 @@ function StatusView({
|
|
|
483
498
|
const hidden = targets.length - visible.length;
|
|
484
499
|
return /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
|
|
485
500
|
/* @__PURE__ */ jsx6(Text6, { color: theme.accent, children: category }),
|
|
486
|
-
visible.map((target) => /* @__PURE__ */ jsxs5(
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
501
|
+
visible.map((target) => /* @__PURE__ */ jsxs5(
|
|
502
|
+
Box6,
|
|
503
|
+
{
|
|
504
|
+
flexDirection: "column",
|
|
505
|
+
children: [
|
|
506
|
+
/* @__PURE__ */ jsxs5(Text6, { children: [
|
|
507
|
+
"- ",
|
|
508
|
+
target.label,
|
|
509
|
+
target.state ? /* @__PURE__ */ jsxs5(Text6, { color: stateColor(target.state), children: [
|
|
510
|
+
": [",
|
|
511
|
+
target.state,
|
|
512
|
+
"]"
|
|
513
|
+
] }) : null,
|
|
514
|
+
target.detail ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
|
|
515
|
+
" - ",
|
|
516
|
+
target.detail
|
|
517
|
+
] }) : null
|
|
518
|
+
] }),
|
|
519
|
+
target.notes?.map((note) => /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
|
|
520
|
+
" ",
|
|
521
|
+
note
|
|
522
|
+
] }, note))
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
`${category}-${target.label}-${target.state}`
|
|
526
|
+
)),
|
|
499
527
|
hidden > 0 ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
|
|
500
528
|
" +",
|
|
501
529
|
hidden,
|
|
@@ -555,6 +583,8 @@ function PlanPreview({
|
|
|
555
583
|
}) {
|
|
556
584
|
const blockerTargets = plan.blockerTargets ?? [];
|
|
557
585
|
const providerEvidence = providerEvidenceFor(result ?? plan);
|
|
586
|
+
const completeOperation = plan.action === "update" ? "refresh" : plan.action === "install" ? "install" : void 0;
|
|
587
|
+
const applyLabel = completeOperation ? `Apply complete ${completeOperation}` : "Apply";
|
|
558
588
|
return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
|
|
559
589
|
/* @__PURE__ */ jsx7(Text7, { bold: true, children: plan.title }),
|
|
560
590
|
/* @__PURE__ */ jsx7(Text7, { children: plan.summary }),
|
|
@@ -571,6 +601,14 @@ function PlanPreview({
|
|
|
571
601
|
"Can apply: ",
|
|
572
602
|
plan.canApply ? "yes" : "no"
|
|
573
603
|
] }),
|
|
604
|
+
completeOperation ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
|
|
605
|
+
/* @__PURE__ */ jsxs6(Text7, { color: theme.accent, children: [
|
|
606
|
+
"Complete CLI-managed ",
|
|
607
|
+
completeOperation
|
|
608
|
+
] }),
|
|
609
|
+
/* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: "The selected harness changes only after explicit confirmation." }),
|
|
610
|
+
/* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: "Codex and Claude native marketplace versions remain independent." })
|
|
611
|
+
] }) : null,
|
|
574
612
|
providerEvidence ? /* @__PURE__ */ jsx7(ProviderCapabilityView, { evidence: providerEvidence }) : null,
|
|
575
613
|
!plan.canApply && blockerTargets.length > 0 ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
|
|
576
614
|
/* @__PURE__ */ jsx7(Text7, { color: theme.warning, children: "Blocker targets" }),
|
|
@@ -624,16 +662,17 @@ function PlanPreview({
|
|
|
624
662
|
disclaimer.message
|
|
625
663
|
] }, disclaimer.code ?? disclaimer.message)),
|
|
626
664
|
/* @__PURE__ */ jsxs6(Box7, { marginTop: 1, children: [
|
|
627
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ jsxs6(Text7, { color: selectedAction === "apply" ? theme.accent : void 0, children: [
|
|
666
|
+
"[",
|
|
667
|
+
applyLabel,
|
|
668
|
+
"]"
|
|
669
|
+
] }),
|
|
628
670
|
/* @__PURE__ */ jsx7(Text7, { children: " " }),
|
|
629
671
|
/* @__PURE__ */ jsx7(Text7, { color: selectedAction === "cancel" ? theme.accent : void 0, children: "[Cancel]" })
|
|
630
672
|
] }),
|
|
631
673
|
/* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: "Enter selects. a applies. c cancels." }),
|
|
632
674
|
result ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
"Consumer result: ",
|
|
635
|
-
result.summary
|
|
636
|
-
] }),
|
|
675
|
+
/* @__PURE__ */ jsx7(Text7, { color: result.applied ? theme.ok : theme.warning, children: completeOperation ? `Complete CLI ${completeOperation} result: ${result.applied ? "completed" : "failed"} \u2014 ${result.summary}` : `Consumer result: ${result.summary}` }),
|
|
637
676
|
!result.applied && ((result.diagnosticTargets?.length ?? 0) > 0 || result.warnings.length > 0) ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
|
|
638
677
|
/* @__PURE__ */ jsx7(Text7, { color: theme.warning, children: "Apply diagnostics" }),
|
|
639
678
|
result.diagnosticTargets?.map((target, index) => /* @__PURE__ */ jsxs6(
|
|
@@ -681,7 +720,7 @@ var rootItems = [
|
|
|
681
720
|
id: "sync",
|
|
682
721
|
action: "sync",
|
|
683
722
|
label: "Sync / Update",
|
|
684
|
-
detail: "Preview managed
|
|
723
|
+
detail: "Preview sync or a complete CLI-managed refresh"
|
|
685
724
|
},
|
|
686
725
|
{
|
|
687
726
|
id: "exit",
|
|
@@ -695,7 +734,7 @@ var actionItems = [
|
|
|
695
734
|
id: "update",
|
|
696
735
|
action: "update",
|
|
697
736
|
label: "Update",
|
|
698
|
-
detail: "
|
|
737
|
+
detail: "Preview a complete CLI-managed refresh"
|
|
699
738
|
},
|
|
700
739
|
{
|
|
701
740
|
id: "sync",
|
|
@@ -710,7 +749,7 @@ var installManageItems = [
|
|
|
710
749
|
id: "install",
|
|
711
750
|
action: "install",
|
|
712
751
|
label: "Install",
|
|
713
|
-
detail: "Preview managed
|
|
752
|
+
detail: "Preview the complete CLI-managed install"
|
|
714
753
|
},
|
|
715
754
|
{ id: "back", action: "back", label: "Back", detail: "Choose harness" }
|
|
716
755
|
];
|
|
@@ -725,7 +764,7 @@ var manageItems = [
|
|
|
725
764
|
id: "update",
|
|
726
765
|
action: "update",
|
|
727
766
|
label: "Update preview",
|
|
728
|
-
detail: "Preview managed
|
|
767
|
+
detail: "Preview a complete CLI-managed refresh"
|
|
729
768
|
},
|
|
730
769
|
{
|
|
731
770
|
id: "sync",
|
|
@@ -311,7 +311,7 @@ export declare const SDD_PHASE_PROTOCOLS: readonly [{
|
|
|
311
311
|
readonly id: "specify";
|
|
312
312
|
readonly objective: "Create a testable, implementation-neutral feature contract in spec.md.";
|
|
313
313
|
readonly requiredInputs: ["User intent and accepted scope", "Explore handoff when the route is full", "Project constitution and existing public contracts when relevant"];
|
|
314
|
-
readonly instructions: ["Record intent and scope as Why, Impact, and Affected capabilities before prescribing any contract.", "Define prioritized independent stories and map each story to its FR-### and SC-### contracts with Covers metadata.", "Give every normative MUST or SHALL requirement a descriptive title and declare it INTERNAL or as an ADDED, MODIFIED, REMOVED, or RENAMED durable capability delta.", "Classify every success criterion as buildable or outcome; both remain measurable, but only buildable criteria require implementation task coverage.", "Capture assumptions, acceptance scenarios, edge cases, dependencies, and explicit non-goals.", "Use a clarification marker only when no safe default exists and the answer materially changes scope or behavior."];
|
|
314
|
+
readonly instructions: ["Record intent and scope as Why, Impact, and Affected capabilities before prescribing any contract.", "Define prioritized independent stories and map each story to its FR-### and SC-### contracts with Covers metadata.", "Inspect each affected canonical capability before choosing durable metadata: ADDED is only for genuinely new behavior; MODIFIED and REMOVED preserve exact existing titles; RENAMED names the exact previous title; only ADDED is valid when the capability is absent.", "Give every normative MUST or SHALL requirement a descriptive title and declare it INTERNAL or as an ADDED, MODIFIED, REMOVED, or RENAMED durable capability delta; treat an ADDED warning on an existing capability as a required semantic-overlap review.", "Classify every success criterion as buildable or outcome; both remain measurable, but only buildable criteria require implementation task coverage.", "Capture assumptions, acceptance scenarios, edge cases, dependencies, and explicit non-goals.", "Use a clarification marker only when no safe default exists and the answer materially changes scope or behavior."];
|
|
315
315
|
readonly allowedWrites: ["openspec/changes/<feature>/spec.md"];
|
|
316
316
|
readonly outputSchema: ["spec.md path", "requirements summary", "open clarifications"];
|
|
317
317
|
readonly doneWhen: ["Every accepted FR and SC is testable, materially unambiguous, mapped to a story, and implementation-neutral."];
|
|
@@ -17,11 +17,6 @@ export declare function findPluginEntry(directory: string): PluginEntryInfo | nu
|
|
|
17
17
|
* Resolves the installed version from node_modules, with memoization.
|
|
18
18
|
*/
|
|
19
19
|
export declare function getCachedVersion(): string | null;
|
|
20
|
-
/**
|
|
21
|
-
* Safely updates a pinned version in the configuration file.
|
|
22
|
-
* It attempts to replace the exact plugin string to preserve comments and formatting.
|
|
23
|
-
*/
|
|
24
|
-
export declare function updatePinnedVersion(configPath: string, oldEntry: string, newVersion: string): boolean;
|
|
25
20
|
/**
|
|
26
21
|
* Fetches the latest version for a specific channel from the NPM registry.
|
|
27
22
|
*/
|
|
@@ -4,10 +4,9 @@ import type { AutoUpdateCheckerOptions } from './types';
|
|
|
4
4
|
* Creates an OpenCode hook that checks for plugin updates when a new session is created.
|
|
5
5
|
* @param ctx The plugin input context.
|
|
6
6
|
* @param options Configuration options for the update checker.
|
|
7
|
-
* @param shell The shell instance for running commands.
|
|
8
7
|
* @returns A hook object for the session.created event.
|
|
9
8
|
*/
|
|
10
|
-
export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options
|
|
9
|
+
export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?: AutoUpdateCheckerOptions): {
|
|
11
10
|
event: ({ event }: {
|
|
12
11
|
event: {
|
|
13
12
|
type: string;
|