@nntoan/gstack 0.0.1
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/LICENSE +21 -0
- package/README.md +33 -0
- package/bin/gstack.js +2 -0
- package/dist/agents/builder.d.ts +2 -0
- package/dist/agents/ceo.d.ts +2 -0
- package/dist/agents/debugger.d.ts +2 -0
- package/dist/agents/designer.d.ts +2 -0
- package/dist/agents/doc-engineer.d.ts +2 -0
- package/dist/agents/eng-manager.d.ts +2 -0
- package/dist/agents/index.d.ts +21 -0
- package/dist/agents/qa-lead.d.ts +2 -0
- package/dist/agents/release-engineer.d.ts +2 -0
- package/dist/agents/retro-lead.d.ts +2 -0
- package/dist/agents/reviewer.d.ts +2 -0
- package/dist/agents/safety-guard.d.ts +2 -0
- package/dist/agents/session-manager.d.ts +2 -0
- package/dist/agents/types.d.ts +7 -0
- package/dist/agents/upgrader.d.ts +2 -0
- package/dist/cli/cli-program.d.ts +1 -0
- package/dist/cli/doctor/checks/config.d.ts +2 -0
- package/dist/cli/doctor/checks/index.d.ts +1 -0
- package/dist/cli/doctor/checks/mcp.d.ts +7 -0
- package/dist/cli/doctor/checks/system.d.ts +2 -0
- package/dist/cli/doctor/checks/tools.d.ts +2 -0
- package/dist/cli/doctor/index.d.ts +2 -0
- package/dist/cli/doctor/runner.d.ts +12 -0
- package/dist/cli/doctor/types.d.ts +11 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/install.d.ts +10 -0
- package/dist/cli.js +17011 -0
- package/dist/config/merge-configs.d.ts +2 -0
- package/dist/config/schema/agent-schema.d.ts +13 -0
- package/dist/config/schema/backlog-schema.d.ts +7 -0
- package/dist/config/schema/browser-schema.d.ts +6 -0
- package/dist/config/schema/constants.d.ts +1 -0
- package/dist/config/schema/index.d.ts +7 -0
- package/dist/config/schema/main.d.ts +150 -0
- package/dist/config/schema/mcp-schema.d.ts +51 -0
- package/dist/config/schema/telemetry-schema.d.ts +9 -0
- package/dist/create-hooks.d.ts +9 -0
- package/dist/create-managers.d.ts +17 -0
- package/dist/create-skills-and-agents.d.ts +8 -0
- package/dist/create-tools.d.ts +9 -0
- package/dist/features/analytics/eureka-tracker.d.ts +2 -0
- package/dist/features/analytics/index.d.ts +12 -0
- package/dist/features/analytics/skill-usage-tracker.d.ts +2 -0
- package/dist/features/analytics/sprint-logger.d.ts +2 -0
- package/dist/features/analytics/types.d.ts +38 -0
- package/dist/features/analytics/writer.d.ts +2 -0
- package/dist/features/browser-daemon/browser-manager.d.ts +99 -0
- package/dist/features/browser-daemon/buffers.d.ts +43 -0
- package/dist/features/browser-daemon/cli.d.ts +12 -0
- package/dist/features/browser-daemon/commands.d.ts +13 -0
- package/dist/features/browser-daemon/config.d.ts +6 -0
- package/dist/features/browser-daemon/cookie-import-browser.d.ts +70 -0
- package/dist/features/browser-daemon/cookie-picker-routes.d.ts +16 -0
- package/dist/features/browser-daemon/cookie-picker-ui.d.ts +9 -0
- package/dist/features/browser-daemon/find-browse.d.ts +7 -0
- package/dist/features/browser-daemon/index.d.ts +17 -0
- package/dist/features/browser-daemon/meta-commands.d.ts +6 -0
- package/dist/features/browser-daemon/platform.d.ts +3 -0
- package/dist/features/browser-daemon/read-commands.d.ts +11 -0
- package/dist/features/browser-daemon/server.d.ts +27 -0
- package/dist/features/browser-daemon/snapshot.d.ts +36 -0
- package/dist/features/browser-daemon/types.d.ts +31 -0
- package/dist/features/browser-daemon/url-validation.d.ts +5 -0
- package/dist/features/browser-daemon/write-commands.d.ts +8 -0
- package/dist/features/builtin-skills/index.d.ts +3 -0
- package/dist/features/builtin-skills/skills/benchmark.d.ts +2 -0
- package/dist/features/builtin-skills/skills/browse.d.ts +2 -0
- package/dist/features/builtin-skills/skills/canary.d.ts +2 -0
- package/dist/features/builtin-skills/skills/careful.d.ts +2 -0
- package/dist/features/builtin-skills/skills/codex.d.ts +2 -0
- package/dist/features/builtin-skills/skills/design-consultation.d.ts +2 -0
- package/dist/features/builtin-skills/skills/design-review.d.ts +2 -0
- package/dist/features/builtin-skills/skills/document-release.d.ts +2 -0
- package/dist/features/builtin-skills/skills/freeze.d.ts +2 -0
- package/dist/features/builtin-skills/skills/guard.d.ts +2 -0
- package/dist/features/builtin-skills/skills/index.d.ts +25 -0
- package/dist/features/builtin-skills/skills/investigate.d.ts +2 -0
- package/dist/features/builtin-skills/skills/land-and-deploy.d.ts +2 -0
- package/dist/features/builtin-skills/skills/office-hours.d.ts +2 -0
- package/dist/features/builtin-skills/skills/plan-ceo-review.d.ts +2 -0
- package/dist/features/builtin-skills/skills/plan-design-review.d.ts +2 -0
- package/dist/features/builtin-skills/skills/plan-eng-review.d.ts +2 -0
- package/dist/features/builtin-skills/skills/qa-only.d.ts +2 -0
- package/dist/features/builtin-skills/skills/qa.d.ts +2 -0
- package/dist/features/builtin-skills/skills/retro.d.ts +2 -0
- package/dist/features/builtin-skills/skills/review.d.ts +2 -0
- package/dist/features/builtin-skills/skills/setup-browser-cookies.d.ts +2 -0
- package/dist/features/builtin-skills/skills/setup-deploy.d.ts +2 -0
- package/dist/features/builtin-skills/skills/ship.d.ts +2 -0
- package/dist/features/builtin-skills/skills/unfreeze.d.ts +2 -0
- package/dist/features/builtin-skills/skills/upgrade.d.ts +2 -0
- package/dist/features/builtin-skills/skills.d.ts +3 -0
- package/dist/features/builtin-skills/types.d.ts +4 -0
- package/dist/features/orchestrator/delegation-engine.d.ts +19 -0
- package/dist/features/orchestrator/index.d.ts +21 -0
- package/dist/features/orchestrator/intent-classifier.d.ts +3 -0
- package/dist/features/orchestrator/intent-patterns.d.ts +4 -0
- package/dist/features/orchestrator/types.d.ts +22 -0
- package/dist/features/skill-adapter/content-transformer.d.ts +12 -0
- package/dist/features/skill-adapter/index.d.ts +4 -0
- package/dist/features/skill-adapter/placeholder-content.d.ts +5 -0
- package/dist/features/skill-adapter/template-resolver.d.ts +14 -0
- package/dist/features/skill-mcp-manager/cleanup.d.ts +4 -0
- package/dist/features/skill-mcp-manager/connection.d.ts +4 -0
- package/dist/features/skill-mcp-manager/index.d.ts +2 -0
- package/dist/features/skill-mcp-manager/manager.d.ts +19 -0
- package/dist/features/skill-mcp-manager/types.d.ts +33 -0
- package/dist/features/sprint-backlog/backlog-client.d.ts +18 -0
- package/dist/features/sprint-backlog/build-status-updater.d.ts +8 -0
- package/dist/features/sprint-backlog/graceful-degradation.d.ts +1 -0
- package/dist/features/sprint-backlog/index.d.ts +21 -0
- package/dist/features/sprint-backlog/ship-readiness-checker.d.ts +10 -0
- package/dist/features/sprint-backlog/think-plan-creator.d.ts +6 -0
- package/dist/features/sprint-backlog/types.d.ts +23 -0
- package/dist/features/workspace-state/boulder-storage.d.ts +16 -0
- package/dist/features/workspace-state/constants.d.ts +12 -0
- package/dist/features/workspace-state/ensure-workspace.d.ts +2 -0
- package/dist/features/workspace-state/index.d.ts +27 -0
- package/dist/features/workspace-state/notepad-manager.d.ts +6 -0
- package/dist/features/workspace-state/plan-progress.d.ts +4 -0
- package/dist/features/workspace-state/review-dashboard.d.ts +11 -0
- package/dist/features/workspace-state/session-tracker.d.ts +8 -0
- package/dist/features/workspace-state/types.d.ts +38 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +39359 -0
- package/dist/mcp/backlog-md.d.ts +2 -0
- package/dist/mcp/context7.d.ts +2 -0
- package/dist/mcp/contexthub.d.ts +2 -0
- package/dist/mcp/grep-app.d.ts +2 -0
- package/dist/mcp/index.d.ts +5 -0
- package/dist/mcp/types.d.ts +25 -0
- package/dist/mcp/websearch.d.ts +3 -0
- package/dist/plugin-config.d.ts +4 -0
- package/dist/plugin-handlers/config-handler.d.ts +10 -0
- package/dist/plugin-handlers/index.d.ts +3 -0
- package/dist/plugin-handlers/mcp-config-handler.d.ts +7 -0
- package/dist/plugin-interface.d.ts +18 -0
- package/dist/shared/deep-merge.d.ts +2 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/logger.d.ts +2 -0
- package/dist/shared/path-helpers.d.ts +17 -0
- package/dist/types/agent.d.ts +12 -0
- package/dist/types/config.d.ts +39 -0
- package/dist/types/mcp.d.ts +11 -0
- package/dist/types/orchestrator.d.ts +30 -0
- package/dist/types/skill.d.ts +20 -0
- package/dist/types.d.ts +5 -0
- package/package.json +96 -0
- package/schemas/config.schema.json +189 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type { BrowseConfig, CommandRequest, CommandResponse, HealthResponse, ServerState, } from './types.ts';
|
|
2
|
+
export { resolveConfig, getGitRoot, ensureBrowserStateDir, getRemoteSlug } from './config.ts';
|
|
3
|
+
export { CircularBuffer, consoleBuffer, networkBuffer, dialogBuffer, addConsoleEntry, addNetworkEntry, addDialogEntry, } from './buffers.ts';
|
|
4
|
+
export { BrowserManager } from './browser-manager.ts';
|
|
5
|
+
export { startServer } from './server.ts';
|
|
6
|
+
export { ALL_COMMANDS, READ_COMMANDS, WRITE_COMMANDS, META_COMMANDS, COMMAND_DESCRIPTIONS, } from './commands.ts';
|
|
7
|
+
export { IS_WINDOWS, TEMP_DIR, isPathWithin } from './platform.ts';
|
|
8
|
+
export { validateNavigationUrl } from './url-validation.ts';
|
|
9
|
+
export { handleSnapshot, parseSnapshotArgs, SNAPSHOT_FLAGS } from './snapshot.ts';
|
|
10
|
+
export { handleReadCommand, validateReadPath, getCleanText } from './read-commands.ts';
|
|
11
|
+
export { handleWriteCommand } from './write-commands.ts';
|
|
12
|
+
export { handleMetaCommand, validateOutputPath } from './meta-commands.ts';
|
|
13
|
+
export { findInstalledBrowsers, listDomains, importCookies, CookieImportError, } from './cookie-import-browser.ts';
|
|
14
|
+
export type { BrowserInfo, DomainEntry, ImportResult, PlaywrightCookie, } from './cookie-import-browser.ts';
|
|
15
|
+
export { handleCookiePickerRoute } from './cookie-picker-routes.ts';
|
|
16
|
+
export { getCookiePickerHTML } from './cookie-picker-ui.ts';
|
|
17
|
+
export { locateBinary } from './find-browse.ts';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meta commands — tabs, server control, screenshots, chain, diff, snapshot
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserManager } from './browser-manager.ts';
|
|
5
|
+
export declare function validateOutputPath(filePath: string): void;
|
|
6
|
+
export declare function handleMetaCommand(command: string, args: string[], bm: BrowserManager, shutdown: () => Promise<void> | void): Promise<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read commands — extract data from pages without side effects
|
|
3
|
+
*
|
|
4
|
+
* text, html, links, forms, accessibility, js, eval, css, attrs,
|
|
5
|
+
* console, network, cookies, storage, perf
|
|
6
|
+
*/
|
|
7
|
+
import type { BrowserManager } from './browser-manager.ts';
|
|
8
|
+
import type { Page } from 'playwright';
|
|
9
|
+
export declare function validateReadPath(filePath: string): void;
|
|
10
|
+
export declare function getCleanText(page: Page): Promise<string>;
|
|
11
|
+
export declare function handleReadCommand(command: string, args: string[], bm: BrowserManager): Promise<string>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BrowseConfig, ServerState } from './types.ts';
|
|
2
|
+
type BrowserManagerLike = {
|
|
3
|
+
serverPort: number;
|
|
4
|
+
launch: () => Promise<void>;
|
|
5
|
+
close: () => Promise<void>;
|
|
6
|
+
isHealthy: () => Promise<boolean>;
|
|
7
|
+
getTabCount: () => number;
|
|
8
|
+
getCurrentUrl: () => string;
|
|
9
|
+
resetFailures: () => void;
|
|
10
|
+
incrementFailures: () => void;
|
|
11
|
+
getFailureHint: () => string | null;
|
|
12
|
+
};
|
|
13
|
+
export type ServerRuntime = {
|
|
14
|
+
config: BrowseConfig;
|
|
15
|
+
token: string;
|
|
16
|
+
port: number;
|
|
17
|
+
state: ServerState;
|
|
18
|
+
shutdown: () => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
export type StartServerOptions = {
|
|
21
|
+
env?: Record<string, string | undefined>;
|
|
22
|
+
browserManager?: BrowserManagerLike;
|
|
23
|
+
skipBrowserLaunch?: boolean;
|
|
24
|
+
idleTimeoutMs?: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function startServer(options?: StartServerOptions): Promise<ServerRuntime>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Snapshot command — accessibility tree with ref-based element selection
|
|
3
|
+
*
|
|
4
|
+
* Architecture (Locator map — no DOM mutation):
|
|
5
|
+
* 1. page.locator(scope).ariaSnapshot() → YAML-like accessibility tree
|
|
6
|
+
* 2. Parse tree, assign refs @e1, @e2, ...
|
|
7
|
+
* 3. Build Playwright Locator for each ref (getByRole + nth)
|
|
8
|
+
* 4. Store Map<string, Locator> on BrowserManager
|
|
9
|
+
* 5. Return compact text output with refs prepended
|
|
10
|
+
*/
|
|
11
|
+
import type { BrowserManager } from './browser-manager.ts';
|
|
12
|
+
interface SnapshotOptions {
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
compact?: boolean;
|
|
15
|
+
depth?: number;
|
|
16
|
+
selector?: string;
|
|
17
|
+
diff?: boolean;
|
|
18
|
+
annotate?: boolean;
|
|
19
|
+
outputPath?: string;
|
|
20
|
+
cursorInteractive?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Snapshot flag metadata — single source of truth for CLI parsing and doc generation.
|
|
24
|
+
* Imported by gen-skill-docs.ts and skill-parser.ts.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SNAPSHOT_FLAGS: Array<{
|
|
27
|
+
short: string;
|
|
28
|
+
long: string;
|
|
29
|
+
description: string;
|
|
30
|
+
takesValue?: boolean;
|
|
31
|
+
valueHint?: string;
|
|
32
|
+
optionKey: keyof SnapshotOptions;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function parseSnapshotArgs(args: string[]): SnapshotOptions;
|
|
35
|
+
export declare function handleSnapshot(args: string[], bm: BrowserManager): Promise<string>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type BrowseConfig = {
|
|
2
|
+
projectDir: string;
|
|
3
|
+
stateDir: string;
|
|
4
|
+
stateFile: string;
|
|
5
|
+
consoleLog: string;
|
|
6
|
+
networkLog: string;
|
|
7
|
+
dialogLog: string;
|
|
8
|
+
};
|
|
9
|
+
export type ServerState = {
|
|
10
|
+
pid: number;
|
|
11
|
+
port: number;
|
|
12
|
+
token: string;
|
|
13
|
+
startedAt: string;
|
|
14
|
+
serverPath: string;
|
|
15
|
+
binaryVersion?: string;
|
|
16
|
+
};
|
|
17
|
+
export type HealthResponse = {
|
|
18
|
+
status: 'healthy' | 'unhealthy';
|
|
19
|
+
uptime: number;
|
|
20
|
+
pageCount: number;
|
|
21
|
+
};
|
|
22
|
+
export type CommandRequest = {
|
|
23
|
+
command: string;
|
|
24
|
+
args: string[];
|
|
25
|
+
};
|
|
26
|
+
export type CommandResponse = {
|
|
27
|
+
ok: boolean;
|
|
28
|
+
data?: string;
|
|
29
|
+
error?: string;
|
|
30
|
+
hint?: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write commands — navigate and interact with pages (side effects)
|
|
3
|
+
*
|
|
4
|
+
* goto, back, forward, reload, click, fill, select, hover, type,
|
|
5
|
+
* press, scroll, wait, viewport, cookie, header, useragent
|
|
6
|
+
*/
|
|
7
|
+
import type { BrowserManager } from './browser-manager.ts';
|
|
8
|
+
export declare function handleWriteCommand(command: string, args: string[], bm: BrowserManager): Promise<string>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { officeHoursSkill } from './office-hours.ts';
|
|
2
|
+
export { planCeoReviewSkill } from './plan-ceo-review.ts';
|
|
3
|
+
export { planEngReviewSkill } from './plan-eng-review.ts';
|
|
4
|
+
export { planDesignReviewSkill } from './plan-design-review.ts';
|
|
5
|
+
export { reviewSkill } from './review.ts';
|
|
6
|
+
export { designConsultationSkill } from './design-consultation.ts';
|
|
7
|
+
export { codexSkill } from './codex.ts';
|
|
8
|
+
export { carefulSkill } from './careful.ts';
|
|
9
|
+
export { freezeSkill } from './freeze.ts';
|
|
10
|
+
export { guardSkill } from './guard.ts';
|
|
11
|
+
export { unfreezeSkill } from './unfreeze.ts';
|
|
12
|
+
export { investigateSkill } from './investigate.ts';
|
|
13
|
+
export { retroSkill } from './retro.ts';
|
|
14
|
+
export { shipSkill } from './ship.ts';
|
|
15
|
+
export { landAndDeploySkill } from './land-and-deploy.ts';
|
|
16
|
+
export { setupDeploySkill } from './setup-deploy.ts';
|
|
17
|
+
export { documentReleaseSkill } from './document-release.ts';
|
|
18
|
+
export { browseSkill } from './browse.ts';
|
|
19
|
+
export { qaSkill } from './qa.ts';
|
|
20
|
+
export { qaOnlySkill } from './qa-only.ts';
|
|
21
|
+
export { designReviewSkill } from './design-review.ts';
|
|
22
|
+
export { benchmarkSkill } from './benchmark.ts';
|
|
23
|
+
export { canarySkill } from './canary.ts';
|
|
24
|
+
export { setupBrowserCookiesSkill } from './setup-browser-cookies.ts';
|
|
25
|
+
export { upgradeSkill } from './upgrade.ts';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GstackAgent, SprintPhase } from '../../types/agent.ts';
|
|
2
|
+
import type { BuiltinSkill } from '../../types/skill.ts';
|
|
3
|
+
import type { OrchestrationMode } from '../../types/config.ts';
|
|
4
|
+
import type { ClassifiedIntent } from './types.ts';
|
|
5
|
+
export interface DelegationResult {
|
|
6
|
+
agent: GstackAgent;
|
|
7
|
+
skills: BuiltinSkill[];
|
|
8
|
+
phase: SprintPhase;
|
|
9
|
+
reasoning: string;
|
|
10
|
+
fallbackSkills?: BuiltinSkill[];
|
|
11
|
+
}
|
|
12
|
+
export interface DelegationOptions {
|
|
13
|
+
agents: GstackAgent[];
|
|
14
|
+
skills: BuiltinSkill[];
|
|
15
|
+
orchestrationMode: OrchestrationMode;
|
|
16
|
+
disabledAgents?: Set<string>;
|
|
17
|
+
}
|
|
18
|
+
export declare function getPhaseSkills(phase: SprintPhase, allSkills: BuiltinSkill[]): BuiltinSkill[];
|
|
19
|
+
export declare function delegateIntent(classified: ClassifiedIntent, options: DelegationOptions): DelegationResult | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GstackAgent } from '../../types/agent.ts';
|
|
2
|
+
import type { BuiltinSkill } from '../../types/skill.ts';
|
|
3
|
+
import type { GstackConfig } from '../../types/config.ts';
|
|
4
|
+
import type { ClassifiedIntent } from './types.ts';
|
|
5
|
+
import type { DelegationResult } from './delegation-engine.ts';
|
|
6
|
+
export type { UserIntent, ClassifiedIntent, IntentClassifierOptions } from './types.ts';
|
|
7
|
+
export { PHASE_PATTERNS, SKILL_TO_PHASE_MAP, PHASE_TO_DEFAULT_AGENT } from './intent-patterns.ts';
|
|
8
|
+
export { classifyIntent, extractExplicitSkillName } from './intent-classifier.ts';
|
|
9
|
+
export type { DelegationResult, DelegationOptions } from './delegation-engine.ts';
|
|
10
|
+
export { delegateIntent, getPhaseSkills } from './delegation-engine.ts';
|
|
11
|
+
export interface OrchestratorOptions {
|
|
12
|
+
agents: GstackAgent[];
|
|
13
|
+
skills: BuiltinSkill[];
|
|
14
|
+
config: GstackConfig;
|
|
15
|
+
}
|
|
16
|
+
export interface Orchestrator {
|
|
17
|
+
classify(text: string): ClassifiedIntent;
|
|
18
|
+
delegate(classified: ClassifiedIntent): DelegationResult | null;
|
|
19
|
+
}
|
|
20
|
+
export declare function createOrchestrator(options: OrchestratorOptions): Orchestrator;
|
|
21
|
+
export type { SprintPhase } from '../../types/agent.ts';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentRole, SprintPhase } from '../../types/agent.ts';
|
|
2
|
+
export declare const PHASE_PATTERNS: Map<SprintPhase, RegExp[]>;
|
|
3
|
+
export declare const SKILL_TO_PHASE_MAP: Readonly<Record<string, SprintPhase>>;
|
|
4
|
+
export declare const PHASE_TO_DEFAULT_AGENT: Readonly<Record<SprintPhase, AgentRole>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SprintPhase } from '../../types/agent.ts';
|
|
2
|
+
import type { AgentRole } from '../../types/agent.ts';
|
|
3
|
+
import type { OrchestrationMode } from '../../types/config.ts';
|
|
4
|
+
export interface UserIntent {
|
|
5
|
+
text: string;
|
|
6
|
+
context?: {
|
|
7
|
+
currentPhase?: SprintPhase;
|
|
8
|
+
recentSkills?: string[];
|
|
9
|
+
hasDesignDoc?: boolean;
|
|
10
|
+
hasBacklog?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ClassifiedIntent {
|
|
14
|
+
phase: SprintPhase;
|
|
15
|
+
confidence: number;
|
|
16
|
+
suggestedAgent: AgentRole;
|
|
17
|
+
suggestedSkills: string[];
|
|
18
|
+
reasoning: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IntentClassifierOptions {
|
|
21
|
+
orchestrationMode: OrchestrationMode;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms raw gstack SKILL.md content for OpenCode compatibility.
|
|
3
|
+
* Removes Claude Code / gstack binary references and adapts paths.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Transforms raw gstack SKILL.md content to be OpenCode-compatible.
|
|
7
|
+
* Replaces binary references, absolute paths, and Claude Code-specific hooks.
|
|
8
|
+
*
|
|
9
|
+
* @param rawContent - Raw SKILL.md content from gstack
|
|
10
|
+
* @returns Transformed content safe for use in OpenCode
|
|
11
|
+
*/
|
|
12
|
+
export declare function transformSkillContent(rawContent: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { resolveTemplate, GSTACK_PLACEHOLDER_NAMES } from './template-resolver.ts';
|
|
2
|
+
export type { GstackPlaceholderName } from './template-resolver.ts';
|
|
3
|
+
export { transformSkillContent } from './content-transformer.ts';
|
|
4
|
+
export { DEFAULT_PLACEHOLDERS } from './placeholder-content.ts';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves {{PLACEHOLDER_NAME}} patterns in gstack skill template content.
|
|
3
|
+
* Unknown placeholders are left as-is (no error thrown).
|
|
4
|
+
*
|
|
5
|
+
* @param templateContent - Raw template string with {{PLACEHOLDER}} patterns
|
|
6
|
+
* @param placeholders - Map of placeholder name to replacement content
|
|
7
|
+
* @returns Resolved content with placeholders replaced
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveTemplate(templateContent: string, placeholders?: Record<string, string>): string;
|
|
10
|
+
/**
|
|
11
|
+
* The 9 standard gstack placeholder names.
|
|
12
|
+
*/
|
|
13
|
+
export declare const GSTACK_PLACEHOLDER_NAMES: readonly ["PREAMBLE", "COMMAND_REFERENCE", "SNAPSHOT_FLAGS", "BROWSE_SETUP", "BASE_BRANCH_DETECT", "QA_METHODOLOGY", "DESIGN_METHODOLOGY", "REVIEW_DASHBOARD", "TEST_BOOTSTRAP"];
|
|
14
|
+
export type GstackPlaceholderName = (typeof GSTACK_PLACEHOLDER_NAMES)[number];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SkillMcpManagerState } from './types.ts';
|
|
2
|
+
export declare function disconnectSession(state: SkillMcpManagerState, sessionID: string): Promise<void>;
|
|
3
|
+
export declare function disconnectAll(state: SkillMcpManagerState): Promise<void>;
|
|
4
|
+
export declare function forceReconnect(state: SkillMcpManagerState, clientKey: string): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
2
|
+
import type { SkillMcpClientConnectionParams } from './types.ts';
|
|
3
|
+
export declare function getOrCreateClient(params: SkillMcpClientConnectionParams): Promise<Client>;
|
|
4
|
+
export declare function getOrCreateClientWithRetryImpl(params: SkillMcpClientConnectionParams): Promise<Client>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
2
|
+
import type { Resource, Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import type { SkillMcpClientInfo, SkillMcpServerContext } from './types.ts';
|
|
4
|
+
import type { McpServerConfig } from '../../types/mcp.ts';
|
|
5
|
+
export declare class SkillMcpManager {
|
|
6
|
+
private readonly state;
|
|
7
|
+
private getClientKey;
|
|
8
|
+
getOrCreateClient(info: SkillMcpClientInfo, config: McpServerConfig): Promise<Client>;
|
|
9
|
+
disconnectSession(sessionID: string): Promise<void>;
|
|
10
|
+
disconnectAll(): Promise<void>;
|
|
11
|
+
listTools(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Tool[]>;
|
|
12
|
+
listResources(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Resource[]>;
|
|
13
|
+
callTool(info: SkillMcpClientInfo, context: SkillMcpServerContext, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
14
|
+
readResource(info: SkillMcpClientInfo, context: SkillMcpServerContext, uri: string): Promise<unknown>;
|
|
15
|
+
private withOperationRetry;
|
|
16
|
+
private getOrCreateClientWithRetry;
|
|
17
|
+
getConnectedServers(): string[];
|
|
18
|
+
isConnected(info: SkillMcpClientInfo): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
2
|
+
import type { McpServerConfig } from '../../types/mcp.ts';
|
|
3
|
+
export interface SkillMcpClientInfo {
|
|
4
|
+
serverName: string;
|
|
5
|
+
skillName: string;
|
|
6
|
+
sessionID: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SkillMcpServerContext {
|
|
9
|
+
config: McpServerConfig;
|
|
10
|
+
skillName: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ManagedClient {
|
|
13
|
+
client: Client;
|
|
14
|
+
skillName: string;
|
|
15
|
+
lastUsedAt: number;
|
|
16
|
+
connectionType: 'stdio' | 'remote';
|
|
17
|
+
}
|
|
18
|
+
export interface SkillMcpManagerState {
|
|
19
|
+
clients: Map<string, Client>;
|
|
20
|
+
pendingConnections: Map<string, Promise<Client>>;
|
|
21
|
+
disconnectedSessions: Map<string, number>;
|
|
22
|
+
idleTimeoutMs: number;
|
|
23
|
+
disposed: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface SkillMcpClientConnectionParams {
|
|
26
|
+
state: SkillMcpManagerState;
|
|
27
|
+
clientKey: string;
|
|
28
|
+
info: SkillMcpClientInfo;
|
|
29
|
+
config: McpServerConfig;
|
|
30
|
+
}
|
|
31
|
+
export interface McpToolInvoker {
|
|
32
|
+
invoke(serverName: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { McpToolInvoker } from '../skill-mcp-manager/index.ts';
|
|
2
|
+
import type { BacklogMcpAvailability, BacklogTask, BacklogTaskStatus } from './types.ts';
|
|
3
|
+
interface CreateTaskOptions {
|
|
4
|
+
priority?: BacklogTask['priority'];
|
|
5
|
+
assignee?: string;
|
|
6
|
+
dependencies?: string[];
|
|
7
|
+
definitionOfDone?: string[];
|
|
8
|
+
implementationPlan?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface BacklogClient {
|
|
11
|
+
isAvailable(): Promise<BacklogMcpAvailability>;
|
|
12
|
+
createTask(_title: string, _opts?: CreateTaskOptions): Promise<BacklogTask | null>;
|
|
13
|
+
updateStatus(_taskId: string, _status: BacklogTaskStatus): Promise<boolean>;
|
|
14
|
+
listTasks(_filter?: Record<string, unknown>): Promise<BacklogTask[]>;
|
|
15
|
+
archiveTask(_taskId: string): Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
export declare function createBacklogClient(mcpTools: McpToolInvoker): BacklogClient;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AgentRole } from '../../types/agent.ts';
|
|
2
|
+
import type { BacklogClient } from './backlog-client.ts';
|
|
3
|
+
export interface BuildStatusUpdater {
|
|
4
|
+
markInProgress(taskId: string, agent: AgentRole): Promise<void>;
|
|
5
|
+
markDone(taskId: string, agent: AgentRole): Promise<void>;
|
|
6
|
+
recordBlocker(taskId: string, reason: string): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare function createBuildStatusUpdater(client: BacklogClient): BuildStatusUpdater;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function withBacklogFallback<T>(operation: () => Promise<T>, fallback: T, context: string): Promise<T>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { McpToolInvoker } from '../skill-mcp-manager/index.ts';
|
|
2
|
+
import type { BacklogClient } from './backlog-client.ts';
|
|
3
|
+
import type { ThinkPlanTaskCreator } from './think-plan-creator.ts';
|
|
4
|
+
import type { BuildStatusUpdater } from './build-status-updater.ts';
|
|
5
|
+
import type { ShipReadinessChecker } from './ship-readiness-checker.ts';
|
|
6
|
+
import type { BacklogMcpAvailability } from './types.ts';
|
|
7
|
+
export type { BacklogTask, SprintContext, BacklogMcpAvailability } from './types.ts';
|
|
8
|
+
export type { BacklogClient } from './backlog-client.ts';
|
|
9
|
+
export { createBacklogClient } from './backlog-client.ts';
|
|
10
|
+
export { createThinkPlanTaskCreator } from './think-plan-creator.ts';
|
|
11
|
+
export { createBuildStatusUpdater } from './build-status-updater.ts';
|
|
12
|
+
export { createShipReadinessChecker } from './ship-readiness-checker.ts';
|
|
13
|
+
export { withBacklogFallback } from './graceful-degradation.ts';
|
|
14
|
+
export interface SprintBacklog {
|
|
15
|
+
client: BacklogClient;
|
|
16
|
+
taskCreator: ThinkPlanTaskCreator;
|
|
17
|
+
statusUpdater: BuildStatusUpdater;
|
|
18
|
+
shipChecker: ShipReadinessChecker;
|
|
19
|
+
isAvailable(): Promise<BacklogMcpAvailability>;
|
|
20
|
+
}
|
|
21
|
+
export declare function createSprintBacklog(mcpTools: McpToolInvoker): SprintBacklog;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BacklogClient } from './backlog-client.ts';
|
|
2
|
+
import type { BacklogTask } from './types.ts';
|
|
3
|
+
export interface ShipReadinessChecker {
|
|
4
|
+
check(): Promise<{
|
|
5
|
+
ready: boolean;
|
|
6
|
+
pendingTasks: BacklogTask[];
|
|
7
|
+
completionPercentage: number;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare function createShipReadinessChecker(client: BacklogClient): ShipReadinessChecker;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BacklogClient } from './backlog-client.ts';
|
|
2
|
+
import type { BacklogTask } from './types.ts';
|
|
3
|
+
export interface ThinkPlanTaskCreator {
|
|
4
|
+
createSprintTasks(planName: string, objectives: string[]): Promise<BacklogTask[]>;
|
|
5
|
+
}
|
|
6
|
+
export declare function createThinkPlanTaskCreator(client: BacklogClient): ThinkPlanTaskCreator;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SprintPhase } from '../../types/agent.ts';
|
|
2
|
+
export type BacklogTaskStatus = 'todo' | 'in-progress' | 'done' | 'archived';
|
|
3
|
+
export type BacklogTaskPriority = 'p0' | 'p1' | 'p2';
|
|
4
|
+
export interface BacklogTask {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
status: BacklogTaskStatus;
|
|
8
|
+
priority: BacklogTaskPriority;
|
|
9
|
+
assignee?: string;
|
|
10
|
+
dependencies?: string[];
|
|
11
|
+
definitionOfDone?: string[];
|
|
12
|
+
implementationPlan?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SprintContext {
|
|
15
|
+
sprintId: string;
|
|
16
|
+
phase: SprintPhase;
|
|
17
|
+
activeTasks: BacklogTask[];
|
|
18
|
+
completedTasks: BacklogTask[];
|
|
19
|
+
}
|
|
20
|
+
export interface BacklogMcpAvailability {
|
|
21
|
+
available: boolean;
|
|
22
|
+
reason?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoulderState } from './types.ts';
|
|
2
|
+
export interface UpsertTaskSessionInput {
|
|
3
|
+
taskKey: string;
|
|
4
|
+
taskLabel: string;
|
|
5
|
+
taskTitle: string;
|
|
6
|
+
sessionId: string;
|
|
7
|
+
agent?: string;
|
|
8
|
+
category?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function getBoulderFilePath(directory: string): string;
|
|
11
|
+
export declare function readBoulderState(directory: string): BoulderState | null;
|
|
12
|
+
export declare function writeBoulderState(directory: string, state: BoulderState): boolean;
|
|
13
|
+
export declare function appendSessionId(directory: string, sessionId: string): BoulderState | null;
|
|
14
|
+
export declare function clearBoulderState(directory: string): boolean;
|
|
15
|
+
export declare function createBoulderState(planPath: string, sessionId: string, agent?: string): BoulderState;
|
|
16
|
+
export declare function upsertTaskSessionState(directory: string, input: UpsertTaskSessionInput): BoulderState | null;
|