@sudocode-ai/types 0.1.21 → 0.1.22

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +70 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudocode-ai/types",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "TypeScript type definitions for sudocode",
5
5
  "types": "src/index.d.ts",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
@@ -348,19 +348,80 @@ export interface SpawnConfig {
348
348
  }
349
349
 
350
350
  /**
351
- * Config metadata file structure (.sudocode/config.json)
351
+ * Storage mode determines the source of truth for entity data
352
+ * - "jsonl": JSONL files are authoritative (default)
353
+ * - "markdown": Markdown files are authoritative
354
+ *
355
+ * Note: JSONL is always exported regardless of mode (for git tracking).
356
+ * This setting only controls which format is authoritative during conflicts.
352
357
  */
353
- export interface Config {
354
- // TODO: Deprecate version field.
355
- version: string;
356
- /** Worktree configuration (optional) */
357
- worktree?: WorktreeConfig;
358
- /** Integration configurations (optional) */
358
+ export type StorageMode = "jsonl" | "markdown";
359
+
360
+ /**
361
+ * Project-level configuration (git-tracked: .sudocode/config.json)
362
+ * These settings are shared across the team.
363
+ */
364
+ export interface ProjectConfig {
365
+ /** Source of truth for entity data (default: "jsonl") */
366
+ sourceOfTruth?: StorageMode;
367
+ /** Integration configurations (shared across team) */
359
368
  integrations?: IntegrationsConfig;
360
- /** Editor configuration (optional) */
369
+ /** Telemetry configuration (project-level, git-tracked) */
370
+ telemetry?: {
371
+ /** Stable anonymous identifier for this project */
372
+ projectId?: string;
373
+ /** @deprecated Use projectId instead */
374
+ anonymousId?: string;
375
+ };
376
+ }
377
+
378
+ /**
379
+ * Local machine configuration (gitignored: .sudocode/config.local.json)
380
+ * These settings are specific to each developer's machine.
381
+ */
382
+ export interface LocalConfig {
383
+ /** Worktree configuration (machine-specific paths) */
384
+ worktree?: WorktreeConfig;
385
+ /** Editor configuration (personal preference) */
361
386
  editor?: EditorConfig;
362
- /** Voice configuration (optional) */
387
+ /** Voice configuration (personal preference) */
363
388
  voice?: VoiceSettingsConfig;
389
+ /** Telemetry configuration (machine-specific, gitignored) */
390
+ telemetry?: {
391
+ /** OTLP endpoint URL (e.g., Grafana Cloud OTLP gateway) */
392
+ endpoint?: string;
393
+ /** Full Authorization header value (e.g., "Basic <base64>" or "Bearer <token>") */
394
+ authHeader?: string;
395
+ /** Disable telemetry entirely (default: false) */
396
+ disabled?: boolean;
397
+ };
398
+ }
399
+
400
+ /**
401
+ * Merged telemetry configuration (ProjectConfig.telemetry + LocalConfig.telemetry)
402
+ */
403
+ export interface TelemetryConfig {
404
+ /** Stable anonymous identifier for this project (from ProjectConfig) */
405
+ projectId?: string;
406
+ /** @deprecated Use projectId instead */
407
+ anonymousId?: string;
408
+ /** OTLP endpoint URL (from LocalConfig) */
409
+ endpoint?: string;
410
+ /** Full Authorization header value (from LocalConfig) */
411
+ authHeader?: string;
412
+ /** Disable telemetry entirely (from LocalConfig) */
413
+ disabled?: boolean;
414
+ }
415
+
416
+ /**
417
+ * Merged configuration (ProjectConfig + LocalConfig)
418
+ * This is the runtime config object returned by getConfig().
419
+ */
420
+ export interface Config extends Omit<ProjectConfig, 'telemetry'>, Omit<LocalConfig, 'telemetry'> {
421
+ /** @deprecated Legacy version field, no longer used */
422
+ version?: string;
423
+ /** Merged telemetry configuration */
424
+ telemetry?: TelemetryConfig;
364
425
  }
365
426
 
366
427
  /**