@a3t/rapid-core 0.1.6 → 0.1.7

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.d.ts CHANGED
@@ -58,6 +58,19 @@ interface AgentDefinition {
58
58
  envVars?: string[];
59
59
  installCmd?: string;
60
60
  args?: string[];
61
+ /**
62
+ * CLI argument pattern for injecting system prompts at runtime.
63
+ * Use {prompt} as placeholder for the prompt content.
64
+ * Example: "--append-system-prompt {prompt}" for Claude
65
+ * If not specified, system prompt injection via CLI is not supported.
66
+ */
67
+ systemPromptArg?: string;
68
+ /**
69
+ * Whether this agent reads instruction files from the filesystem automatically.
70
+ * If true, RAPID will ensure AGENTS.md exists with methodology.
71
+ * If false, RAPID will try to inject prompts via CLI args.
72
+ */
73
+ readsInstructionFiles?: boolean;
61
74
  }
62
75
  interface ContextConfig {
63
76
  files?: string[];
@@ -181,6 +194,28 @@ declare function getDefaultAgent(config: RapidConfig): AgentDefinition | null;
181
194
  * Get a specific agent by name
182
195
  */
183
196
  declare function getAgent(config: RapidConfig, name: string): AgentDefinition | null;
197
+ /**
198
+ * Build agent arguments with optional system prompt injection.
199
+ * For agents that support CLI-based system prompt injection (like Claude),
200
+ * this appends the RAPID methodology to the args.
201
+ */
202
+ declare function buildAgentArgs(agent: AgentDefinition, options?: {
203
+ /** Include system prompt injection if agent supports it */
204
+ injectSystemPrompt?: boolean;
205
+ /** Use compact methodology (shorter) */
206
+ compactPrompt?: boolean;
207
+ /** Custom system prompt to use instead of default RAPID methodology */
208
+ customPrompt?: string;
209
+ }): string[];
210
+ /**
211
+ * Check if an agent reads instruction files from the filesystem.
212
+ * These agents (like OpenCode) read AGENTS.md automatically.
213
+ */
214
+ declare function agentReadsInstructionFiles(agent: AgentDefinition): boolean;
215
+ /**
216
+ * Check if an agent supports runtime system prompt injection via CLI.
217
+ */
218
+ declare function agentSupportsRuntimeInjection(agent: AgentDefinition): boolean;
184
219
  /**
185
220
  * Launch an agent CLI
186
221
  */
@@ -641,11 +676,13 @@ interface McpServerEntry {
641
676
  env?: Record<string, string> | undefined;
642
677
  }
643
678
  /**
644
- * OpenCode config format
679
+ * OpenCode config file format
645
680
  */
646
681
  interface OpenCodeConfig {
647
682
  $schema?: string;
648
683
  mcp?: Record<string, OpenCodeMcpEntry>;
684
+ /** Instruction files to include in context */
685
+ instructions?: string[];
649
686
  }
650
687
  /**
651
688
  * OpenCode MCP entry format
@@ -715,4 +752,4 @@ declare function readMcpConfig(rootDir: string, config?: RapidConfig): Promise<G
715
752
  */
716
753
  declare function getMcpConfigPath(rootDir: string, config?: RapidConfig): string;
717
754
 
718
- export { type AgentDefinition, type AgentStatus, type AgentsConfig, type AuthStatus, CODE_EDITING_GUIDELINES, COMMUNICATION_GUIDELINES, type ContainerConfig, type ContainerStatus, type ContextConfig, DEBUGGING_GUIDELINES, type DetectedCredential, type DevcontainerConfig, type DotenvConfig, type EnvironmentStatus, type EnvrcConfig, type ExternalAuthConfig, type ExternalAuthSource, GIT_GUIDELINES, type GeneratedMcpConfig, type LoadedConfig, type LogLevel, MCP_SERVER_TEMPLATES, MCP_USAGE_GUIDELINES, type McpConfig, type McpServerConfig, type McpServerDefinition, type McpServerEntry, type McpServerInfo, type McpServerStatus, type McpServerTemplate, type OpAuthStatus, type OpenCodeConfig, type OpenCodeMcpEntry, RAPID_METHODOLOGY, RAPID_METHODOLOGY_COMPACT, RAPID_PHASES, type RapidConfig, type RapidPhase, type SecretStatus, type SecretsConfig, type SecretsStatus, addMcpServer, addMcpServerFromTemplate, checkAgentAvailable, checkAllAgents, detectAiderAuth, detectAllCredentials, detectClaudeCodeAuth, detectCodexAuth, detectEnvAuth, detectGeminiAuth, disableMcpServer, enableMcpServer, execInContainer, formatAuthStatus, generateEnvrc, generateFullSystemPrompt, generateMcpConfig, generateOpenCodeConfig, generateRapidMethodology, getAgent, getAuthEnvironment, getAuthStatus, getContainerName, getContainerStatus, getCredentialsForProvider, getDefaultAgent, getDefaultConfig, getDevcontainerPath, getEasySetupTemplates, getLogLevel, getMcpConfigPath, getMcpServerStatus, getMcpServers, getMcpTemplate, getMcpTemplateNames, getOpAuthStatus, getProviderInfo, getRequiredSecrets, getSecretReferences, getStandardAgentInstructions, hasDevcontainerCli, hasDocker, hasEnvrc, hasMcpConfig, hasOpCli, hasOpServiceAccountToken, hasVaultCli, isOpAuthenticated, isVaultAuthenticated, launchAgent, loadConfig, loadConfigFromFile, loadDevcontainerConfig, loadSecrets, logger, mergeWithDefaults, readEnvrc, readMcpConfig, readOpSecret, readVaultSecret, removeMcpServer, setLogLevel, startContainer, stopContainer, verifySecret, verifySecrets, writeEnvrc, writeMcpConfig, writeOpenCodeConfig };
755
+ export { type AgentDefinition, type AgentStatus, type AgentsConfig, type AuthStatus, CODE_EDITING_GUIDELINES, COMMUNICATION_GUIDELINES, type ContainerConfig, type ContainerStatus, type ContextConfig, DEBUGGING_GUIDELINES, type DetectedCredential, type DevcontainerConfig, type DotenvConfig, type EnvironmentStatus, type EnvrcConfig, type ExternalAuthConfig, type ExternalAuthSource, GIT_GUIDELINES, type GeneratedMcpConfig, type LoadedConfig, type LogLevel, MCP_SERVER_TEMPLATES, MCP_USAGE_GUIDELINES, type McpConfig, type McpServerConfig, type McpServerDefinition, type McpServerEntry, type McpServerInfo, type McpServerStatus, type McpServerTemplate, type OpAuthStatus, type OpenCodeConfig, type OpenCodeMcpEntry, RAPID_METHODOLOGY, RAPID_METHODOLOGY_COMPACT, RAPID_PHASES, type RapidConfig, type RapidPhase, type SecretStatus, type SecretsConfig, type SecretsStatus, addMcpServer, addMcpServerFromTemplate, agentReadsInstructionFiles, agentSupportsRuntimeInjection, buildAgentArgs, checkAgentAvailable, checkAllAgents, detectAiderAuth, detectAllCredentials, detectClaudeCodeAuth, detectCodexAuth, detectEnvAuth, detectGeminiAuth, disableMcpServer, enableMcpServer, execInContainer, formatAuthStatus, generateEnvrc, generateFullSystemPrompt, generateMcpConfig, generateOpenCodeConfig, generateRapidMethodology, getAgent, getAuthEnvironment, getAuthStatus, getContainerName, getContainerStatus, getCredentialsForProvider, getDefaultAgent, getDefaultConfig, getDevcontainerPath, getEasySetupTemplates, getLogLevel, getMcpConfigPath, getMcpServerStatus, getMcpServers, getMcpTemplate, getMcpTemplateNames, getOpAuthStatus, getProviderInfo, getRequiredSecrets, getSecretReferences, getStandardAgentInstructions, hasDevcontainerCli, hasDocker, hasEnvrc, hasMcpConfig, hasOpCli, hasOpServiceAccountToken, hasVaultCli, isOpAuthenticated, isVaultAuthenticated, launchAgent, loadConfig, loadConfigFromFile, loadDevcontainerConfig, loadSecrets, logger, mergeWithDefaults, readEnvrc, readMcpConfig, readOpSecret, readVaultSecret, removeMcpServer, setLogLevel, startContainer, stopContainer, verifySecret, verifySecrets, writeEnvrc, writeMcpConfig, writeOpenCodeConfig };