opencode-plugin-flow 5.2.1 → 5.2.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/CHANGELOG.md +30 -0
- package/README.md +6 -5
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +3 -3
- package/dist/index.js +1150 -493
- package/dist/index.js.map +15 -15
- package/package.json +12 -5
- package/dist/application/errors.d.ts +0 -10
- package/dist/application/flow-service.d.ts +0 -311
- package/dist/application/ports/evidence-artifact-store.d.ts +0 -28
- package/dist/application/ports/session-repository.d.ts +0 -22
- package/dist/application/ports/source-identity.d.ts +0 -61
- package/dist/application/replay/canonical-json.d.ts +0 -7
- package/dist/application/replay/contract.d.ts +0 -2130
- package/dist/application/replay/engine.d.ts +0 -101
- package/dist/application/replay/index.d.ts +0 -7
- package/dist/application/replay/privacy.d.ts +0 -14
- package/dist/application/schema.d.ts +0 -1813
- package/dist/cli.d.ts +0 -1
- package/dist/config-shared.d.ts +0 -287
- package/dist/config.d.ts +0 -1
- package/dist/distribution/legacy-cleanup.d.ts +0 -25
- package/dist/domain/feature-id.d.ts +0 -3
- package/dist/domain/limits.d.ts +0 -4
- package/dist/domain/orchestration-policy.d.ts +0 -27
- package/dist/domain/session-invariants.d.ts +0 -8
- package/dist/domain/session.d.ts +0 -356
- package/dist/domain/transitions.d.ts +0 -275
- package/dist/domain/validation-command.d.ts +0 -8
- package/dist/guidance/catalog.d.ts +0 -18
- package/dist/guidance/ids.d.ts +0 -4
- package/dist/infrastructure/fs/evidence-artifact-store.d.ts +0 -5
- package/dist/infrastructure/fs/session-repository.d.ts +0 -2
- package/dist/infrastructure/fs/source-identity.d.ts +0 -26
- package/dist/infrastructure/fs/strict-json-object.d.ts +0 -9
- package/dist/infrastructure/fs/workspace-flow-service.d.ts +0 -10
- package/dist/infrastructure/fs/workspace.d.ts +0 -63
- package/dist/infrastructure/system/transition-environment.d.ts +0 -2
- package/dist/platform/opencode/config.d.ts +0 -2
- package/dist/platform/opencode/logging.d.ts +0 -3
- package/dist/platform/opencode/tools.d.ts +0 -4
- package/dist/prompt-baseline-fixtures.d.ts +0 -20
- package/dist/prompt-model-evaluation.d.ts +0 -88
- package/dist/prompt-quality.d.ts +0 -80
- package/dist/prompt-surfaces.d.ts +0 -28
- package/dist/version.d.ts +0 -1
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type SourceIdentityProvider } from "../../application/ports/source-identity.js";
|
|
2
|
-
/**
|
|
3
|
-
* Bounded budgets. Exceeding any of these fails closed with a bounded recovery
|
|
4
|
-
* response rather than reading an unbounded amount of source state.
|
|
5
|
-
*/
|
|
6
|
-
export declare const MAX_SOURCE_ENTRIES = 20000;
|
|
7
|
-
export declare const MAX_SOURCE_TOTAL_BYTES: number;
|
|
8
|
-
export declare const MAX_SOURCE_FILE_BYTES: number;
|
|
9
|
-
/**
|
|
10
|
-
* Create the authoritative source-identity provider for a workspace root.
|
|
11
|
-
*
|
|
12
|
-
* The digest binds:
|
|
13
|
-
* - Git: the HEAD commit, the canonical index (mode/object/stage/path), and the
|
|
14
|
-
* independent working-tree state (content, exec/symlink/gitlink type,
|
|
15
|
-
* index-only sparse absence, and deletions) for tracked and untracked
|
|
16
|
-
* non-ignored paths. Representing the index separately from the worktree
|
|
17
|
-
* distinguishes staged-only changes from equivalent unstaged trees. Sparse
|
|
18
|
-
* and dense materializations are intentionally distinct source states.
|
|
19
|
-
* - Non-Git: a deterministic full-tree manifest.
|
|
20
|
-
*
|
|
21
|
-
* Git's `--exclude-standard` supplies ignore semantics with no heuristic source
|
|
22
|
-
* exclusions; `.git/**` internals are never enumerated and `.flow/**` is always
|
|
23
|
-
* excluded. Measurement fails closed on unsafe symlinks, unreadable entries,
|
|
24
|
-
* resource overflow, and any workspace change observed while measuring.
|
|
25
|
-
*/
|
|
26
|
-
export declare function createFileSourceIdentityProvider(root: string): SourceIdentityProvider;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type FlowResponse, type FlowService } from "../../application/flow-service.js";
|
|
2
|
-
export declare function createWorkspaceFlowService(workspace: string): FlowService;
|
|
3
|
-
export declare function flowStatus(workspace: string, input: unknown): Promise<FlowResponse>;
|
|
4
|
-
export declare function flowPlanSave(workspace: string, input: unknown): Promise<FlowResponse>;
|
|
5
|
-
export declare function flowPlanApprove(workspace: string): Promise<FlowResponse>;
|
|
6
|
-
export declare function flowRunStart(workspace: string, input: unknown): Promise<FlowResponse>;
|
|
7
|
-
export declare function flowFeatureComplete(workspace: string, input: unknown): Promise<FlowResponse>;
|
|
8
|
-
export declare function flowReviewStart(workspace: string, input: unknown): Promise<FlowResponse>;
|
|
9
|
-
export declare function flowFeatureReset(workspace: string, input: unknown): Promise<FlowResponse>;
|
|
10
|
-
export declare function flowSessionClose(workspace: string, input: unknown): Promise<FlowResponse>;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { Session } from "../../domain/session.js";
|
|
2
|
-
export declare class InvalidFlowWorkspaceRootError extends Error {
|
|
3
|
-
readonly code = "INVALID_FLOW_WORKSPACE_ROOT";
|
|
4
|
-
constructor(message: string, options?: ErrorOptions);
|
|
5
|
-
}
|
|
6
|
-
export declare class UnsafeFlowWorkspaceLayoutError extends Error {
|
|
7
|
-
readonly code = "UNSAFE_FLOW_WORKSPACE_LAYOUT";
|
|
8
|
-
constructor(message: string, options?: ErrorOptions);
|
|
9
|
-
}
|
|
10
|
-
export declare class ArchiveCollisionError extends Error {
|
|
11
|
-
readonly code = "FLOW_ARCHIVE_COLLISION";
|
|
12
|
-
constructor(message: string, options?: ErrorOptions);
|
|
13
|
-
}
|
|
14
|
-
export declare class UnclosedSessionArchiveError extends Error {
|
|
15
|
-
readonly code = "FLOW_ARCHIVE_REQUIRES_CLOSURE";
|
|
16
|
-
constructor(message: string);
|
|
17
|
-
}
|
|
18
|
-
export declare function normalizeWorkspaceRoot(rawPath: string | undefined): string | null;
|
|
19
|
-
export declare function assertMutableWorkspaceRoot(rawPath: string): string;
|
|
20
|
-
export declare function resolveWorkspaceRoot(context: {
|
|
21
|
-
worktree?: string;
|
|
22
|
-
directory?: string;
|
|
23
|
-
}): string;
|
|
24
|
-
export declare function flowDir(worktree: string): string;
|
|
25
|
-
export declare function sessionPath(worktree: string): string;
|
|
26
|
-
export declare function historyDir(worktree: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Map the exact, case-sensitive session identity into a portable lowercase
|
|
29
|
-
* archive component. The fixed digest avoids both case-fold collisions and
|
|
30
|
-
* filesystem component growth while lookup still verifies the parsed id.
|
|
31
|
-
*/
|
|
32
|
-
export declare function archivedSessionFilename(sessionId: string): string;
|
|
33
|
-
export declare function archivedSessionPath(worktree: string, sessionId: string): string;
|
|
34
|
-
type ArchiveAndClearTestHooks = {
|
|
35
|
-
afterHistoryPinned?: (() => Promise<void>) | undefined;
|
|
36
|
-
afterFlowPinnedBeforeDelete?: (() => Promise<void>) | undefined;
|
|
37
|
-
pinnedHelperTestExecutable?: string | undefined;
|
|
38
|
-
pinnedHelperTestRuntime?: "node" | "bun" | "electron" | undefined;
|
|
39
|
-
pinnedHelperReadyTimeoutMs?: number | undefined;
|
|
40
|
-
pinnedHelperCompletionTimeoutMs?: number | undefined;
|
|
41
|
-
};
|
|
42
|
-
export type SessionLockOptions = {
|
|
43
|
-
timeoutMs?: number;
|
|
44
|
-
};
|
|
45
|
-
export declare function withSessionLock<T>(worktree: string, task: () => Promise<T>, lockOptions?: SessionLockOptions): Promise<T>;
|
|
46
|
-
export declare function loadSession(worktree: string): Promise<Session | null>;
|
|
47
|
-
/**
|
|
48
|
-
* Find any canonical archive containing an operation id. Close-start preflight
|
|
49
|
-
* uses this wider lookup because a retry handle must not collide with any
|
|
50
|
-
* historical mutation identity.
|
|
51
|
-
*/
|
|
52
|
-
export declare function findArchivedSessionByOperationId(worktree: string, operationId: string): Promise<Session | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Recover only the archive whose accepted closure owns this retry handle.
|
|
55
|
-
* A later session may reuse the same text for a non-close mutation without
|
|
56
|
-
* making the original accepted close ambiguous.
|
|
57
|
-
*/
|
|
58
|
-
export declare function findArchivedSessionByCloseRetryOperationId(worktree: string, operationId: string): Promise<Session | null>;
|
|
59
|
-
export declare function quarantineUnreadableSession(worktree: string, hooks?: ArchiveAndClearTestHooks): Promise<string | null>;
|
|
60
|
-
export declare function saveSession(worktree: string, session: Session): Promise<Session>;
|
|
61
|
-
export declare function archiveAndClearSession(worktree: string, session: Session, hooks?: ArchiveAndClearTestHooks): Promise<void>;
|
|
62
|
-
export declare function ensureFlowGitignore(worktree: string): Promise<void>;
|
|
63
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Frozen comparison prompt assembly used only for compiler-shape evaluation.
|
|
3
|
-
*
|
|
4
|
-
* These strings capture the pre-compiler public startup and hidden-worker
|
|
5
|
-
* topology while retaining the current Session v4 lifecycle and nested wire
|
|
6
|
-
* contract. They are not production prompt sources and must never be selected
|
|
7
|
-
* by the default compiled Flow surfaces. Keep the exception explicit so manual
|
|
8
|
-
* baseline text cannot be mistaken for a maintained projection of skill rules.
|
|
9
|
-
*/
|
|
10
|
-
export declare const LEGACY_PROMPT_BASELINE: Readonly<{
|
|
11
|
-
publicCommandPreflight: string;
|
|
12
|
-
workerPrompts: Readonly<{
|
|
13
|
-
"flow-evidence-worker": "Use Flow evidence mode. Inspect only the assigned slice, do not edit files, do not call state-changing Flow tools, and return coverage, evidence inspected, confidence-tagged findings or facts, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
|
|
14
|
-
"flow-validation-worker": "Use Flow validation mode. Run only manager-specified commands or propose focused checks, do not edit files, do not call state-changing Flow tools, and report exact command, status, raw outcome summary, coverage, confidence, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
|
|
15
|
-
"flow-audit-worker": "Use Flow audit mode. Inspect only the assigned slice, actively refute candidate findings before reporting them, do not edit files, do not call state-changing Flow tools, and return coverage, evidence, guards checked, confidence, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
|
|
16
|
-
"flow-candidate-worker": "Use Flow candidate-implementation mode only when the manager assigned an isolated worktree or exact non-overlapping path ownership. Do not edit .flow/**, do not call state-changing Flow tools, do not complete Flow state, and return changed or proposed patch, verification run, coverage, confidence, merge risks, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
|
|
17
|
-
"flow-verifier-worker": "Use Flow verifier mode. Verify only the assigned claims against the provided sources, commands, counts, or current docs. Do not generate new scope, do not edit files, do not call state-changing Flow tools, and return supported, partly-supported, unsupported, or source-not-found per claim with evidence, confidence, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
|
|
18
|
-
}>;
|
|
19
|
-
reviewerSections: readonly string[];
|
|
20
|
-
}>;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { type FlowPromptVariant } from "./prompt-surfaces.js";
|
|
3
|
-
declare const ModelDecisionSchema: z.ZodObject<{
|
|
4
|
-
id: z.ZodString;
|
|
5
|
-
route: z.ZodEnum<{
|
|
6
|
-
"flow-audit-worker": "flow-audit-worker";
|
|
7
|
-
"flow-auto": "flow-auto";
|
|
8
|
-
"flow-candidate-worker": "flow-candidate-worker";
|
|
9
|
-
"flow-evidence-worker": "flow-evidence-worker";
|
|
10
|
-
"flow-plan": "flow-plan";
|
|
11
|
-
"flow-review": "flow-review";
|
|
12
|
-
"flow-reviewer": "flow-reviewer";
|
|
13
|
-
"flow-run": "flow-run";
|
|
14
|
-
"flow-status": "flow-status";
|
|
15
|
-
"flow-validation-worker": "flow-validation-worker";
|
|
16
|
-
"flow-verifier-worker": "flow-verifier-worker";
|
|
17
|
-
}>;
|
|
18
|
-
executionMode: z.ZodEnum<{
|
|
19
|
-
blocked: "blocked";
|
|
20
|
-
candidate_worker: "candidate_worker";
|
|
21
|
-
readonly_parallel: "readonly_parallel";
|
|
22
|
-
serial: "serial";
|
|
23
|
-
}>;
|
|
24
|
-
workers: z.ZodArray<z.ZodString>;
|
|
25
|
-
stateOwner: z.ZodEnum<{
|
|
26
|
-
"root-manager": "root-manager";
|
|
27
|
-
worker: "worker";
|
|
28
|
-
}>;
|
|
29
|
-
callsStatusFirst: z.ZodBoolean;
|
|
30
|
-
planOnly: z.ZodBoolean;
|
|
31
|
-
reviewFirst: z.ZodBoolean;
|
|
32
|
-
validation: z.ZodArray<z.ZodEnum<{
|
|
33
|
-
behavioral: "behavioral";
|
|
34
|
-
broad: "broad";
|
|
35
|
-
browser: "browser";
|
|
36
|
-
focused: "focused";
|
|
37
|
-
ui: "ui";
|
|
38
|
-
}>>;
|
|
39
|
-
independentReview: z.ZodBoolean;
|
|
40
|
-
reviewDepth: z.ZodEnum<{
|
|
41
|
-
broad: "broad";
|
|
42
|
-
detailed: "detailed";
|
|
43
|
-
not_applicable: "not_applicable";
|
|
44
|
-
quick: "quick";
|
|
45
|
-
standard: "standard";
|
|
46
|
-
}>;
|
|
47
|
-
manifestComplete: z.ZodBoolean;
|
|
48
|
-
coverage: z.ZodEnum<{
|
|
49
|
-
complete: "complete";
|
|
50
|
-
missing: "missing";
|
|
51
|
-
not_applicable: "not_applicable";
|
|
52
|
-
partial: "partial";
|
|
53
|
-
}>;
|
|
54
|
-
handoffStatus: z.ZodEnum<{
|
|
55
|
-
blocked: "blocked";
|
|
56
|
-
not_applicable: "not_applicable";
|
|
57
|
-
partial: "partial";
|
|
58
|
-
success: "success";
|
|
59
|
-
}>;
|
|
60
|
-
handoffHasRequiredSections: z.ZodBoolean;
|
|
61
|
-
retryReviews: z.ZodNumber;
|
|
62
|
-
stopsAfterRetryFailure: z.ZodBoolean;
|
|
63
|
-
candidateDecision: z.ZodEnum<{
|
|
64
|
-
not_applicable: "not_applicable";
|
|
65
|
-
serial_required: "serial_required";
|
|
66
|
-
used: "used";
|
|
67
|
-
}>;
|
|
68
|
-
completionClaimed: z.ZodBoolean;
|
|
69
|
-
reason: z.ZodString;
|
|
70
|
-
}, z.core.$strict>;
|
|
71
|
-
export type ModelDecision = z.infer<typeof ModelDecisionSchema>;
|
|
72
|
-
export type ModelEvaluationGrade = {
|
|
73
|
-
passedScenarios: number;
|
|
74
|
-
totalScenarios: number;
|
|
75
|
-
passedCriteria: number;
|
|
76
|
-
totalCriteria: number;
|
|
77
|
-
scenarios: Array<{
|
|
78
|
-
id: string;
|
|
79
|
-
passed: boolean;
|
|
80
|
-
passedCriteria: number;
|
|
81
|
-
totalCriteria: number;
|
|
82
|
-
failures: string[];
|
|
83
|
-
}>;
|
|
84
|
-
};
|
|
85
|
-
export declare function buildPromptModelEvaluationPacket(variant: FlowPromptVariant): string;
|
|
86
|
-
export declare function parseModelDecisionResponse(text: string): ModelDecision[];
|
|
87
|
-
export declare function gradeModelDecisions(decisions: readonly ModelDecision[]): ModelEvaluationGrade;
|
|
88
|
-
export {};
|
package/dist/prompt-quality.d.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { type CompiledFlowPrompt, type FlowPromptSurfaceName, type FlowPromptVariant } from "./prompt-surfaces.js";
|
|
2
|
-
export type PromptMetric = {
|
|
3
|
-
surface: string;
|
|
4
|
-
variant: FlowPromptVariant | "runtime";
|
|
5
|
-
sources: string[];
|
|
6
|
-
characters: number;
|
|
7
|
-
words: number;
|
|
8
|
-
approximateTokens: number;
|
|
9
|
-
actionableInstructions: number;
|
|
10
|
-
exactDuplicateLines: number;
|
|
11
|
-
repeatedFiveGrams: number;
|
|
12
|
-
nearDuplicateLinePairs: number;
|
|
13
|
-
negativeInstructions: number;
|
|
14
|
-
negativeInstructionDensity: number;
|
|
15
|
-
codeFences: number;
|
|
16
|
-
conditionalFragments: string[];
|
|
17
|
-
roleInapplicableFragments: string[];
|
|
18
|
-
roleInapplicableLines: number;
|
|
19
|
-
criticalRulePositions: Record<string, number | null>;
|
|
20
|
-
structurallyEnforcedRulesPresent: string[];
|
|
21
|
-
terminologyWarnings: string[];
|
|
22
|
-
};
|
|
23
|
-
export type PromptEvaluationResult = {
|
|
24
|
-
variant: FlowPromptVariant;
|
|
25
|
-
scenariosPassed: number;
|
|
26
|
-
scenariosTotal: number;
|
|
27
|
-
criteriaPassed: number;
|
|
28
|
-
criteriaTotal: number;
|
|
29
|
-
staticApproximateTokens: number;
|
|
30
|
-
roleInapplicableLines: number;
|
|
31
|
-
exactDuplicateLines: number;
|
|
32
|
-
scenarios: Array<{
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
passed: boolean;
|
|
36
|
-
passedCriteria: number;
|
|
37
|
-
totalCriteria: number;
|
|
38
|
-
failures: string[];
|
|
39
|
-
}>;
|
|
40
|
-
};
|
|
41
|
-
export type PromptRepetitionClassification = {
|
|
42
|
-
id: string;
|
|
43
|
-
classification: "keep" | "consolidate" | "enforce-structurally" | "load-conditionally" | "remove" | "evaluate";
|
|
44
|
-
occurrences: string[];
|
|
45
|
-
rationale: string;
|
|
46
|
-
};
|
|
47
|
-
export type LifecycleFlatRequestExample = {
|
|
48
|
-
tool: "flow_status" | "flow_review_start" | "flow_feature_complete" | "flow_session_close";
|
|
49
|
-
line: number;
|
|
50
|
-
topLevelField: string | null;
|
|
51
|
-
};
|
|
52
|
-
/** Finds lifecycle-tool examples that bypass the required `request` envelope. */
|
|
53
|
-
export declare function auditLifecycleFlatRequestExamples(text: string): LifecycleFlatRequestExample[];
|
|
54
|
-
export declare function measurePromptText(options: {
|
|
55
|
-
surface: string;
|
|
56
|
-
variant: FlowPromptVariant | "runtime";
|
|
57
|
-
text: string;
|
|
58
|
-
compiled?: CompiledFlowPrompt;
|
|
59
|
-
}): PromptMetric;
|
|
60
|
-
export declare function measureCompiledPrompt(compiled: CompiledFlowPrompt): PromptMetric;
|
|
61
|
-
type PromptScenario = {
|
|
62
|
-
id: string;
|
|
63
|
-
name: string;
|
|
64
|
-
input: string;
|
|
65
|
-
expectedRoute: FlowPromptSurfaceName;
|
|
66
|
-
surface: FlowPromptSurfaceName;
|
|
67
|
-
required: Array<{
|
|
68
|
-
label: string;
|
|
69
|
-
pattern: RegExp;
|
|
70
|
-
}>;
|
|
71
|
-
forbidden?: Array<{
|
|
72
|
-
label: string;
|
|
73
|
-
pattern: RegExp;
|
|
74
|
-
}>;
|
|
75
|
-
};
|
|
76
|
-
export declare const PROMPT_EVALUATION_SCENARIOS: readonly PromptScenario[];
|
|
77
|
-
export declare function evaluatePromptVariant(variant: FlowPromptVariant): PromptEvaluationResult;
|
|
78
|
-
export declare const PROMPT_REPETITION_CLASSIFICATIONS: readonly PromptRepetitionClassification[];
|
|
79
|
-
export declare function promptInventoryForVariant(variant: FlowPromptVariant): PromptMetric[];
|
|
80
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export type FlowPromptVariant = "baseline" | "lexically-deduplicated" | "surface-specific" | "surface-specific-bookended";
|
|
2
|
-
export type FlowPromptSurfaceName = "flow-auto" | "flow-plan" | "flow-run" | "flow-review" | "flow-status" | "flow-reviewer" | "flow-evidence-worker" | "flow-validation-worker" | "flow-audit-worker" | "flow-candidate-worker" | "flow-verifier-worker";
|
|
3
|
-
export type FlowPromptRole = "manager" | "reviewer" | "evidence-worker" | "validation-worker" | "audit-worker" | "candidate-worker" | "verifier-worker";
|
|
4
|
-
export type FlowPromptFragmentKind = "purpose" | "invariant" | "procedure" | "reference" | "schema" | "checkpoint";
|
|
5
|
-
export type FlowPromptFragment = {
|
|
6
|
-
id: string;
|
|
7
|
-
source: string;
|
|
8
|
-
origin: "skill-source" | "compiler";
|
|
9
|
-
kind: FlowPromptFragmentKind;
|
|
10
|
-
text: string;
|
|
11
|
-
roles: readonly FlowPromptRole[];
|
|
12
|
-
conditional?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export type CompiledFlowPrompt = {
|
|
15
|
-
surface: FlowPromptSurfaceName;
|
|
16
|
-
variant: FlowPromptVariant;
|
|
17
|
-
role: FlowPromptRole;
|
|
18
|
-
text: string;
|
|
19
|
-
fragments: readonly FlowPromptFragment[];
|
|
20
|
-
};
|
|
21
|
-
export type FlowWorkerHandoffKind = "evidence" | "validation" | "audit" | "review-slice" | "verifier" | "candidate";
|
|
22
|
-
export declare function compileFlowPromptSurface(surface: FlowPromptSurfaceName, variant?: FlowPromptVariant): CompiledFlowPrompt;
|
|
23
|
-
export declare const FLOW_STATIC_PROMPT_SURFACES: readonly FlowPromptSurfaceName[];
|
|
24
|
-
export declare function compiledFlowPromptSurfaces(variant?: FlowPromptVariant): Record<FlowPromptSurfaceName, CompiledFlowPrompt>;
|
|
25
|
-
export declare function validateFlowWorkerHandoff(kind: FlowWorkerHandoffKind, text: string): {
|
|
26
|
-
ok: boolean;
|
|
27
|
-
errors: string[];
|
|
28
|
-
};
|
package/dist/version.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function resolveFlowPluginVersion(): string;
|