@quantiya/codevibe-core 2.0.53 → 2.0.54
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/dist/index.js +568 -539
- package/dist/orchestration-shell/clean-start-task-error.d.ts +12 -0
- package/dist/orchestration-shell/cli.js +13088 -12047
- package/dist/orchestration-shell/components/MarkdownView.d.ts +59 -0
- package/dist/orchestration-shell/git-status-summary.d.ts +23 -0
- package/dist/orchestration-shell/index.d.ts +22 -1
- package/dist/orchestration-shell/quorum-loop.d.ts +4 -0
- package/package.json +2 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface MarkdownViewProps {
|
|
3
|
+
content: string;
|
|
4
|
+
source?: 'planner' | 'shell';
|
|
5
|
+
terminalWidth?: number;
|
|
6
|
+
}
|
|
7
|
+
interface InlineSpan {
|
|
8
|
+
text: string;
|
|
9
|
+
bold?: boolean;
|
|
10
|
+
italic?: boolean;
|
|
11
|
+
code?: boolean;
|
|
12
|
+
strikethrough?: boolean;
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Tokenize inline markdown into styled spans, respecting word-boundary emphasis rules. */
|
|
16
|
+
export declare function parseInlineSpans(text: string): InlineSpan[];
|
|
17
|
+
/** Render inline spans into Ink Text elements. */
|
|
18
|
+
export declare function renderInlineSpans(spans: InlineSpan[], keyPrefix: string): React.ReactElement[];
|
|
19
|
+
type BlockType = {
|
|
20
|
+
kind: 'agent-header';
|
|
21
|
+
agent: string;
|
|
22
|
+
title: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'heading';
|
|
25
|
+
level: number;
|
|
26
|
+
text: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'code-block';
|
|
29
|
+
lang?: string;
|
|
30
|
+
code: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'table';
|
|
33
|
+
headers: string[];
|
|
34
|
+
rows: string[][];
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'list-item';
|
|
37
|
+
ordered: boolean;
|
|
38
|
+
bullet: string;
|
|
39
|
+
text: string;
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'blockquote';
|
|
42
|
+
text: string;
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'divider';
|
|
45
|
+
} | {
|
|
46
|
+
kind: 'paragraph';
|
|
47
|
+
lines: string[];
|
|
48
|
+
};
|
|
49
|
+
/** Check if a line is a markdown table separator (e.g. `|---|---|` or `---|---`). Linear validation without backtracking (R1-F1). */
|
|
50
|
+
export declare function isTableSeparator(line: string): boolean;
|
|
51
|
+
/** Check if text contains multi-line rich markdown structures (headings, code blocks, tables, blockquotes, lists, bold). */
|
|
52
|
+
export declare function isRichMarkdown(text: string): boolean;
|
|
53
|
+
/** Parse markdown text into structured blocks. */
|
|
54
|
+
export declare function parseMarkdownBlocks(content: string): BlockType[];
|
|
55
|
+
/** Calculate the visual display width of a string, taking into account wide characters, CJK, and emoji. */
|
|
56
|
+
export declare function getVisualWidth(text: string): number;
|
|
57
|
+
/** Main MarkdownView component. */
|
|
58
|
+
export declare function MarkdownView(props: MarkdownViewProps): React.ReactElement;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface GitExecResult {
|
|
2
|
+
stdout: string;
|
|
3
|
+
stderr?: string;
|
|
4
|
+
}
|
|
5
|
+
export type GitExecFileFn = (file: string, args: readonly string[], options: {
|
|
6
|
+
cwd: string;
|
|
7
|
+
env?: NodeJS.ProcessEnv;
|
|
8
|
+
timeout?: number;
|
|
9
|
+
encoding?: string;
|
|
10
|
+
}) => Promise<GitExecResult>;
|
|
11
|
+
export interface ExecuteGitStatusSummaryOptions {
|
|
12
|
+
cwd: string;
|
|
13
|
+
prompt: string;
|
|
14
|
+
hasActiveTask: boolean;
|
|
15
|
+
execFileFn?: GitExecFileFn;
|
|
16
|
+
}
|
|
17
|
+
export declare const GIT_QUERY_PATTERN: RegExp;
|
|
18
|
+
/**
|
|
19
|
+
* Safely format code blocks using collision-safe backtick fences (R2-F3).
|
|
20
|
+
* If the content contains triple backticks or more, emits a fence with length > max backticks in content.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatFencedCodeBlock(content: string, lang?: string): string;
|
|
23
|
+
export declare function executeGitStatusSummary(options: ExecuteGitStatusSummaryOptions): Promise<string | null>;
|
|
@@ -22,6 +22,7 @@ import { AdvisoryAttachmentJournal } from './advisory-attachment-journal';
|
|
|
22
22
|
import type { ImageAttachment } from './types';
|
|
23
23
|
import { type GateDecisionSubmitDeps, type GroupDecisionSubmitDeps } from './gate-decision-submit';
|
|
24
24
|
import { type WorkspaceOutcomeSinkTap } from './workspace-terminal-coordinator';
|
|
25
|
+
export { executeGitStatusSummary } from './git-status-summary';
|
|
25
26
|
import { type ContinuationCliResult, type ContinuationCliDeps } from './slash-routes/continuation';
|
|
26
27
|
import { loadReviewerWizardData } from './slash-routes/reviewers';
|
|
27
28
|
import { createShellEventEmitter } from './emit-shell-event';
|
|
@@ -30,7 +31,7 @@ import { type BrainstormPanelActiveAgent } from './brainstorm-quorum';
|
|
|
30
31
|
import { type RunAuditBrowserResult } from './audit-runner';
|
|
31
32
|
import { type RunFlagCommandResult } from './flag-command';
|
|
32
33
|
import { Tier } from './types';
|
|
33
|
-
import type { ConversationEntry, DurableGateResolution, PendingClarification } from './types';
|
|
34
|
+
import type { ConversationEntry, DurableGateResolution, PendingApplyConflict, PendingClarification } from './types';
|
|
34
35
|
import { type GatePromptEnvelope, type DecryptedReviewSummaryInput } from './gate-prompts';
|
|
35
36
|
import type { Event, UpdateEventStatusInput } from '../types/events';
|
|
36
37
|
import { type StructuralSummaryGenerator } from '../structural-summary';
|
|
@@ -742,6 +743,13 @@ export declare function reissueTeamFromRetainedSpec(deps: {
|
|
|
742
743
|
}, taskGroupId: string, options?: {
|
|
743
744
|
retryOf?: string;
|
|
744
745
|
}): Promise<void>;
|
|
746
|
+
/**
|
|
747
|
+
* Format a human-readable rejection advisory from a failed startTask attempt,
|
|
748
|
+
* propagating any specific error reason (such as admission freeze or budget)
|
|
749
|
+
* from the backend rather than an opaque generic failure.
|
|
750
|
+
* Sanitizes terminal escapes, redacts absolute paths, and caps display length.
|
|
751
|
+
*/
|
|
752
|
+
export declare function formatStartTaskRejection(errorOrLoop: unknown): string;
|
|
745
753
|
/**
|
|
746
754
|
* PHASE-590 §3.D — the `team_decompose` routing path. Runs the local decomposer,
|
|
747
755
|
* shape-checks (the schema is applied inside the decomposer parse) +
|
|
@@ -1134,6 +1142,19 @@ export declare function serializeShellSubmissions(handler: (text: string, images
|
|
|
1134
1142
|
*/
|
|
1135
1143
|
export declare function buildContinuationActionDeps(args: RunOrchestrationShellArgs, store: OrchestrationStore): Partial<ContinuationCliDeps>;
|
|
1136
1144
|
export declare function shouldSuppressStructuralContextRefresh(args: RunOrchestrationShellArgs): boolean;
|
|
1145
|
+
/**
|
|
1146
|
+
* P46a C3 — "Retry as a new task": start a NEW linked task (`retryOf`) on a
|
|
1147
|
+
* fresh snapshot from the stashed retry brief (the original request + the
|
|
1148
|
+
* files changed since + the reviewed contents). It runs the full quorum and
|
|
1149
|
+
* needs the user's approval again; the failed original stays `apply_failed`.
|
|
1150
|
+
* Mirrors the `/task` START (same TASK_LIFECYCLE row). Returns the line to show
|
|
1151
|
+
* (the starting line, or why the retry could not start); the caller renders it.
|
|
1152
|
+
*/
|
|
1153
|
+
export declare function dispatchApplyConflictRetry(deps: {
|
|
1154
|
+
store: OrchestrationStore;
|
|
1155
|
+
quorumLoop: RunOrchestrationShellArgs['quorumLoop'];
|
|
1156
|
+
menu: PendingApplyConflict;
|
|
1157
|
+
}): Promise<string>;
|
|
1137
1158
|
/**
|
|
1138
1159
|
* Tokenize a command line string respecting single/double quotes and backslash escapes.
|
|
1139
1160
|
* Returns tokens array or error if unclosed quote / trailing escape.
|
|
@@ -798,6 +798,10 @@ export declare class QuorumLoop {
|
|
|
798
798
|
private readonly taskLeaseHeartbeatsInFlight;
|
|
799
799
|
/** Tasks whose next automatic revise round must start a fresh review baseline. */
|
|
800
800
|
private readonly reviewScopeResetTasks;
|
|
801
|
+
/** Last error message from a failed startTask call, kept for shell advisory display. */
|
|
802
|
+
private lastStartError;
|
|
803
|
+
/** Retrieve the last error message from a rejected or failed startTask call. */
|
|
804
|
+
getLastStartError(): string | null;
|
|
801
805
|
/** Non-terminal tasks for which `/review-reset` may arm the next revise round. */
|
|
802
806
|
private readonly reviewScopeResetEligibleTasks;
|
|
803
807
|
private taskEpoch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quantiya/codevibe-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.54",
|
|
4
4
|
"description": "Core library for CodeVibe plugins - shared keychain, crypto, AppSync, and auth functionality",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"parse5": "^7.3.0",
|
|
39
39
|
"react": "^19.2.0",
|
|
40
40
|
"react-devtools-core": "^6.1.2",
|
|
41
|
+
"string-width": "^8.2.0",
|
|
41
42
|
"ulid": "^3.0.0",
|
|
42
43
|
"uuid": "^11.1.1",
|
|
43
44
|
"ws": "^8.14.0",
|