@bastani/atomic 0.6.4 → 0.6.5-0
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/.agents/skills/create-spec/SKILL.md +6 -3
- package/.agents/skills/tdd/SKILL.md +107 -0
- package/.agents/skills/tdd/deep-modules.md +33 -0
- package/.agents/skills/tdd/interface-design.md +31 -0
- package/.agents/skills/tdd/mocking.md +59 -0
- package/.agents/skills/tdd/refactoring.md +10 -0
- package/.agents/skills/tdd/tests.md +61 -0
- package/.agents/skills/workflow-creator/SKILL.md +550 -0
- package/.agents/skills/workflow-creator/references/agent-sessions.md +891 -0
- package/.agents/skills/workflow-creator/references/agent-setup-recipe.md +266 -0
- package/.agents/skills/workflow-creator/references/computation-and-validation.md +201 -0
- package/.agents/skills/workflow-creator/references/control-flow.md +470 -0
- package/.agents/skills/workflow-creator/references/failure-modes.md +1014 -0
- package/.agents/skills/workflow-creator/references/getting-started.md +392 -0
- package/.agents/skills/workflow-creator/references/registry-and-validation.md +141 -0
- package/.agents/skills/workflow-creator/references/running-workflows.md +418 -0
- package/.agents/skills/workflow-creator/references/session-config.md +384 -0
- package/.agents/skills/workflow-creator/references/state-and-data-flow.md +356 -0
- package/.agents/skills/workflow-creator/references/user-input.md +234 -0
- package/.agents/skills/workflow-creator/references/workflow-inputs.md +392 -0
- package/.claude/agents/debugger.md +2 -2
- package/.claude/agents/reviewer.md +1 -1
- package/.claude/agents/worker.md +2 -2
- package/.github/agents/debugger.md +1 -1
- package/.github/agents/worker.md +1 -1
- package/.mcp.json +5 -1
- package/.opencode/agents/debugger.md +1 -1
- package/.opencode/agents/worker.md +1 -1
- package/README.md +236 -201
- package/dist/sdk/define-workflow.d.ts +11 -6
- package/dist/sdk/define-workflow.d.ts.map +1 -1
- package/dist/sdk/errors.d.ts +10 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +21 -9
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/primitives/inputs.d.ts +36 -0
- package/dist/sdk/primitives/inputs.d.ts.map +1 -0
- package/dist/sdk/primitives/metadata.d.ts +40 -0
- package/dist/sdk/primitives/metadata.d.ts.map +1 -0
- package/dist/sdk/primitives/run.d.ts +57 -0
- package/dist/sdk/primitives/run.d.ts.map +1 -0
- package/dist/sdk/primitives/sessions.d.ts +128 -0
- package/dist/sdk/primitives/sessions.d.ts.map +1 -0
- package/dist/sdk/runtime/executor.d.ts +24 -56
- package/dist/sdk/runtime/executor.d.ts.map +1 -1
- package/dist/sdk/runtime/orchestrator-entry.d.ts +26 -0
- package/dist/sdk/runtime/orchestrator-entry.d.ts.map +1 -0
- package/dist/sdk/runtime/tmux.d.ts +20 -0
- package/dist/sdk/runtime/tmux.d.ts.map +1 -1
- package/dist/sdk/types.d.ts +26 -86
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/claude/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/copilot/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/open-claude-design/claude/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/open-claude-design/copilot/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/open-claude-design/opencode/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts.map +1 -1
- package/dist/sdk/workflows/index.d.ts +20 -12
- package/dist/sdk/workflows/index.d.ts.map +1 -1
- package/dist/services/config/additional-instructions.d.ts +1 -1
- package/dist/services/config/additional-instructions.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/cli.ts +39 -56
- package/src/commands/builtin-registry.ts +37 -0
- package/src/commands/cli/chat/index.ts +1 -3
- package/src/{sdk → commands/cli}/management-commands.ts +15 -55
- package/src/commands/cli/session.ts +1 -1
- package/src/commands/cli/workflow-command.test.ts +250 -16
- package/src/commands/cli/workflow-inputs.test.ts +1 -0
- package/src/commands/cli/workflow-inputs.ts +13 -3
- package/src/commands/cli/workflow-list.test.ts +1 -0
- package/src/commands/cli/workflow-list.ts +0 -0
- package/src/commands/cli/workflow-status.ts +1 -1
- package/src/commands/cli/workflow.ts +191 -11
- package/src/sdk/define-workflow.test.ts +47 -16
- package/src/sdk/define-workflow.ts +24 -6
- package/src/sdk/errors.test.ts +11 -0
- package/src/sdk/errors.ts +13 -0
- package/src/sdk/index.test.ts +92 -0
- package/src/sdk/index.ts +71 -15
- package/src/sdk/primitives/inputs.ts +48 -0
- package/src/sdk/primitives/metadata.ts +63 -0
- package/src/sdk/primitives/run.ts +81 -0
- package/src/sdk/primitives/sessions.test.ts +594 -0
- package/src/sdk/primitives/sessions.ts +328 -0
- package/src/sdk/runtime/executor.ts +36 -115
- package/src/sdk/runtime/orchestrator-entry.ts +110 -0
- package/src/sdk/runtime/tmux.ts +33 -0
- package/src/sdk/types.ts +26 -91
- package/src/sdk/workflows/builtin/deep-research-codebase/claude/index.ts +1 -0
- package/src/sdk/workflows/builtin/deep-research-codebase/copilot/index.ts +1 -0
- package/src/sdk/workflows/builtin/deep-research-codebase/opencode/index.ts +1 -0
- package/src/sdk/workflows/builtin/open-claude-design/claude/index.ts +1 -0
- package/src/sdk/workflows/builtin/open-claude-design/copilot/index.ts +1 -0
- package/src/sdk/workflows/builtin/open-claude-design/opencode/index.ts +1 -0
- package/src/sdk/workflows/builtin/ralph/claude/index.ts +1 -0
- package/src/sdk/workflows/builtin/ralph/copilot/index.ts +1 -0
- package/src/sdk/workflows/builtin/ralph/opencode/index.ts +1 -0
- package/src/sdk/workflows/index.ts +68 -51
- package/src/services/config/additional-instructions.ts +1 -1
- package/.agents/skills/test-driven-development/SKILL.md +0 -371
- package/.agents/skills/test-driven-development/testing-anti-patterns.md +0 -299
- package/dist/commands/cli/session.d.ts +0 -67
- package/dist/commands/cli/session.d.ts.map +0 -1
- package/dist/commands/cli/workflow-status.d.ts +0 -63
- package/dist/commands/cli/workflow-status.d.ts.map +0 -1
- package/dist/sdk/commander.d.ts +0 -74
- package/dist/sdk/commander.d.ts.map +0 -1
- package/dist/sdk/management-commands.d.ts +0 -42
- package/dist/sdk/management-commands.d.ts.map +0 -1
- package/dist/sdk/workflow-cli.d.ts +0 -103
- package/dist/sdk/workflow-cli.d.ts.map +0 -1
- package/dist/sdk/workflows/builtin-registry.d.ts +0 -113
- package/dist/sdk/workflows/builtin-registry.d.ts.map +0 -1
- package/src/sdk/commander.ts +0 -161
- package/src/sdk/workflow-cli.ts +0 -409
- package/src/sdk/workflows/builtin-registry.ts +0 -23
package/src/sdk/runtime/tmux.ts
CHANGED
|
@@ -671,6 +671,23 @@ export function attachOrSwitch(sessionName: string): void {
|
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
|
|
674
|
+
/**
|
|
675
|
+
* Detach every client currently attached to the given atomic-managed
|
|
676
|
+
* tmux session. The session itself stays alive — only the clients are
|
|
677
|
+
* disconnected. Mirrors {@link attachSession}: attach connects a client,
|
|
678
|
+
* detachClients disconnects them.
|
|
679
|
+
*
|
|
680
|
+
* Best-effort: returns silently when the session has no attached clients
|
|
681
|
+
* or has already been torn down.
|
|
682
|
+
*/
|
|
683
|
+
export function detachClients(sessionName: string): void {
|
|
684
|
+
try {
|
|
685
|
+
tmuxExec(["detach-client", "-s", sessionName]);
|
|
686
|
+
} catch {
|
|
687
|
+
// No clients attached or session already gone — nothing to do.
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
|
|
674
691
|
/**
|
|
675
692
|
* Detach from the user's current tmux session and replace the client
|
|
676
693
|
* with an attach to a session on the atomic socket.
|
|
@@ -708,6 +725,22 @@ export function selectWindow(target: string): void {
|
|
|
708
725
|
tmuxExec(["select-window", "-t", target]);
|
|
709
726
|
}
|
|
710
727
|
|
|
728
|
+
/**
|
|
729
|
+
* Move the target session's current-window pointer forward by one.
|
|
730
|
+
* Equivalent to the `Ctrl+\` binding inside an attached client, but
|
|
731
|
+
* usable without a client and addressable by session name.
|
|
732
|
+
*/
|
|
733
|
+
export function nextWindow(sessionName: string): void {
|
|
734
|
+
tmuxExec(["next-window", "-t", sessionName]);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Move the target session's current-window pointer backward by one.
|
|
739
|
+
*/
|
|
740
|
+
export function previousWindow(sessionName: string): void {
|
|
741
|
+
tmuxExec(["previous-window", "-t", sessionName]);
|
|
742
|
+
}
|
|
743
|
+
|
|
711
744
|
// ---------------------------------------------------------------------------
|
|
712
745
|
// Normalization (ported from oh-my-codex's normalizeTmuxCapture)
|
|
713
746
|
// ---------------------------------------------------------------------------
|
package/src/sdk/types.ts
CHANGED
|
@@ -397,6 +397,22 @@ export interface WorkflowOptions<
|
|
|
397
397
|
name: string;
|
|
398
398
|
/** Human-readable description */
|
|
399
399
|
description?: string;
|
|
400
|
+
/**
|
|
401
|
+
* Absolute path of the workflow source file. Pass `import.meta.path` —
|
|
402
|
+
* the SDK uses this to import the workflow module inside the
|
|
403
|
+
* orchestrator child process. Required: a workflow without `source`
|
|
404
|
+
* cannot be re-imported by the orchestrator and `defineWorkflow`
|
|
405
|
+
* throws at compile time.
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```typescript
|
|
409
|
+
* defineWorkflow({
|
|
410
|
+
* name: "hello",
|
|
411
|
+
* source: import.meta.path, // ← required
|
|
412
|
+
* }).for("claude").run(...).compile();
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
source: string;
|
|
400
416
|
/**
|
|
401
417
|
* Optional declared inputs. When provided, the CLI materialises one
|
|
402
418
|
* `--<name>` flag per entry and the interactive picker renders one form
|
|
@@ -446,6 +462,7 @@ export type RegistrableWorkflow = {
|
|
|
446
462
|
readonly description: string;
|
|
447
463
|
readonly inputs: readonly WorkflowInput[];
|
|
448
464
|
readonly minSDKVersion: string | null;
|
|
465
|
+
readonly source: string;
|
|
449
466
|
readonly run: (...args: never[]) => Promise<void>;
|
|
450
467
|
};
|
|
451
468
|
|
|
@@ -487,97 +504,6 @@ export type Registry<
|
|
|
487
504
|
resolve(name: string, agent: AgentType): WorkflowDefinition | undefined;
|
|
488
505
|
};
|
|
489
506
|
|
|
490
|
-
/**
|
|
491
|
-
* Argv control for `WorkflowCli.run`.
|
|
492
|
-
*
|
|
493
|
-
* - `undefined` — parse `process.argv` (default).
|
|
494
|
-
* - `string[]` — parse this explicit argv list (tests, embedding).
|
|
495
|
-
* - `false` — skip parsing; use `inputs` / `name` / `agent` as provided.
|
|
496
|
-
*/
|
|
497
|
-
export type ArgvMode = string[] | false;
|
|
498
|
-
|
|
499
|
-
/** Options for constructing a WorkflowCli via `createWorkflowCli()`. */
|
|
500
|
-
export interface CreateWorkflowCliOptions {
|
|
501
|
-
/** Programmatic inputs. CLI flags override these. */
|
|
502
|
-
inputs?: Record<string, string>;
|
|
503
|
-
/**
|
|
504
|
-
* Absolute path to the composition root file. The executor re-executes
|
|
505
|
-
* this path with `ATOMIC_ORCHESTRATOR_MODE=1` when detach is requested,
|
|
506
|
-
* so re-entry lands on the module that wired the dispatcher. Defaults
|
|
507
|
-
* to `process.argv[1]` — override when your composition root isn't
|
|
508
|
-
* argv[1] (test harnesses, bundled CLIs, embedded programs).
|
|
509
|
-
*/
|
|
510
|
-
entry?: string;
|
|
511
|
-
/**
|
|
512
|
-
* Hook to attach sibling commands to the standalone `run()` CLI. The
|
|
513
|
-
* callback runs once against the Commander program `run()` built
|
|
514
|
-
* internally. Not used by the `toCommand` adapter — if you're embedding,
|
|
515
|
-
* add your siblings to the parent directly.
|
|
516
|
-
*/
|
|
517
|
-
extend?: (program: import("@commander-js/extra-typings").Command) => void;
|
|
518
|
-
/**
|
|
519
|
-
* When `true` (the default), the generated CLI auto-registers the
|
|
520
|
-
* session + status management subcommands — `session list`,
|
|
521
|
-
* `session connect`, `session kill`, and `status` — so SDK users get
|
|
522
|
-
* the same monitoring UX as `atomic workflow …` without needing the
|
|
523
|
-
* global `atomic` binary.
|
|
524
|
-
*
|
|
525
|
-
* Every session spawned by the SDK lives on the shared `atomic` tmux
|
|
526
|
-
* socket, so these commands are pure pass-throughs to the same
|
|
527
|
-
* implementations the global CLI uses; there's no divergence. Set to
|
|
528
|
-
* `false` only when you want a minimal CLI (e.g. programmatic invocation
|
|
529
|
-
* or embedding under a parent Commander program where the parent owns
|
|
530
|
-
* session management).
|
|
531
|
-
*
|
|
532
|
-
* The `session` and `status` names are reserved — workflow inputs
|
|
533
|
-
* declared with those names will throw at `defineWorkflow` time to
|
|
534
|
-
* avoid flag collisions.
|
|
535
|
-
*/
|
|
536
|
-
includeManagementCommands?: boolean;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* A CLI program that resolves `--name` + `--agent` from argv and runs the
|
|
541
|
-
* matching workflow from a registry. Used by multi-workflow CLIs (e.g.
|
|
542
|
-
* the internal `atomic workflow` command) and single-workflow entry points.
|
|
543
|
-
*
|
|
544
|
-
* Framework-agnostic by design. To embed under a parent CLI, use the
|
|
545
|
-
* `toCommand` adapter in `@bastani/atomic/workflows/commander`.
|
|
546
|
-
*/
|
|
547
|
-
export interface WorkflowCli<
|
|
548
|
-
T extends Record<string, WorkflowDefinition> = Record<string, WorkflowDefinition>,
|
|
549
|
-
> {
|
|
550
|
-
/** Registry the CLI was constructed with. */
|
|
551
|
-
readonly registry: Registry<T>;
|
|
552
|
-
/**
|
|
553
|
-
* Absolute path the executor re-execs on `--detach`. Defaults to
|
|
554
|
-
* `process.argv[1]`; override via `createWorkflowCli(reg, { entry })`.
|
|
555
|
-
*/
|
|
556
|
-
readonly entry: string;
|
|
557
|
-
/**
|
|
558
|
-
* Input defaults supplied at construction. The adapter reads these so
|
|
559
|
-
* CLI-built Commands merge them identically to `run()`.
|
|
560
|
-
*/
|
|
561
|
-
readonly defaults: Record<string, string> | undefined;
|
|
562
|
-
/**
|
|
563
|
-
* Run the workflow CLI.
|
|
564
|
-
*
|
|
565
|
-
* - Default (`argv` unset): parses `process.argv` with `-n/--name`,
|
|
566
|
-
* `-a/--agent`, and the per-input union across the registry;
|
|
567
|
-
* `inputs`/`name`/`agent` layer in as defaults.
|
|
568
|
-
* - `argv: [...]`: parses the given argv list the same way.
|
|
569
|
-
* - `argv: false`: skip parsing; `name` and `agent` are required and
|
|
570
|
-
* `inputs` are used as-is.
|
|
571
|
-
*/
|
|
572
|
-
run(options?: {
|
|
573
|
-
name?: string;
|
|
574
|
-
agent?: AgentType;
|
|
575
|
-
inputs?: Record<string, string>;
|
|
576
|
-
argv?: ArgvMode;
|
|
577
|
-
detach?: boolean;
|
|
578
|
-
}): Promise<void>;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
507
|
/**
|
|
582
508
|
* A compiled workflow definition — the sealed output of defineWorkflow().compile().
|
|
583
509
|
*/
|
|
@@ -590,6 +516,15 @@ export interface WorkflowDefinition<
|
|
|
590
516
|
/** The agent this workflow targets. Set via `.for(agent)` in the builder. */
|
|
591
517
|
readonly agent: A;
|
|
592
518
|
readonly description: string;
|
|
519
|
+
/**
|
|
520
|
+
* Absolute path of the workflow source file (the value of
|
|
521
|
+
* `import.meta.path` at the `defineWorkflow()` call site).
|
|
522
|
+
*
|
|
523
|
+
* The SDK's orchestrator entry script `import()`s this path inside
|
|
524
|
+
* the child process to recover the compiled definition without any
|
|
525
|
+
* reliance on environment variables or the parent CLI's argv.
|
|
526
|
+
*/
|
|
527
|
+
readonly source: string;
|
|
593
528
|
/**
|
|
594
529
|
* Declared input schema — empty tuple for free-form workflows.
|
|
595
530
|
* Typed as the builder-supplied `I` so consumers (e.g.
|
|
@@ -159,6 +159,7 @@ function logBatchRejections(
|
|
|
159
159
|
|
|
160
160
|
export default defineWorkflow({
|
|
161
161
|
name: "deep-research-codebase",
|
|
162
|
+
source: import.meta.path,
|
|
162
163
|
description:
|
|
163
164
|
"Deterministic deep codebase research: scout → per-partition specialist sub-agents → aggregator",
|
|
164
165
|
inputs: [
|
|
@@ -109,6 +109,7 @@ function logBatchRejections(
|
|
|
109
109
|
|
|
110
110
|
export default defineWorkflow({
|
|
111
111
|
name: "deep-research-codebase",
|
|
112
|
+
source: import.meta.path,
|
|
112
113
|
description:
|
|
113
114
|
"Deterministic deep codebase research: scout → per-partition specialist sub-agents → aggregator",
|
|
114
115
|
inputs: [
|
|
@@ -100,6 +100,7 @@ function logBatchRejections(
|
|
|
100
100
|
|
|
101
101
|
export default defineWorkflow({
|
|
102
102
|
name: "deep-research-codebase",
|
|
103
|
+
source: import.meta.path,
|
|
103
104
|
description:
|
|
104
105
|
"Deterministic deep codebase research: scout → per-partition specialist sub-agents → aggregator",
|
|
105
106
|
inputs: [
|
|
@@ -89,6 +89,7 @@ function getAssistantText(messages: SessionEvent[]): string {
|
|
|
89
89
|
|
|
90
90
|
export default defineWorkflow({
|
|
91
91
|
name: "open-claude-design",
|
|
92
|
+
source: import.meta.path,
|
|
92
93
|
description:
|
|
93
94
|
"AI-powered design workflow: design system onboarding → import → generate → refine → export/handoff",
|
|
94
95
|
inputs: [
|
|
@@ -75,6 +75,7 @@ function extractReview(
|
|
|
75
75
|
|
|
76
76
|
export default defineWorkflow({
|
|
77
77
|
name: "ralph",
|
|
78
|
+
source: import.meta.path,
|
|
78
79
|
description: "Plan → orchestrate → review loop with bounded iteration",
|
|
79
80
|
inputs: [
|
|
80
81
|
{ name: "prompt", type: "text", required: true, description: "task prompt" },
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* atomic/workflows
|
|
2
|
+
* @bastani/atomic/workflows — workflow SDK barrel.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Mirrors the root barrel for the historical `/workflows` import path.
|
|
5
|
+
* Provider-specific helpers (validators, native SDK type re-exports) and
|
|
6
|
+
* the validation warning type live here so consumers don't have to drill
|
|
7
|
+
* into provider modules directly.
|
|
8
|
+
*
|
|
9
|
+
* Tmux helpers and other runtime utilities are intentionally NOT
|
|
10
|
+
* re-exported — they are private to the SDK and the atomic CLI.
|
|
7
11
|
*/
|
|
8
12
|
|
|
13
|
+
// ─── Authoring ──────────────────────────────────────────────────────────────
|
|
9
14
|
export { defineWorkflow, WorkflowBuilder } from "../define-workflow.ts";
|
|
10
15
|
export { createRegistry } from "../registry.ts";
|
|
11
16
|
export type { Registry } from "../registry.ts";
|
|
12
17
|
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
// ─── Errors ─────────────────────────────────────────────────────────────────
|
|
19
|
+
export {
|
|
20
|
+
MissingDependencyError,
|
|
21
|
+
WorkflowNotCompiledError,
|
|
22
|
+
InvalidWorkflowError,
|
|
23
|
+
SessionNotFoundError,
|
|
24
|
+
} from "../errors.ts";
|
|
20
25
|
|
|
26
|
+
// ─── Shared types ───────────────────────────────────────────────────────────
|
|
21
27
|
export type {
|
|
22
28
|
AgentType,
|
|
23
|
-
ValidationWarning,
|
|
24
29
|
Transcript,
|
|
25
30
|
SavedMessage,
|
|
26
31
|
SaveTranscript,
|
|
@@ -28,6 +33,7 @@ export type {
|
|
|
28
33
|
SessionRef,
|
|
29
34
|
SessionHandle,
|
|
30
35
|
SessionRunOptions,
|
|
36
|
+
ValidationWarning,
|
|
31
37
|
WorkflowContext,
|
|
32
38
|
WorkflowOptions,
|
|
33
39
|
WorkflowDefinition,
|
|
@@ -47,53 +53,64 @@ export type {
|
|
|
47
53
|
ClaudeSessionWrapper,
|
|
48
54
|
} from "../types.ts";
|
|
49
55
|
|
|
50
|
-
//
|
|
56
|
+
// ─── Native SDK message types ──────────────────────────────────────────────
|
|
51
57
|
export type { SessionEvent as CopilotSessionEvent } from "@github/copilot-sdk";
|
|
52
58
|
export type { SessionPromptResponse as OpenCodePromptResponse } from "@opencode-ai/sdk/v2";
|
|
53
59
|
export type { SessionMessage as ClaudeSessionMessage } from "@anthropic-ai/claude-agent-sdk";
|
|
54
60
|
|
|
55
|
-
//
|
|
56
|
-
export {
|
|
57
|
-
|
|
61
|
+
// ─── Provider helpers ──────────────────────────────────────────────────────
|
|
62
|
+
export {
|
|
63
|
+
createClaudeSession,
|
|
64
|
+
claudeQuery,
|
|
65
|
+
clearClaudeSession,
|
|
66
|
+
extractAssistantText,
|
|
67
|
+
validateClaudeWorkflow,
|
|
68
|
+
} from "../providers/claude.ts";
|
|
69
|
+
export type {
|
|
70
|
+
ClaudeSessionOptions,
|
|
71
|
+
ClaudeQueryOptions,
|
|
72
|
+
} from "../providers/claude.ts";
|
|
58
73
|
|
|
59
74
|
export { validateCopilotWorkflow } from "../providers/copilot.ts";
|
|
60
|
-
|
|
61
75
|
export { validateOpenCodeWorkflow } from "../providers/opencode.ts";
|
|
62
76
|
|
|
63
|
-
//
|
|
64
|
-
export
|
|
77
|
+
// ─── Metadata accessors ────────────────────────────────────────────────────
|
|
78
|
+
export {
|
|
79
|
+
getName,
|
|
80
|
+
getDescription,
|
|
81
|
+
getAgent,
|
|
82
|
+
getInputSchema,
|
|
83
|
+
getSource,
|
|
84
|
+
getMinSDKVersion,
|
|
85
|
+
} from "../primitives/metadata.ts";
|
|
86
|
+
|
|
87
|
+
// ─── Registry iteration ────────────────────────────────────────────────────
|
|
88
|
+
export { listWorkflows, getWorkflow } from "../index.ts";
|
|
89
|
+
|
|
90
|
+
// ─── Input validation ──────────────────────────────────────────────────────
|
|
91
|
+
export { validateInputs } from "../primitives/inputs.ts";
|
|
92
|
+
export type { ResolvedInputs } from "../primitives/inputs.ts";
|
|
93
|
+
|
|
94
|
+
// ─── Run a workflow ────────────────────────────────────────────────────────
|
|
95
|
+
export { runWorkflow } from "../primitives/run.ts";
|
|
96
|
+
export type {
|
|
97
|
+
RunWorkflowOptions,
|
|
98
|
+
RunWorkflowResult,
|
|
99
|
+
} from "../primitives/run.ts";
|
|
100
|
+
|
|
101
|
+
// ─── Session management ────────────────────────────────────────────────────
|
|
65
102
|
export {
|
|
66
|
-
SOCKET_NAME,
|
|
67
|
-
isTmuxInstalled,
|
|
68
|
-
getMuxBinary,
|
|
69
|
-
resetMuxBinaryCache,
|
|
70
|
-
isInsideTmux,
|
|
71
|
-
isInsideAtomicSocket,
|
|
72
|
-
createSession,
|
|
73
|
-
createWindow,
|
|
74
|
-
createPane,
|
|
75
|
-
sendLiteralText,
|
|
76
|
-
sendSpecialKey,
|
|
77
|
-
capturePane,
|
|
78
|
-
capturePaneVisible,
|
|
79
|
-
capturePaneScrollback,
|
|
80
|
-
killSession,
|
|
81
|
-
killSessionOnPaneExit,
|
|
82
|
-
killWindow,
|
|
83
|
-
sessionExists,
|
|
84
103
|
listSessions,
|
|
104
|
+
getSession,
|
|
105
|
+
stopSession,
|
|
85
106
|
attachSession,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
normalizeTmuxCapture,
|
|
97
|
-
normalizeTmuxLines,
|
|
98
|
-
} from "../runtime/tmux.ts";
|
|
99
|
-
|
|
107
|
+
getSessionStatus,
|
|
108
|
+
getSessionTranscript,
|
|
109
|
+
} from "../primitives/sessions.ts";
|
|
110
|
+
export type {
|
|
111
|
+
SessionInfo,
|
|
112
|
+
SessionScope,
|
|
113
|
+
StatusSnapshot,
|
|
114
|
+
ListSessionsOptions,
|
|
115
|
+
SessionPrimitiveDeps,
|
|
116
|
+
} from "../primitives/sessions.ts";
|
|
@@ -46,7 +46,7 @@ Use playwright-cli (refer to playwright-cli skill) for ALL browser automation ta
|
|
|
46
46
|
|
|
47
47
|
You are operating in an environment where ast-grep is installed. For any code search that requires understanding of syntax or code structure, you should default to using \`ast-grep --lang [language] -p '<pattern>'\`. Rely on your ast-grep skill for best practices. Adjust the --lang flag as needed for the specific programming language. Avoid using text-only search tools unless a plain-text search is explicitly requested.
|
|
48
48
|
|
|
49
|
-
3. **Testing**: ALWAYS invoke your
|
|
49
|
+
3. **Testing**: ALWAYS invoke your tdd skill BEFORE creating or modifying any tests.
|
|
50
50
|
|
|
51
51
|
4. **Sub-agent Orchestration**: You have a large number of tools available to you. The most important one is the one that allows you to dispatch sub-agents: either \`Agent\` or \`Task\`.
|
|
52
52
|
|