chati-dev 3.1.1 → 3.2.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.
@@ -80,15 +80,6 @@ export const PROVIDER_MODEL_MAPS = {
80
80
  dev: 'codex', 'qa-implementation': 'codex', devops: 'mini',
81
81
  },
82
82
  },
83
- copilot: {
84
- deep: 'claude-sonnet', light: 'claude-sonnet', minimal: 'gpt-5',
85
- agents: {
86
- orchestrator: 'claude-sonnet', 'greenfield-wu': 'gpt-5', 'brownfield-wu': 'claude-sonnet',
87
- brief: 'claude-sonnet', detail: 'claude-sonnet', architect: 'claude-sonnet', ux: 'claude-sonnet',
88
- phases: 'claude-sonnet', tasks: 'claude-sonnet', 'qa-planning': 'claude-sonnet',
89
- dev: 'claude-sonnet', 'qa-implementation': 'claude-sonnet', devops: 'claude-sonnet',
90
- },
91
- },
92
83
  };
93
84
 
94
85
  /**
@@ -110,7 +101,6 @@ export function generateConfigYaml(config) {
110
101
  claude: { enabled: true, primary: provider === 'claude' },
111
102
  gemini: { enabled: provider === 'gemini' || selectedIDEs.includes('gemini-cli'), model_default: 'pro', primary: provider === 'gemini' },
112
103
  codex: { enabled: provider === 'codex' || selectedIDEs.includes('codex-cli'), model_default: 'codex', primary: provider === 'codex' },
113
- copilot: { enabled: provider === 'copilot' || selectedIDEs.includes('github-copilot'), primary: provider === 'copilot' },
114
104
  },
115
105
  };
116
106
 
@@ -231,54 +221,63 @@ User input: {{args}}
231
221
  }
232
222
 
233
223
  /**
234
- * Generate GitHub Copilot agent file (.github/agents/chati.md)
235
- *
236
- * Copilot CLI uses .github/agents/*.md for custom agents.
237
- * The user invokes with @chati in the Copilot CLI.
224
+ * Generate CLAUDE.local.md content (runtime state — auto-gitignored, never committed)
238
225
  */
239
- export function generateCopilotAgent() {
240
- return `# Chati.dev Orchestrator
226
+ export function generateClaudeLocalMd() {
227
+ return `# Chati.dev Runtime State
241
228
 
242
- You are the Chati.dev orchestrator agent for GitHub Copilot CLI.
229
+ ## Session Lock
230
+ **Status: INACTIVE** — Type \`/chati\` to activate.
243
231
 
244
- ## CRITICAL — Language Override
232
+ <!-- SESSION-LOCK:INACTIVE -->
245
233
 
246
- Read \`.chati/session.yaml\` field \`language\` BEFORE anything else.
247
- ALL responses MUST be in this language. This overrides any global setting.
234
+ ## Current State
235
+ - **Agent**: None (ready to start)
236
+ - **Pipeline**: Pre-start
237
+ - **Mode**: interactive
248
238
 
249
- | Value | Language |
250
- |-------|----------|
251
- | \`en\` | English |
252
- | \`pt\` | Portugues |
253
- | \`es\` | Espanol |
254
- | \`fr\` | Francais |
239
+ ## Recent Decisions
240
+ _No decisions yet. Start with /chati._
255
241
 
256
- If session.yaml does not exist or has no language field, default to English.
242
+ ---
243
+ _Auto-updated by Chati.dev orchestrator_
244
+ `;
245
+ }
257
246
 
258
- ## Load
247
+ /**
248
+ * Generate Gemini CLI session lock (.gemini/session-lock.md)
249
+ * Equivalent to CLAUDE.local.md — imported via @import in GEMINI.md.
250
+ */
251
+ export function generateGeminiSessionLock() {
252
+ return `# Chati.dev Runtime State
259
253
 
260
- The orchestrator and all agent files are **pre-configured for GitHub Copilot CLI**.
261
- No translation needed follow all instructions as written.
254
+ ## Session Lock
255
+ **Status: INACTIVE**Type \`/chati\` to activate.
262
256
 
263
- Read and execute the full orchestrator at \`chati.dev/orchestrator/chati.md\`.
257
+ <!-- SESSION-LOCK:INACTIVE -->
264
258
 
265
- **NEVER create or reference CLAUDE.md, CLAUDE.local.md, or .claude/ directories.**
259
+ ## Current State
260
+ - **Agent**: None (ready to start)
261
+ - **Pipeline**: Pre-start
262
+ - **Mode**: interactive
266
263
 
267
- **Context to pass:**
268
- - \`.chati/session.yaml\` (session state — includes language)
269
- - \`chati.dev/artifacts/handoffs/\` (latest handoff)
270
- - \`chati.dev/config.yaml\` (version info)
264
+ ## Recent Decisions
265
+ _No decisions yet. Start with /chati._
266
+
267
+ ---
268
+ _Auto-updated by Chati.dev orchestrator_
271
269
  `;
272
270
  }
273
271
 
274
272
  /**
275
- * Generate CLAUDE.local.md content (runtime state — auto-gitignored, never committed)
273
+ * Generate Codex CLI session lock (AGENTS.override.md)
274
+ * Codex auto-loads this as an override to AGENTS.md.
276
275
  */
277
- export function generateClaudeLocalMd() {
276
+ export function generateAgentsOverrideMd() {
278
277
  return `# Chati.dev Runtime State
279
278
 
280
279
  ## Session Lock
281
- **Status: INACTIVE** — Type \`/chati\` to activate.
280
+ **Status: INACTIVE** — Type \`$chati\` to activate.
282
281
 
283
282
  <!-- SESSION-LOCK:INACTIVE -->
284
283
 
@@ -288,9 +287,104 @@ export function generateClaudeLocalMd() {
288
287
  - **Mode**: interactive
289
288
 
290
289
  ## Recent Decisions
291
- _No decisions yet. Start with /chati._
290
+ _No decisions yet. Start with $chati._
292
291
 
293
292
  ---
294
293
  _Auto-updated by Chati.dev orchestrator_
295
294
  `;
296
295
  }
296
+
297
+ /**
298
+ * Generate Codex CLI constitution guard rules (.codex/rules/constitution-guard.rules)
299
+ * Starlark execution policy that blocks destructive commands and secret writes.
300
+ */
301
+ export function generateCodexConstitutionGuardRules() {
302
+ return `# Chati.dev Constitution Guard — Codex CLI Execution Policy
303
+ # Article XI: Block destructive commands and secret writes
304
+
305
+ # Destructive commands that require explicit user approval
306
+ deny_commands = [
307
+ "rm -rf",
308
+ "git reset --hard",
309
+ "git push --force",
310
+ "git push -f",
311
+ "git clean -fd",
312
+ "DROP TABLE",
313
+ "DROP DATABASE",
314
+ "TRUNCATE TABLE",
315
+ "chmod 777",
316
+ ]
317
+
318
+ # Patterns that indicate secret/credential writes
319
+ deny_write_patterns = [
320
+ "API_KEY=",
321
+ "SECRET_KEY=",
322
+ "PASSWORD=",
323
+ "TOKEN=",
324
+ "PRIVATE_KEY=",
325
+ "aws_secret_access_key",
326
+ "-----BEGIN RSA PRIVATE KEY-----",
327
+ "-----BEGIN OPENSSH PRIVATE KEY-----",
328
+ ]
329
+
330
+ # Files that should never be written to
331
+ deny_write_files = [
332
+ ".env",
333
+ ".env.local",
334
+ ".env.production",
335
+ "credentials.json",
336
+ "service-account.json",
337
+ ]
338
+
339
+ # Allow list — these are safe even though they match patterns
340
+ allow_write_files = [
341
+ ".env.example",
342
+ ".env.template",
343
+ ".env.sample",
344
+ ]
345
+ `;
346
+ }
347
+
348
+ /**
349
+ * Generate Codex CLI read protection rules (.codex/rules/read-protection.rules)
350
+ * Starlark execution policy that blocks reading sensitive files.
351
+ */
352
+ export function generateCodexReadProtectionRules() {
353
+ return `# Chati.dev Read Protection — Codex CLI Execution Policy
354
+ # Article XI: Protect sensitive files from being read
355
+
356
+ # Files that should never be read
357
+ deny_read_files = [
358
+ ".env",
359
+ ".env.local",
360
+ ".env.production",
361
+ ".env.staging",
362
+ ]
363
+
364
+ # File extensions that indicate sensitive content
365
+ deny_read_extensions = [
366
+ ".pem",
367
+ ".key",
368
+ ".p12",
369
+ ".pfx",
370
+ ".jks",
371
+ ]
372
+
373
+ # Paths that should never be read
374
+ deny_read_paths = [
375
+ "credentials.json",
376
+ "service-account.json",
377
+ ".git/config",
378
+ ".ssh/",
379
+ ".aws/credentials",
380
+ ".npmrc",
381
+ ]
382
+
383
+ # Allow list — these are safe even though they match patterns
384
+ allow_read_files = [
385
+ ".env.example",
386
+ ".env.template",
387
+ ".env.sample",
388
+ ]
389
+ `;
390
+ }
@@ -5,4 +5,3 @@
5
5
  export * as claude from './claude-adapter.js';
6
6
  export * as gemini from './gemini-adapter.js';
7
7
  export * as codex from './codex-adapter.js';
8
- export * as copilot from './copilot-adapter.js';
@@ -51,7 +51,7 @@ const PROVIDERS = {
51
51
  baseArgs: [],
52
52
  modelFlag: '--model',
53
53
  stdinSupport: true,
54
- hooksSupport: false,
54
+ hooksSupport: true,
55
55
  mcpSupport: true,
56
56
  contextFile: 'GEMINI.md',
57
57
  modelMap: {
@@ -75,21 +75,6 @@ const PROVIDERS = {
75
75
  },
76
76
  adapter: adapters.codex,
77
77
  },
78
- copilot: {
79
- name: 'copilot',
80
- command: 'copilot',
81
- baseArgs: ['-p'],
82
- modelFlag: '--model',
83
- stdinSupport: true,
84
- hooksSupport: false,
85
- mcpSupport: true,
86
- contextFile: null,
87
- modelMap: {
88
- 'claude-sonnet': 'claude-sonnet-4.5',
89
- 'gpt-5': 'gpt-5',
90
- },
91
- adapter: adapters.copilot,
92
- },
93
78
  };
94
79
 
95
80
  // ---------------------------------------------------------------------------
@@ -99,7 +84,7 @@ const PROVIDERS = {
99
84
  /**
100
85
  * Get a provider configuration by name.
101
86
  *
102
- * @param {string} name - Provider name (claude, gemini, codex, copilot)
87
+ * @param {string} name - Provider name (claude, gemini, codex)
103
88
  * @returns {ProviderConfig}
104
89
  * @throws {Error} When provider is not found
105
90
  */
@@ -86,7 +86,7 @@ export function cleanParentEnv(env) {
86
86
  * @property {string} agent - Agent name (e.g. "architect")
87
87
  * @property {string} taskId - Task identifier
88
88
  * @property {string} [model] - LLM model tier name (e.g. opus, pro, codex, claude-sonnet)
89
- * @property {string} [provider] - CLI provider name (claude, gemini, codex, copilot)
89
+ * @property {string} [provider] - CLI provider name (claude, gemini, codex)
90
90
  * @property {string} [prompt] - Full prompt string (from prompt-builder, piped via stdin)
91
91
  * @property {object} [contextPayload] - Context to inject via env var
92
92
  * @property {string[]} [writeScope] - Override write scope
@@ -22,7 +22,7 @@ export function parseProviderConfig(projectDir) {
22
22
  }
23
23
 
24
24
  const raw = readFileSync(configPath, 'utf-8');
25
- const providers = ['claude', 'gemini', 'codex', 'copilot'];
25
+ const providers = ['claude', 'gemini', 'codex'];
26
26
  const enabled = [];
27
27
  let primary = 'claude';
28
28
 
@@ -24,7 +24,6 @@ const FALLBACK_EN = {
24
24
  llm_provider_claude: 'Claude (Anthropic) — Best for structured reasoning',
25
25
  llm_provider_gemini: 'Gemini (Google) — 1M token context window',
26
26
  llm_provider_codex: 'Codex (OpenAI) — Optimized for code generation',
27
- llm_provider_copilot: 'Copilot (GitHub) — Multi-model, GitHub integrated',
28
27
  llm_provider_not_installed: '(CLI not detected)',
29
28
  llm_provider_label: 'AI Provider',
30
29
  will_install: 'Will install:',
@@ -19,7 +19,6 @@ const PROVIDER_TO_IDE = {
19
19
  claude: ['claude-code'],
20
20
  gemini: ['gemini-cli'],
21
21
  codex: ['codex-cli'],
22
- copilot: ['github-copilot'],
23
22
  };
24
23
 
25
24
  const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -89,7 +88,6 @@ export async function runWizard(targetDir, options = {}) {
89
88
  'claude-code': 'Created .claude/commands/ (thin router)',
90
89
  'gemini-cli': 'Created .gemini/commands/ (TOML command)',
91
90
  'codex-cli': 'Created .agents/skills/chati/ (Codex skill)',
92
- 'github-copilot': 'Created .github/agents/ (Copilot agent)',
93
91
  };
94
92
  const commandStep = commandStepMap[primaryIDE] || t('installer.created_commands');
95
93
  showStep(commandStep);
@@ -132,7 +130,6 @@ export async function runWizard(targetDir, options = {}) {
132
130
 
133
131
  // Show quick start — same experience across all providers
134
132
  const invokeCmdMap = {
135
- 'github-copilot': '@chati',
136
133
  'codex-cli': '$chati',
137
134
  };
138
135
  const invokeCmd = invokeCmdMap[primaryIDE] || '/chati';
@@ -67,7 +67,6 @@ export async function stepLlmProvider() {
67
67
  { name: 'claude', label: t('installer.llm_provider_claude') },
68
68
  { name: 'gemini', label: t('installer.llm_provider_gemini') },
69
69
  { name: 'codex', label: t('installer.llm_provider_codex') },
70
- { name: 'copilot', label: t('installer.llm_provider_copilot') },
71
70
  ];
72
71
 
73
72
  // Check availability of each provider
@@ -110,7 +109,7 @@ export async function stepConfirmation(config) {
110
109
  const { projectName, projectType, language, llmProvider, selectedMCPs, selectedIDEs } = config;
111
110
 
112
111
  const langName = SUPPORTED_LANGUAGES.find(l => l.value === language)?.label || language;
113
- const providerNames = { claude: 'Claude (Anthropic)', gemini: 'Gemini (Google)', codex: 'Codex (OpenAI)', copilot: 'Copilot (GitHub)' };
112
+ const providerNames = { claude: 'Claude (Anthropic)', gemini: 'Gemini (Google)', codex: 'Codex (OpenAI)' };
114
113
  const providerDisplay = providerNames[llmProvider] || llmProvider;
115
114
  const ideNames = (selectedIDEs || ['claude-code'])
116
115
  .map(id => IDE_CONFIGS[id]?.name || id)
@@ -1,28 +0,0 @@
1
- /**
2
- * @fileoverview GitHub Copilot CLI adapter.
3
- *
4
- * Translates chati.dev spawning config into Copilot CLI
5
- * command, arguments, and environment variables.
6
- */
7
-
8
- /**
9
- * Build Copilot CLI command and arguments.
10
- *
11
- * @param {import('../spawner.js').SpawnConfig} config
12
- * @param {import('../cli-registry.js').ProviderConfig} provider
13
- * @returns {{ command: string, args: string[], stdinPrompt: string|null }}
14
- */
15
- export function buildCommand(config, provider) {
16
- const args = [...provider.baseArgs];
17
-
18
- if (config.model) {
19
- const resolvedModel = provider.modelMap[config.model] || config.model;
20
- args.push(provider.modelFlag, resolvedModel);
21
- }
22
-
23
- return {
24
- command: provider.command,
25
- args,
26
- stdinPrompt: config.prompt || null,
27
- };
28
- }