swellai 1.0.1 → 1.0.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/dist/src/cli/install.d.ts.map +1 -1
- package/dist/src/cli/install.js +7 -3
- package/dist/src/cli/install.js.map +1 -1
- package/package.json +2 -2
- package/templates/actions/detect-runtime/action.yml +113 -0
- package/templates/actions/fetch-agents/action.yml +34 -0
- package/templates/actions/get-issue-details/action.yml +60 -0
- package/templates/actions/setup-claude/action.yml +45 -0
- package/templates/actions/setup-opencode/action.yml +128 -0
- package/dist/agents/linear-agent.d.ts +0 -32
- package/dist/agents/linear-agent.d.ts.map +0 -1
- package/dist/agents/linear-agent.js +0 -263
- package/dist/agents/linear-agent.js.map +0 -1
- package/dist/agents/planning-agent.d.ts +0 -36
- package/dist/agents/planning-agent.d.ts.map +0 -1
- package/dist/agents/planning-agent.js +0 -248
- package/dist/agents/planning-agent.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -102
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/install.d.ts +0 -11
- package/dist/cli/install.d.ts.map +0 -1
- package/dist/cli/install.js +0 -257
- package/dist/cli/install.js.map +0 -1
- package/dist/cli/manifest.d.ts +0 -27
- package/dist/cli/manifest.d.ts.map +0 -1
- package/dist/cli/manifest.js +0 -65
- package/dist/cli/manifest.js.map +0 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +0 -1
- package/dist/lib/claude-agent-sdk.d.ts +0 -73
- package/dist/lib/claude-agent-sdk.d.ts.map +0 -1
- package/dist/lib/claude-agent-sdk.js +0 -114
- package/dist/lib/claude-agent-sdk.js.map +0 -1
- package/dist/lib/conversation-logger.d.ts +0 -66
- package/dist/lib/conversation-logger.d.ts.map +0 -1
- package/dist/lib/conversation-logger.js +0 -159
- package/dist/lib/conversation-logger.js.map +0 -1
- package/dist/lib/opencode.d.ts +0 -68
- package/dist/lib/opencode.d.ts.map +0 -1
- package/dist/lib/opencode.js +0 -151
- package/dist/lib/opencode.js.map +0 -1
- package/dist/lib/turso-schema.d.ts +0 -13
- package/dist/lib/turso-schema.d.ts.map +0 -1
- package/dist/lib/turso-schema.js +0 -69
- package/dist/lib/turso-schema.js.map +0 -1
- package/dist/lib/turso.d.ts +0 -56
- package/dist/lib/turso.d.ts.map +0 -1
- package/dist/lib/turso.js +0 -144
- package/dist/lib/turso.js.map +0 -1
- package/dist/lib/types.d.ts +0 -31
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/types.js +0 -20
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -34
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -72
- package/dist/lib/utils.js.map +0 -1
package/dist/cli/index.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { install } from "./install.js";
|
|
3
|
-
const HELP_TEXT = `
|
|
4
|
-
install-claude-parallel - Install Claude Parallel workflows into your repository
|
|
5
|
-
|
|
6
|
-
USAGE:
|
|
7
|
-
npx install-claude-parallel [OPTIONS]
|
|
8
|
-
|
|
9
|
-
OPTIONS:
|
|
10
|
-
--help Show this help message
|
|
11
|
-
--yes Skip confirmation prompts
|
|
12
|
-
--force Overwrite all files, including user-modified ones
|
|
13
|
-
--dry-run Show what would be changed without making any changes
|
|
14
|
-
|
|
15
|
-
DESCRIPTION:
|
|
16
|
-
Installs Claude Parallel workflows, scripts, prompts, and agents into your
|
|
17
|
-
repository. The installer copies files from templates and tracks them with
|
|
18
|
-
a manifest to detect user modifications on subsequent runs.
|
|
19
|
-
|
|
20
|
-
INSTALLED FILES:
|
|
21
|
-
.github/workflows/
|
|
22
|
-
- claude-plan.yml # Multi-provider plan generation workflow
|
|
23
|
-
- claude-implement.yml # Parallel implementation workflow
|
|
24
|
-
|
|
25
|
-
.github/claude-parallel/scripts/
|
|
26
|
-
- planning-agent.js # Plan generation agent
|
|
27
|
-
- linear-agent.js # Linear integration agent
|
|
28
|
-
- claude-agent-runner.js # Implementation agent runner
|
|
29
|
-
- detect-runtime.sh # Runtime detection script
|
|
30
|
-
|
|
31
|
-
.github/claude-parallel/prompts/
|
|
32
|
-
- plan-generation.md
|
|
33
|
-
- consolidate-and-create-linear.md
|
|
34
|
-
- implementation.md
|
|
35
|
-
- review.md
|
|
36
|
-
- verify.md
|
|
37
|
-
|
|
38
|
-
.claude/agents/
|
|
39
|
-
- coding-agent.md # Feature implementation agent
|
|
40
|
-
- codebase-locator.md # Code discovery agent
|
|
41
|
-
- codebase-analyzer.md # Code analysis agent
|
|
42
|
-
- debug-agent.md # Debugging agent
|
|
43
|
-
|
|
44
|
-
.env.example # Example environment variables
|
|
45
|
-
|
|
46
|
-
EXAMPLES:
|
|
47
|
-
# Install with confirmation prompts
|
|
48
|
-
npx install-claude-parallel
|
|
49
|
-
|
|
50
|
-
# Install without prompts
|
|
51
|
-
npx install-claude-parallel --yes
|
|
52
|
-
|
|
53
|
-
# Preview what would be installed
|
|
54
|
-
npx install-claude-parallel --dry-run
|
|
55
|
-
|
|
56
|
-
# Force overwrite all files
|
|
57
|
-
npx install-claude-parallel --force
|
|
58
|
-
|
|
59
|
-
ENVIRONMENT VARIABLES:
|
|
60
|
-
See .env.example after installation for required GitHub Actions secrets.
|
|
61
|
-
|
|
62
|
-
UPDATES:
|
|
63
|
-
Re-running the installer will update files to the latest version while
|
|
64
|
-
preserving your modifications. Use --force to overwrite everything.
|
|
65
|
-
|
|
66
|
-
DOCUMENTATION:
|
|
67
|
-
https://github.com/mkrueger12/claude-parallel
|
|
68
|
-
`;
|
|
69
|
-
function parseArgs(args) {
|
|
70
|
-
return {
|
|
71
|
-
help: args.includes("--help") || args.includes("-h"),
|
|
72
|
-
yes: args.includes("--yes") || args.includes("-y"),
|
|
73
|
-
force: args.includes("--force") || args.includes("-f"),
|
|
74
|
-
dryRun: args.includes("--dry-run"),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
async function main() {
|
|
78
|
-
const args = parseArgs(process.argv.slice(2));
|
|
79
|
-
if (args.help) {
|
|
80
|
-
console.log(HELP_TEXT);
|
|
81
|
-
process.exit(0);
|
|
82
|
-
}
|
|
83
|
-
try {
|
|
84
|
-
await install({
|
|
85
|
-
force: args.force,
|
|
86
|
-
dryRun: args.dryRun,
|
|
87
|
-
yes: args.yes,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
console.error("\n❌ Installation failed:");
|
|
92
|
-
if (error instanceof Error) {
|
|
93
|
-
console.error(` ${error.message}`);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
console.error(` ${String(error)}`);
|
|
97
|
-
}
|
|
98
|
-
process.exit(1);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
main();
|
|
102
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEjB,CAAC;AASF,SAAS,SAAS,CAAC,IAAc;IAC/B,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACpD,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QAClD,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;KACnC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,CAAC;YACZ,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC1C,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/cli/install.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface InstallOptions {
|
|
2
|
-
force?: boolean;
|
|
3
|
-
dryRun?: boolean;
|
|
4
|
-
yes?: boolean;
|
|
5
|
-
targetDir?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Main install function
|
|
9
|
-
*/
|
|
10
|
-
export declare function install(options?: InstallOptions): Promise<void>;
|
|
11
|
-
//# sourceMappingURL=install.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyMD;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6GzE"}
|
package/dist/cli/install.js
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import { chmodSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
|
|
2
|
-
import { dirname, join, relative } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { calculateFileHash, createManifest, isFileModified, readManifest, writeManifest, } from "./manifest.js";
|
|
5
|
-
// Get the directory where the installed package is located
|
|
6
|
-
function getPackageDir() {
|
|
7
|
-
// When running from dist/cli/install.js, we need to go up to the package root
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = dirname(__filename);
|
|
10
|
-
// dist/cli/install.js -> go up two levels to package root
|
|
11
|
-
return join(__dirname, "..", "..");
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Find all template files recursively
|
|
15
|
-
*/
|
|
16
|
-
function findTemplateFiles(templatesDir, baseDir = templatesDir) {
|
|
17
|
-
const files = [];
|
|
18
|
-
const entries = readdirSync(templatesDir);
|
|
19
|
-
for (const entry of entries) {
|
|
20
|
-
const fullPath = join(templatesDir, entry);
|
|
21
|
-
const stat = statSync(fullPath);
|
|
22
|
-
if (stat.isDirectory()) {
|
|
23
|
-
files.push(...findTemplateFiles(fullPath, baseDir));
|
|
24
|
-
}
|
|
25
|
-
else if (stat.isFile()) {
|
|
26
|
-
// Get relative path from templates directory
|
|
27
|
-
files.push(relative(baseDir, fullPath));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return files;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Map template file paths to destination paths in target repository
|
|
34
|
-
*/
|
|
35
|
-
function getDestinationPath(templateRelativePath) {
|
|
36
|
-
// workflows/* -> .github/workflows/*
|
|
37
|
-
if (templateRelativePath.startsWith("workflows/")) {
|
|
38
|
-
return templateRelativePath.replace("workflows/", ".github/workflows/");
|
|
39
|
-
}
|
|
40
|
-
// scripts/* -> .github/claude-parallel/scripts/*
|
|
41
|
-
if (templateRelativePath.startsWith("scripts/")) {
|
|
42
|
-
return templateRelativePath.replace("scripts/", ".github/claude-parallel/scripts/");
|
|
43
|
-
}
|
|
44
|
-
// prompts/* -> .github/claude-parallel/prompts/*
|
|
45
|
-
if (templateRelativePath.startsWith("prompts/")) {
|
|
46
|
-
return templateRelativePath.replace("prompts/", ".github/claude-parallel/prompts/");
|
|
47
|
-
}
|
|
48
|
-
// agents/* -> .claude/agents/*
|
|
49
|
-
if (templateRelativePath.startsWith("agents/")) {
|
|
50
|
-
return templateRelativePath.replace("agents/", ".claude/agents/");
|
|
51
|
-
}
|
|
52
|
-
// .env.example -> .env.example (root)
|
|
53
|
-
if (templateRelativePath === ".env.example") {
|
|
54
|
-
return ".env.example";
|
|
55
|
-
}
|
|
56
|
-
// Default: keep the same path
|
|
57
|
-
return templateRelativePath;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Determine what action to take for each file
|
|
61
|
-
*/
|
|
62
|
-
function planFileActions(templateFiles, templatesDir, targetDir, manifest, options) {
|
|
63
|
-
const actions = [];
|
|
64
|
-
for (const templateFile of templateFiles) {
|
|
65
|
-
const sourcePath = join(templatesDir, templateFile);
|
|
66
|
-
const destRelativePath = getDestinationPath(templateFile);
|
|
67
|
-
const destPath = join(targetDir, destRelativePath);
|
|
68
|
-
// If destination doesn't exist, install it
|
|
69
|
-
if (!existsSync(destPath)) {
|
|
70
|
-
actions.push({
|
|
71
|
-
sourcePath,
|
|
72
|
-
destPath,
|
|
73
|
-
action: "install",
|
|
74
|
-
});
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
// Destination exists - check if it was modified
|
|
78
|
-
const destContent = readFileSync(destPath, "utf-8");
|
|
79
|
-
const wasModified = isFileModified(destRelativePath, destContent, manifest);
|
|
80
|
-
if (options.force) {
|
|
81
|
-
actions.push({
|
|
82
|
-
sourcePath,
|
|
83
|
-
destPath,
|
|
84
|
-
action: "overwrite",
|
|
85
|
-
reason: wasModified ? "user modified, forcing overwrite" : "forcing overwrite",
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else if (wasModified) {
|
|
89
|
-
actions.push({
|
|
90
|
-
sourcePath,
|
|
91
|
-
destPath,
|
|
92
|
-
action: "skip-modified",
|
|
93
|
-
reason: "file was modified by user",
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
// File exists but wasn't modified (same hash as manifest) - update it
|
|
98
|
-
actions.push({
|
|
99
|
-
sourcePath,
|
|
100
|
-
destPath,
|
|
101
|
-
action: "install",
|
|
102
|
-
reason: "updating to new version",
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return actions;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Execute the planned file actions
|
|
110
|
-
*/
|
|
111
|
-
function executeFileActions(actions, dryRun) {
|
|
112
|
-
const installed = [];
|
|
113
|
-
const skipped = [];
|
|
114
|
-
const overwritten = [];
|
|
115
|
-
for (const action of actions) {
|
|
116
|
-
const destRelative = action.destPath.split("/").slice(-5).join("/"); // Show last 5 path segments
|
|
117
|
-
if (action.action === "skip-modified" || action.action === "skip-exists") {
|
|
118
|
-
skipped.push(` ⚠ ${destRelative} (${action.reason || "user modified"})`);
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
if (dryRun) {
|
|
122
|
-
if (action.action === "overwrite") {
|
|
123
|
-
overwritten.push(` ↻ ${destRelative} (would overwrite)`);
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
installed.push(` ✓ ${destRelative} (would install)`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
// Create directory if needed
|
|
131
|
-
const destDir = dirname(action.destPath);
|
|
132
|
-
if (!existsSync(destDir)) {
|
|
133
|
-
mkdirSync(destDir, { recursive: true });
|
|
134
|
-
}
|
|
135
|
-
// Copy the file
|
|
136
|
-
const content = readFileSync(action.sourcePath, "utf-8");
|
|
137
|
-
writeFileSync(action.destPath, content, "utf-8");
|
|
138
|
-
// Copy executable permissions if source is executable
|
|
139
|
-
const sourceStat = statSync(action.sourcePath);
|
|
140
|
-
if (sourceStat.mode & 0o111) {
|
|
141
|
-
// Make the destination executable
|
|
142
|
-
chmodSync(action.destPath, 0o755);
|
|
143
|
-
}
|
|
144
|
-
if (action.action === "overwrite") {
|
|
145
|
-
overwritten.push(` ↻ ${destRelative}`);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
installed.push(` ✓ ${destRelative}`);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// Print summary
|
|
153
|
-
if (installed.length > 0) {
|
|
154
|
-
console.log(dryRun ? "\nWould install:" : "\nInstalled:");
|
|
155
|
-
installed.forEach((msg) => console.log(msg));
|
|
156
|
-
}
|
|
157
|
-
if (overwritten.length > 0) {
|
|
158
|
-
console.log(dryRun ? "\nWould overwrite:" : "\nOverwritten:");
|
|
159
|
-
overwritten.forEach((msg) => console.log(msg));
|
|
160
|
-
}
|
|
161
|
-
if (skipped.length > 0) {
|
|
162
|
-
console.log("\nSkipped (user modified):");
|
|
163
|
-
skipped.forEach((msg) => console.log(msg));
|
|
164
|
-
if (!dryRun) {
|
|
165
|
-
console.log("\nUse --force to overwrite user-modified files.");
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Main install function
|
|
171
|
-
*/
|
|
172
|
-
export async function install(options = {}) {
|
|
173
|
-
const targetDir = options.targetDir || process.cwd();
|
|
174
|
-
const packageDir = getPackageDir();
|
|
175
|
-
const templatesDir = join(packageDir, "templates");
|
|
176
|
-
console.log(`Installing claude-parallel to ${targetDir}...\n`);
|
|
177
|
-
// Check if running in a git repository
|
|
178
|
-
if (!existsSync(join(targetDir, ".git"))) {
|
|
179
|
-
console.warn("⚠ Warning: Target directory is not a git repository.");
|
|
180
|
-
console.warn(" claude-parallel works best in git repositories.\n");
|
|
181
|
-
}
|
|
182
|
-
// Check if templates directory exists
|
|
183
|
-
if (!existsSync(templatesDir)) {
|
|
184
|
-
throw new Error(`Templates directory not found at ${templatesDir}`);
|
|
185
|
-
}
|
|
186
|
-
// Read existing manifest
|
|
187
|
-
const manifest = readManifest(targetDir);
|
|
188
|
-
// Find all template files
|
|
189
|
-
const templateFiles = findTemplateFiles(templatesDir);
|
|
190
|
-
if (templateFiles.length === 0) {
|
|
191
|
-
throw new Error("No template files found");
|
|
192
|
-
}
|
|
193
|
-
// Plan what to do with each file
|
|
194
|
-
const actions = planFileActions(templateFiles, templatesDir, targetDir, manifest, options);
|
|
195
|
-
// Show what directories will be created
|
|
196
|
-
const dirsToCreate = new Set();
|
|
197
|
-
for (const action of actions) {
|
|
198
|
-
if (action.action === "install" || action.action === "overwrite") {
|
|
199
|
-
let dir = dirname(action.destPath);
|
|
200
|
-
while (dir !== targetDir && dir !== ".") {
|
|
201
|
-
dirsToCreate.add(dir);
|
|
202
|
-
dir = dirname(dir);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if (dirsToCreate.size > 0) {
|
|
207
|
-
console.log("Creating directories:");
|
|
208
|
-
Array.from(dirsToCreate)
|
|
209
|
-
.sort()
|
|
210
|
-
.forEach((dir) => {
|
|
211
|
-
const relDir = relative(targetDir, dir);
|
|
212
|
-
console.log(` - ${relDir}/`);
|
|
213
|
-
if (!options.dryRun && !existsSync(dir)) {
|
|
214
|
-
mkdirSync(dir, { recursive: true });
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
console.log("");
|
|
218
|
-
}
|
|
219
|
-
// Execute the actions
|
|
220
|
-
executeFileActions(actions, !!options.dryRun);
|
|
221
|
-
// Write manifest (unless dry-run)
|
|
222
|
-
if (!options.dryRun) {
|
|
223
|
-
const newManifest = createManifest("1.0.0", Object.fromEntries(actions
|
|
224
|
-
.filter((a) => a.action === "install" || a.action === "overwrite")
|
|
225
|
-
.map((a) => {
|
|
226
|
-
const destRelative = relative(targetDir, a.destPath);
|
|
227
|
-
const content = readFileSync(a.sourcePath, "utf-8");
|
|
228
|
-
return [destRelative, calculateFileHash(content)];
|
|
229
|
-
})));
|
|
230
|
-
// Merge with skipped files from old manifest
|
|
231
|
-
if (manifest) {
|
|
232
|
-
for (const action of actions) {
|
|
233
|
-
if (action.action === "skip-modified") {
|
|
234
|
-
const destRelative = relative(targetDir, action.destPath);
|
|
235
|
-
if (manifest.files[destRelative]) {
|
|
236
|
-
// Keep the old hash for skipped files
|
|
237
|
-
newManifest.files[destRelative] = manifest.files[destRelative];
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
writeManifest(targetDir, newManifest);
|
|
243
|
-
console.log("\n✓ Manifest saved to .github/claude-parallel/.install-manifest.json");
|
|
244
|
-
}
|
|
245
|
-
// Print summary
|
|
246
|
-
const installedCount = actions.filter((a) => a.action === "install" || a.action === "overwrite").length;
|
|
247
|
-
const skippedCount = actions.filter((a) => a.action === "skip-modified").length;
|
|
248
|
-
console.log("\nSummary:");
|
|
249
|
-
console.log(` - ${installedCount} file${installedCount !== 1 ? "s" : ""} ${options.dryRun ? "would be installed" : "installed"}`);
|
|
250
|
-
if (skippedCount > 0) {
|
|
251
|
-
console.log(` - ${skippedCount} file${skippedCount !== 1 ? "s" : ""} skipped (user modified)`);
|
|
252
|
-
}
|
|
253
|
-
if (!options.dryRun) {
|
|
254
|
-
console.log("\nDone! Run 'cat .env.example' to see required environment variables.");
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
//# sourceMappingURL=install.js.map
|
package/dist/cli/install.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,cAAc,EAEd,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AAgBvB,2DAA2D;AAC3D,SAAS,aAAa;IACpB,8EAA8E;IAC9E,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,0DAA0D;IAC1D,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,YAAoB,EAAE,UAAkB,YAAY;IAC7E,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAE1C,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,C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1D,CAAC,MAAM,CAAC;IACT,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,eAAe,CAAC,CAAC,MAAM,CAAC;IAEhF,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,OAAO,CAAC,GAAG,CACT,OAAO,cAAc,QAAQ,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,WAAW,EAAE,CACtH,CAAC;IACF,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,OAAO,YAAY,QAAQ,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAC;IAClG,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAAC;IACvF,CAAC;AACH,CAAC"}
|
package/dist/cli/manifest.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface Manifest {
|
|
2
|
-
version: string;
|
|
3
|
-
installedAt: string;
|
|
4
|
-
files: Record<string, string>;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Calculate SHA256 hash of file contents
|
|
8
|
-
*/
|
|
9
|
-
export declare function calculateFileHash(content: string): string;
|
|
10
|
-
/**
|
|
11
|
-
* Read the manifest file from the target directory
|
|
12
|
-
*/
|
|
13
|
-
export declare function readManifest(targetDir: string): Manifest | null;
|
|
14
|
-
/**
|
|
15
|
-
* Write the manifest file to the target directory
|
|
16
|
-
*/
|
|
17
|
-
export declare function writeManifest(targetDir: string, manifest: Manifest): void;
|
|
18
|
-
/**
|
|
19
|
-
* Create a new manifest with current timestamp and version
|
|
20
|
-
*/
|
|
21
|
-
export declare function createManifest(version: string, files: Record<string, string>): Manifest;
|
|
22
|
-
/**
|
|
23
|
-
* Check if a file has been modified by the user since installation
|
|
24
|
-
* Returns true if the file was modified, false otherwise
|
|
25
|
-
*/
|
|
26
|
-
export declare function isFileModified(filePath: string, currentContent: string, manifest: Manifest | null): boolean;
|
|
27
|
-
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/cli/manifest.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAID;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAc/D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAQzE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ,CAMvF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,GAAG,IAAI,GACxB,OAAO,CAYT"}
|
package/dist/cli/manifest.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
const MANIFEST_PATH = ".github/claude-parallel/.install-manifest.json";
|
|
5
|
-
/**
|
|
6
|
-
* Calculate SHA256 hash of file contents
|
|
7
|
-
*/
|
|
8
|
-
export function calculateFileHash(content) {
|
|
9
|
-
return createHash("sha256").update(content).digest("hex");
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Read the manifest file from the target directory
|
|
13
|
-
*/
|
|
14
|
-
export function readManifest(targetDir) {
|
|
15
|
-
const manifestPath = join(targetDir, MANIFEST_PATH);
|
|
16
|
-
if (!existsSync(manifestPath)) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
const content = readFileSync(manifestPath, "utf-8");
|
|
21
|
-
return JSON.parse(content);
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
console.warn(`Warning: Could not read manifest at ${manifestPath}:`, error);
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Write the manifest file to the target directory
|
|
30
|
-
*/
|
|
31
|
-
export function writeManifest(targetDir, manifest) {
|
|
32
|
-
const manifestPath = join(targetDir, MANIFEST_PATH);
|
|
33
|
-
try {
|
|
34
|
-
writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
throw new Error(`Failed to write manifest to ${manifestPath}: ${error}`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Create a new manifest with current timestamp and version
|
|
42
|
-
*/
|
|
43
|
-
export function createManifest(version, files) {
|
|
44
|
-
return {
|
|
45
|
-
version,
|
|
46
|
-
installedAt: new Date().toISOString(),
|
|
47
|
-
files,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Check if a file has been modified by the user since installation
|
|
52
|
-
* Returns true if the file was modified, false otherwise
|
|
53
|
-
*/
|
|
54
|
-
export function isFileModified(filePath, currentContent, manifest) {
|
|
55
|
-
if (!manifest) {
|
|
56
|
-
return false; // No manifest means fresh install, not modified
|
|
57
|
-
}
|
|
58
|
-
const recordedHash = manifest.files[filePath];
|
|
59
|
-
if (!recordedHash) {
|
|
60
|
-
return false; // File not in manifest, treat as new
|
|
61
|
-
}
|
|
62
|
-
const currentHash = calculateFileHash(currentContent);
|
|
63
|
-
return currentHash !== recordedHash;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=manifest.js.map
|
package/dist/cli/manifest.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/cli/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,MAAM,aAAa,GAAG,gDAAgD,CAAC;AAEvE;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC5C,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAEpD,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,uCAAuC,YAAY,GAAG,EAAE,KAAK,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,QAAkB;IACjE,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAEpD,IAAI,CAAC;QACH,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,+BAA+B,YAAY,KAAK,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,KAA6B;IAC3E,OAAO;QACL,OAAO;QACP,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACrC,KAAK;KACN,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAgB,EAChB,cAAsB,EACtB,QAAyB;IAEzB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,KAAK,CAAC,CAAC,gDAAgD;IAChE,CAAC;IAED,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC,CAAC,qCAAqC;IACrD,CAAC;IAED,MAAM,WAAW,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACtD,OAAO,WAAW,KAAK,YAAY,CAAC;AACtC,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public API exports for the multi-provider plan generation system.
|
|
3
|
-
*
|
|
4
|
-
* This module provides programmatic access to the planning and linear agents,
|
|
5
|
-
* as well as shared utilities and types.
|
|
6
|
-
*/
|
|
7
|
-
export type { AuthConfig, ClaudeQueryOptions } from "./lib/claude-agent-sdk.js";
|
|
8
|
-
export { getAuthentication, runClaudeQuery, } from "./lib/claude-agent-sdk.js";
|
|
9
|
-
export * from "./lib/conversation-logger.js";
|
|
10
|
-
export type { OpencodeServerOptions } from "./lib/opencode.js";
|
|
11
|
-
export { createOpencodeServer, setupEventMonitoring, } from "./lib/opencode.js";
|
|
12
|
-
export * from "./lib/turso.js";
|
|
13
|
-
export * from "./lib/turso-schema.js";
|
|
14
|
-
export type { Part, Provider, ProviderConfig } from "./lib/types.js";
|
|
15
|
-
export { API_KEY_ENV_VARS, DEFAULT_MODELS } from "./lib/types.js";
|
|
16
|
-
export { extractTextFromParts, getApiKey, validateEnvVars, validateProvider, } from "./lib/utils.js";
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,2BAA2B,CAAC;AAEnC,cAAc,8BAA8B,CAAC;AAE7C,YAAY,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AAEtC,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EACL,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public API exports for the multi-provider plan generation system.
|
|
3
|
-
*
|
|
4
|
-
* This module provides programmatic access to the planning and linear agents,
|
|
5
|
-
* as well as shared utilities and types.
|
|
6
|
-
*/
|
|
7
|
-
export { getAuthentication, runClaudeQuery, } from "./lib/claude-agent-sdk.js";
|
|
8
|
-
// Export conversation logging utilities
|
|
9
|
-
export * from "./lib/conversation-logger.js";
|
|
10
|
-
export { createOpencodeServer, setupEventMonitoring, } from "./lib/opencode.js";
|
|
11
|
-
// Export Turso client and schema utilities
|
|
12
|
-
export * from "./lib/turso.js";
|
|
13
|
-
export * from "./lib/turso-schema.js";
|
|
14
|
-
export { API_KEY_ENV_VARS, DEFAULT_MODELS } from "./lib/types.js";
|
|
15
|
-
// Export all utility functions
|
|
16
|
-
export { extractTextFromParts, getApiKey, validateEnvVars, validateProvider, } from "./lib/utils.js";
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,wCAAwC;AACxC,cAAc,8BAA8B,CAAC;AAG7C,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,2CAA2C;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAClE,+BAA+B;AAC/B,OAAO,EACL,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Agent SDK helper module for authentication and query configuration.
|
|
3
|
-
*
|
|
4
|
-
* This module provides utilities for running Claude Code-style queries using the
|
|
5
|
-
* @anthropic-ai/claude-agent-sdk package, mimicking the behavior of the CLI.
|
|
6
|
-
*/
|
|
7
|
-
import { type McpServerConfig, type Options } from "@anthropic-ai/claude-agent-sdk";
|
|
8
|
-
import type { ConversationLogger } from "./conversation-logger.js";
|
|
9
|
-
/**
|
|
10
|
-
* Authentication configuration
|
|
11
|
-
*/
|
|
12
|
-
export interface AuthConfig {
|
|
13
|
-
apiKey: string;
|
|
14
|
-
source: "oauth" | "api_key";
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Options for running a Claude query
|
|
18
|
-
*/
|
|
19
|
-
export interface ClaudeQueryOptions {
|
|
20
|
-
/**
|
|
21
|
-
* Working directory for the agent
|
|
22
|
-
*/
|
|
23
|
-
cwd: string;
|
|
24
|
-
/**
|
|
25
|
-
* Model to use (e.g., 'claude-opus-4-5-20251101')
|
|
26
|
-
*/
|
|
27
|
-
model?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Execution mode: implementation or review
|
|
30
|
-
*/
|
|
31
|
-
mode?: "implementation" | "review";
|
|
32
|
-
/**
|
|
33
|
-
* JSON schema for structured output (used in review mode)
|
|
34
|
-
*/
|
|
35
|
-
outputSchema?: Record<string, unknown>;
|
|
36
|
-
/**
|
|
37
|
-
* MCP (Model Context Protocol) servers configuration
|
|
38
|
-
*/
|
|
39
|
-
mcpServers?: Record<string, McpServerConfig>;
|
|
40
|
-
/**
|
|
41
|
-
* Additional SDK options to override defaults
|
|
42
|
-
*/
|
|
43
|
-
additionalOptions?: Partial<Options>;
|
|
44
|
-
/**
|
|
45
|
-
* Optional conversation logger for storing interactions
|
|
46
|
-
*/
|
|
47
|
-
logger?: ConversationLogger | null;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Get authentication credentials from environment variables.
|
|
51
|
-
*
|
|
52
|
-
* Checks for CLAUDE_CODE_OAUTH_TOKEN first, then falls back to ANTHROPIC_API_KEY.
|
|
53
|
-
* Sets ANTHROPIC_API_KEY in the environment if OAuth token is found (SDK expects this).
|
|
54
|
-
*
|
|
55
|
-
* @returns Authentication configuration with API key and source
|
|
56
|
-
* @throws Error if neither authentication method is available
|
|
57
|
-
*/
|
|
58
|
-
export declare function getAuthentication(): AuthConfig;
|
|
59
|
-
/**
|
|
60
|
-
* Run a Claude query with configuration matching the CLI behavior.
|
|
61
|
-
*
|
|
62
|
-
* This function configures the SDK to mimic how the Claude Code CLI works:
|
|
63
|
-
* - Uses the 'claude_code' system prompt preset
|
|
64
|
-
* - Loads project settings (CLAUDE.md files)
|
|
65
|
-
* - Bypasses permission prompts (for automation)
|
|
66
|
-
* - Supports structured output for review mode
|
|
67
|
-
*
|
|
68
|
-
* @param prompt - The prompt to send to Claude
|
|
69
|
-
* @param options - Configuration options for the query
|
|
70
|
-
* @returns AsyncGenerator that yields SDK messages
|
|
71
|
-
*/
|
|
72
|
-
export declare function runClaudeQuery(prompt: string, options: ClaudeQueryOptions): AsyncGenerator<import("@anthropic-ai/claude-agent-sdk").SDKMessage, void, unknown>;
|
|
73
|
-
//# sourceMappingURL=claude-agent-sdk.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-agent-sdk.d.ts","sourceRoot":"","sources":["../../src/lib/claude-agent-sdk.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,OAAO,EAAS,MAAM,gCAAgC,CAAC;AAC3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,GAAG,QAAQ,CAAC;IAEnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAE7C;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAErC;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CA+B9C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAuB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,sFAsEhF"}
|