forkit-connect 0.1.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.
Files changed (51) hide show
  1. package/QUICKSTART.md +55 -0
  2. package/README.md +96 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.js +4724 -0
  5. package/dist/index.d.ts +7 -0
  6. package/dist/index.js +21 -0
  7. package/dist/launcher.d.ts +33 -0
  8. package/dist/launcher.js +9344 -0
  9. package/dist/ps-list-loader.d.ts +5 -0
  10. package/dist/ps-list-loader.js +20 -0
  11. package/dist/v1/agent-observation.d.ts +42 -0
  12. package/dist/v1/agent-observation.js +499 -0
  13. package/dist/v1/api.d.ts +276 -0
  14. package/dist/v1/api.js +390 -0
  15. package/dist/v1/credential-store.d.ts +92 -0
  16. package/dist/v1/credential-store.js +797 -0
  17. package/dist/v1/currency.d.ts +41 -0
  18. package/dist/v1/currency.js +127 -0
  19. package/dist/v1/daemon.d.ts +50 -0
  20. package/dist/v1/daemon.js +265 -0
  21. package/dist/v1/discovery.d.ts +61 -0
  22. package/dist/v1/discovery.js +168 -0
  23. package/dist/v1/filesystem-models.d.ts +11 -0
  24. package/dist/v1/filesystem-models.js +261 -0
  25. package/dist/v1/heartbeat.d.ts +45 -0
  26. package/dist/v1/heartbeat.js +463 -0
  27. package/dist/v1/lifecycle-monitor.d.ts +78 -0
  28. package/dist/v1/lifecycle-monitor.js +512 -0
  29. package/dist/v1/lmstudio.d.ts +11 -0
  30. package/dist/v1/lmstudio.js +148 -0
  31. package/dist/v1/ollama.d.ts +19 -0
  32. package/dist/v1/ollama.js +164 -0
  33. package/dist/v1/openai-compatible.d.ts +12 -0
  34. package/dist/v1/openai-compatible.js +124 -0
  35. package/dist/v1/process-scout.d.ts +50 -0
  36. package/dist/v1/process-scout.js +715 -0
  37. package/dist/v1/providers.d.ts +50 -0
  38. package/dist/v1/providers.js +106 -0
  39. package/dist/v1/service.d.ts +680 -0
  40. package/dist/v1/service.js +8286 -0
  41. package/dist/v1/state.d.ts +87 -0
  42. package/dist/v1/state.js +1318 -0
  43. package/dist/v1/test-credential-backend.d.ts +19 -0
  44. package/dist/v1/test-credential-backend.js +49 -0
  45. package/dist/v1/types.d.ts +873 -0
  46. package/dist/v1/types.js +3 -0
  47. package/dist/v1/update.d.ts +38 -0
  48. package/dist/v1/update.js +184 -0
  49. package/dist/v1/vitality-pulse.d.ts +36 -0
  50. package/dist/v1/vitality-pulse.js +512 -0
  51. package/package.json +53 -0
@@ -0,0 +1,873 @@
1
+ export type SourceLabel = 'Verified by Runtime' | 'Verified by Integration' | 'Provided by You';
2
+ export type RuntimeType = 'local-http' | 'local-filesystem';
3
+ export type DiscoverySource = 'provider_scan' | 'port_probe';
4
+ export type DiscoveryMode = 'advisory_only' | 'auto_draft';
5
+ export type ConnectIdentityStatus = 'uninitialized' | 'ready' | 'paired' | 'error';
6
+ export type ConnectPairingMethod = 'local_generated' | 'device_login' | 'restored';
7
+ export type PermissionDecision = 'allowed' | 'advisory' | 'blocked';
8
+ export type DiscoveryClassification = 'registered_runtime' | 'known_unregistered' | 'new_unregistered' | 'shadow_candidate' | 'provider_unavailable';
9
+ export type ProviderHealthStatus = 'detected' | 'unavailable' | 'error' | 'unknown';
10
+ export type PulseStatus = 'green' | 'amber' | 'red' | 'unknown';
11
+ export type RegistrationState = 'registered' | 'unregistered' | 'unknown';
12
+ export type ModelBindingStatus = 'pending' | 'bound' | 'ignored';
13
+ export type ReviewStatus = 'new_unregistered' | 'known_unregistered' | 'pending_draft' | 'bound_passport' | 'shadow_candidate' | 'provider_unavailable';
14
+ export type AgentType = 'coding_agent' | 'local_agent_runtime' | 'mcp_server' | 'ide_extension' | 'workflow_automation' | 'unknown_ai_tool';
15
+ export type AgentStatus = 'detected' | 'connected' | 'inactive';
16
+ export type AgentReviewStatus = 'new_agent' | 'known_agent' | 'linked_agent' | 'inactive_agent' | 'unknown_ai_tool';
17
+ export type AgentDiscoverySource = 'process_scan' | 'daemon_scan' | 'manual_connect' | 'manual_link';
18
+ export type AgentModelUsageSource = 'manual_link' | 'agent_scan' | 'runtime_session' | 'backend_session_sync';
19
+ export type RuntimePassportStatus = 'detected' | 'bound_to_model' | 'linked_to_agent' | 'unavailable';
20
+ export type RuntimePassportConfidence = 'high' | 'medium' | 'low';
21
+ export type ReviewDisposition = 'active' | 'deferred' | 'ignored';
22
+ export type SmartRegistrationInboxGroup = 'ready_to_connect' | 'needs_confirmation' | 'connected' | 'ignored';
23
+ export type SmartRegistrationInboxItemType = 'model' | 'agent' | 'runtime' | 'version_candidate' | 'session' | 'credential';
24
+ export type SmartRegistrationInboxAction = 'connect_existing_passport' | 'create_passport_draft' | 'link_agent_to_model' | 'confirm_version_candidate' | 'defer' | 'ignore' | 'reconnect_account' | 'open_on_forkit';
25
+ export type TrayStatusColor = 'green' | 'amber' | 'red' | 'grey';
26
+ export type NotificationCandidateType = 'model_detected' | 'agent_detected' | 'passport_match_suggested' | 'version_candidate_ready' | 'session_paused' | 'session_revoked' | 'credential_reconnect_needed' | 'shadow_candidate' | 'runtime_unavailable' | 'passport_draft_created' | 'c2_sync_pending';
27
+ export type NotificationSuggestedAction = 'open_inbox' | 'reconnect_account' | 'review_model' | 'connect_model' | 'review_agent' | 'link_agent_model' | 'view_pulse_history' | 'sync_c2' | 'open_c2';
28
+ export type C2SessionMode = 'active' | 'paused' | 'standby' | 'sleeping' | 'offline' | 'revoked';
29
+ export type C2SessionLocalSyncState = 'observed' | 'ack_pending' | 'acknowledged' | 'credential_reconnect_needed';
30
+ export type C2SessionControlSource = 'website' | 'backend_governor' | 'local';
31
+ export type C2LiteEventType = 'connect_runtime_detected' | 'connect_model_detected' | 'connect_passport_draft_requested' | 'connect_passport_draft_created' | 'connect_passport_bound' | 'connect_runtime_bound_to_model' | 'connect_runtime_linked_to_agent' | 'connect_runtime_health_changed' | 'connect_daemon_started' | 'connect_daemon_stopped' | 'connect_runtime_active' | 'connect_runtime_unavailable' | 'connect_runtime_restored' | 'connect_pulse_green' | 'connect_pulse_amber' | 'connect_pulse_red' | 'connect_shadow_candidate_detected' | 'connect_training_initialized' | 'connect_training_started' | 'connect_fine_tuning_started' | 'connect_dataset_changed' | 'connect_metric_logged' | 'connect_model_version_created' | 'connect_artifact_ready' | 'connect_training_completed' | 'connect_agent_detected' | 'connect_agent_connected' | 'connect_agent_model_linked' | 'connect_agent_tool_observed' | 'connect_agent_tool_blocked' | 'connect_agent_tool_timed_out' | 'connect_agent_inactive' | 'connect_model_evolution_detected' | 'connect_model_evolution_archived' | 'connect_session_paused_acknowledged' | 'connect_session_resumed_acknowledged' | 'connect_session_access_revoked_acknowledged' | 'connect_passport_governor_paused_observed' | 'connect_passport_governor_revoked_observed' | 'connect_credential_invalid_observed' | 'connect_silent_model_change' | 'connect_model_drift_detected' | 'connect_hallucination_pattern' | 'connect_agent_drift_detected' | 'connect_prompt_injection_suspected' | 'connect_adversarial_influence_observed' | 'connect_runtime_signal_key_auto_provisioned' | 'connect_lifecycle_monitor_pass_completed';
32
+ export type C2LiteSyncState = 'pending' | 'synced' | 'dead_letter';
33
+ export type PendingReviewKind = 'silent_model_change' | 'model_drift' | 'hallucination_pattern' | 'agent_drift' | 'prompt_injection' | 'adversarial_influence';
34
+ export type PendingReviewStatus = 'pending' | 'confirmed' | 'dismissed' | 'auto_confirmed';
35
+ export interface PendingReview {
36
+ review_id: string;
37
+ kind: PendingReviewKind;
38
+ status: PendingReviewStatus;
39
+ passport_gaid: string | null;
40
+ agent_id: string | null;
41
+ runtime_gaid: string | null;
42
+ model_name: string | null;
43
+ detected_at: string;
44
+ reviewed_at: string | null;
45
+ auto_confirm_after_first: boolean;
46
+ confidence: 'high' | 'medium' | 'low';
47
+ summary: string;
48
+ evidence: Record<string, unknown>;
49
+ }
50
+ export interface LifecycleMonitorRecord {
51
+ subject_id: string;
52
+ subject_type: 'model' | 'agent' | 'runtime';
53
+ last_monitored_at: string;
54
+ last_digest: string | null;
55
+ last_size_bytes: number | null;
56
+ last_weights_digest: string | null;
57
+ last_tool_pattern_hash: string | null;
58
+ last_behavior_snapshot: string | null;
59
+ drift_count: number;
60
+ injection_count: number;
61
+ updated_at: string;
62
+ }
63
+ export type BuildSessionStatus = 'initialized' | 'building' | 'fine_tuning' | 'checkpoint_ready' | 'evaluating' | 'completed' | 'artifact_ready' | 'versioned' | 'draft_published' | 'aborted';
64
+ export type TrainingLifecycleEventType = 'training_initialized' | 'training_started' | 'fine_tuning_started' | 'checkpoint_created' | 'evaluation_logged' | 'training_completed' | 'artifact_ready' | 'version_created' | 'draft_published' | 'build_aborted';
65
+ export type DatasetChangeType = 'initial_dataset' | 'fine_tuning_dataset' | 'validation_dataset' | 'test_dataset' | 'dataset_removed' | 'dataset_updated';
66
+ export interface ConnectConfig {
67
+ discovery_mode: DiscoveryMode;
68
+ daemon_interval_seconds: number;
69
+ notifications_enabled: boolean;
70
+ notification_min_interval_seconds: number;
71
+ evolution_bridge_enabled: boolean;
72
+ updated_at: string;
73
+ }
74
+ export interface ConnectIdentityState {
75
+ connect_device_id: string | null;
76
+ connect_public_key: string | null;
77
+ connect_identity_status: ConnectIdentityStatus;
78
+ paired_at: string | null;
79
+ pairing_method: ConnectPairingMethod | null;
80
+ last_identity_check_at: string | null;
81
+ }
82
+ export interface ServiceEntitlements {
83
+ secure_device_pairing: boolean;
84
+ signed_events: boolean;
85
+ evolution_bridge: boolean;
86
+ orchestrator: boolean;
87
+ handoff: boolean;
88
+ advisory_mode: boolean;
89
+ auto_draft: boolean;
90
+ notifications: boolean;
91
+ authenticated: boolean;
92
+ workspace_bound: boolean;
93
+ project_bound: boolean;
94
+ tier: string | null;
95
+ updated_at: string;
96
+ }
97
+ export interface SignedConnectEvent {
98
+ event_id: string;
99
+ event_type: string;
100
+ occurred_at: string;
101
+ metadata: Record<string, unknown>;
102
+ connect_device_id?: string;
103
+ nonce?: string;
104
+ signature?: string;
105
+ }
106
+ export interface ConnectPermissionRule {
107
+ action: string;
108
+ decision: PermissionDecision;
109
+ reason: string;
110
+ }
111
+ export type ConnectBindingState = 'pending_approval' | 'approved_needs_scope' | 'active' | 'paused' | 'revoked' | 'stale' | 'needs_reconsent';
112
+ export type ConnectBindingRole = 'owner' | 'maintainer' | 'contributor' | 'viewer';
113
+ export interface ConnectConsentProfile {
114
+ allow_draft_creation: boolean;
115
+ allow_evidence_sync: boolean;
116
+ allow_runtime_session_sync: boolean;
117
+ allow_lineage_suggestions: boolean;
118
+ allow_publication_support: boolean;
119
+ }
120
+ export interface ConnectCapabilityProfile {
121
+ binding_active: boolean;
122
+ workspace_bound: boolean;
123
+ project_bound: boolean;
124
+ can_create_draft: boolean;
125
+ can_sync_evidence: boolean;
126
+ can_sync_runtime_sessions: boolean;
127
+ can_emit_lineage_suggestions: boolean;
128
+ can_prepare_private_publication: boolean;
129
+ can_prepare_public_publication: boolean;
130
+ plan_key: string | null;
131
+ role: ConnectBindingRole | null;
132
+ }
133
+ export interface ConnectBindingRecord {
134
+ bindingId: string;
135
+ state: ConnectBindingState;
136
+ connectDeviceId: string;
137
+ approvedUserId: string | null;
138
+ approvedUserGoadid: string | null;
139
+ workspaceId: string | null;
140
+ projectId: string | null;
141
+ planKey: string | null;
142
+ role: ConnectBindingRole | null;
143
+ consentProfile: ConnectConsentProfile;
144
+ capabilityProfile: ConnectCapabilityProfile;
145
+ approvedAt: string | null;
146
+ revokedAt: string | null;
147
+ lastSeenAt: string | null;
148
+ createdAt: string;
149
+ updatedAt: string;
150
+ }
151
+ export interface ConnectApprovedUser {
152
+ id: string;
153
+ name: string | null;
154
+ email: string | null;
155
+ goaid: string | null;
156
+ avatarUrl?: string | null;
157
+ }
158
+ export interface ConnectBoundWorkspace {
159
+ id: string;
160
+ name: string | null;
161
+ ownerName?: string | null;
162
+ passportGaid?: string | null;
163
+ passportType?: string | null;
164
+ description?: string | null;
165
+ }
166
+ export interface ConnectBoundProject {
167
+ id: string;
168
+ workspaceId: string | null;
169
+ name: string | null;
170
+ description?: string | null;
171
+ }
172
+ export interface ConnectEffectiveBindingState {
173
+ binding: ConnectBindingRecord;
174
+ capability_profile: ConnectCapabilityProfile;
175
+ consent_profile: ConnectConsentProfile;
176
+ approved_user: ConnectApprovedUser | null;
177
+ workspace: ConnectBoundWorkspace | null;
178
+ project: ConnectBoundProject | null;
179
+ fetched_at: string;
180
+ }
181
+ export interface ConnectPermissionsSummary {
182
+ authenticated: boolean;
183
+ identity_ready: boolean;
184
+ identity_paired: boolean;
185
+ workspace_bound: boolean;
186
+ project_bound: boolean;
187
+ advisory_mode: boolean;
188
+ binding_state: ConnectBindingState | null;
189
+ approved_user: ConnectApprovedUser | null;
190
+ allowed_actions: string[];
191
+ review_required_actions: string[];
192
+ rules: ConnectPermissionRule[];
193
+ privacy_summary: string;
194
+ }
195
+ export interface ConnectServiceStatus {
196
+ service: string;
197
+ enabled: boolean;
198
+ state: 'ready' | 'attention' | 'blocked' | 'advisory';
199
+ detail: string;
200
+ }
201
+ export interface ConnectServicesSummary {
202
+ identity: ConnectIdentityState;
203
+ entitlements: ServiceEntitlements;
204
+ services: ConnectServiceStatus[];
205
+ privacy_summary: string;
206
+ }
207
+ export interface ModelEvolutionCandidate {
208
+ candidate_status: 'active' | 'archived';
209
+ candidate_id: string;
210
+ model_name: string;
211
+ runtime_name: string;
212
+ runtime_gaid: string | null;
213
+ current_discovery_hash: string;
214
+ current_digest: string;
215
+ baseline_model_key: string;
216
+ baseline_digest: string | null;
217
+ bound_passport_gaid: string | null;
218
+ draft_id: string | null;
219
+ change_types: ModelEvolutionChangeType[];
220
+ change_summary: string[];
221
+ first_detected_at: string;
222
+ last_detected_at: string;
223
+ last_emitted_at: string | null;
224
+ baseline_snapshot: ModelEvolutionSnapshot | null;
225
+ current_snapshot: ModelEvolutionSnapshot | null;
226
+ event_fingerprint: string;
227
+ suggested_action: 'review_evolution';
228
+ metadata: Record<string, unknown>;
229
+ }
230
+ export type ModelEvolutionChangeType = 'model_updated' | 'fine_tuned' | 'pruned_or_compressed' | 'quantized' | 'dataset_changed' | 'metric_updated' | 'artifact_changed' | 'runtime_relinked' | 'archived_or_removed_candidate';
231
+ export interface ModelEvolutionSnapshot {
232
+ model_name: string;
233
+ runtime_name: string;
234
+ runtime_gaid: string | null;
235
+ discovery_hash: string;
236
+ digest: string;
237
+ size_bytes: number;
238
+ modified_at: string | null;
239
+ quantization_label: string | null;
240
+ parameter_count: number | null;
241
+ metadata_fingerprint: string;
242
+ safe_metadata: Record<string, unknown>;
243
+ }
244
+ export interface EvolutionReviewSnapshot {
245
+ enabled: boolean;
246
+ advisory_mode: boolean;
247
+ total: number;
248
+ candidates: ModelEvolutionCandidate[];
249
+ privacy_summary: string;
250
+ }
251
+ export interface RuntimeHandoffEntry {
252
+ runtime_gaid: string;
253
+ runtime_name: string;
254
+ runtime_type: RuntimeType;
255
+ provider: string;
256
+ status: RuntimePassportStatus;
257
+ health_status: ProviderHealthStatus;
258
+ linked_model_gaids: string[];
259
+ linked_agent_ids: string[];
260
+ workspaceId: string | null;
261
+ projectId: string | null;
262
+ }
263
+ export interface RuntimeHandoffSummary {
264
+ runtime_count: number;
265
+ runtime_gaids: string[];
266
+ link_summary: RuntimeHandoffEntry[];
267
+ unlinked_runtimes: string[];
268
+ unhealthy_runtimes: string[];
269
+ }
270
+ export interface C2SessionState {
271
+ session_id: string;
272
+ passport_gaid: string;
273
+ runtime_gaid: string | null;
274
+ model_name: string | null;
275
+ agent_id: string | null;
276
+ workspaceId: string | null;
277
+ projectId: string | null;
278
+ session_mode: C2SessionMode;
279
+ local_sync_state: C2SessionLocalSyncState;
280
+ last_seen_at: string | null;
281
+ last_control_seen_at: string | null;
282
+ last_acknowledged_at: string | null;
283
+ control_source: C2SessionControlSource;
284
+ user_api_key_required: false;
285
+ metadata: Record<string, unknown>;
286
+ }
287
+ export interface C2SessionSummary {
288
+ total_sessions: number;
289
+ active_session_count: number;
290
+ paused_session_count: number;
291
+ revoked_session_count: number;
292
+ offline_session_count: number;
293
+ credential_reconnect_needed: boolean;
294
+ sessions: C2SessionState[];
295
+ }
296
+ export interface ExistingPassportMatchSuggestion {
297
+ item_id: string;
298
+ item_type: SmartRegistrationInboxItemType;
299
+ matched_passport_gaid: string;
300
+ match_confidence: RuntimePassportConfidence;
301
+ match_reason: string;
302
+ }
303
+ export interface SmartRegistrationInboxItem {
304
+ item_id: string;
305
+ item_type: SmartRegistrationInboxItemType;
306
+ display_name: string;
307
+ detected_source: string;
308
+ workspaceId: string | null;
309
+ projectId: string | null;
310
+ passport_gaid: string | null;
311
+ matched_passport_gaid: string | null;
312
+ match_confidence: RuntimePassportConfidence | null;
313
+ match_reason: string | null;
314
+ runtime_gaid: string | null;
315
+ agent_id: string | null;
316
+ confidence: RuntimePassportConfidence;
317
+ recommended_action: SmartRegistrationInboxAction;
318
+ allowed_actions: SmartRegistrationInboxAction[];
319
+ details_received_automatically: Record<string, string | number | boolean | null>;
320
+ safe_metadata_only: true;
321
+ }
322
+ export interface SmartRegistrationInboxSummary {
323
+ generated_at: string;
324
+ ready_to_connect_count: number;
325
+ needs_confirmation_count: number;
326
+ connected_count: number;
327
+ ignored_count: number;
328
+ next_recommended_action: SmartRegistrationInboxAction | null;
329
+ privacy_summary: string;
330
+ }
331
+ export interface SmartRegistrationInbox {
332
+ summary: SmartRegistrationInboxSummary;
333
+ groups: Record<SmartRegistrationInboxGroup, SmartRegistrationInboxItem[]>;
334
+ existing_passport_match_candidates: ExistingPassportMatchSuggestion[];
335
+ user_api_key_required: false;
336
+ website_is_governance_authority: true;
337
+ }
338
+ export interface ConnectHandoffPayload {
339
+ handoff_version: 'connect.v1';
340
+ generated_at: string;
341
+ connect_device_id: string | null;
342
+ identity_status: ConnectIdentityStatus;
343
+ workspace_id: string | null;
344
+ project_id: string | null;
345
+ entitlements: ServiceEntitlements;
346
+ permissions: ConnectPermissionsSummary;
347
+ services: ConnectServiceStatus[];
348
+ evolution: EvolutionReviewSnapshot;
349
+ runtime_summary: RuntimeHandoffSummary;
350
+ agent_model_usage_summary: AgentModelUsageLedgerSummary;
351
+ c2_session_summary: C2SessionSummary;
352
+ smart_inbox: SmartRegistrationInbox;
353
+ existing_passport_match_candidates: ExistingPassportMatchSuggestion[];
354
+ user_api_key_required: false;
355
+ website_is_governance_authority: true;
356
+ signed_event: SignedConnectEvent;
357
+ privacy_summary: string;
358
+ }
359
+ export type NotificationDeliveryChannel = 'native' | 'recorded';
360
+ export interface ReviewEntry {
361
+ kind: 'model' | 'process' | 'provider';
362
+ status: ReviewStatus;
363
+ model_name: string | null;
364
+ runtime_name: string | null;
365
+ process_name: string | null;
366
+ discovery_hash: string | null;
367
+ registration_key: string | null;
368
+ draft_id: string | null;
369
+ passport_gaid: string | null;
370
+ confidence?: RuntimePassportConfidence | null;
371
+ source_label?: string | null;
372
+ matched_terms?: string[];
373
+ reason?: string | null;
374
+ suggested_action: string;
375
+ }
376
+ export interface ReviewSnapshot {
377
+ groups: Record<ReviewStatus, ReviewEntry[]>;
378
+ total: number;
379
+ }
380
+ export interface AgentReviewEntry {
381
+ agent_id: string;
382
+ agent_name: string;
383
+ agent_type: AgentType;
384
+ status: AgentStatus;
385
+ linked_model_name: string | null;
386
+ linked_passport_gaid: string | null;
387
+ confidence?: RuntimePassportConfidence | null;
388
+ source_label?: string | null;
389
+ matched_terms?: string[];
390
+ suggested_action: string;
391
+ }
392
+ export interface AgentReviewSnapshot {
393
+ groups: Record<AgentReviewStatus, AgentReviewEntry[]>;
394
+ total: number;
395
+ }
396
+ export interface NotificationCandidate {
397
+ id: string;
398
+ type: NotificationCandidateType;
399
+ title: string;
400
+ message: string;
401
+ suggested_action: NotificationSuggestedAction;
402
+ severity: TrayStatusColor;
403
+ metadata: Record<string, unknown>;
404
+ }
405
+ export interface DeliveredNotification {
406
+ notification_id: string;
407
+ notification_type: NotificationCandidateType;
408
+ target_id: string;
409
+ delivered_at: string;
410
+ delivery_channel: NotificationDeliveryChannel;
411
+ }
412
+ export interface TrayMenuAction {
413
+ id: string;
414
+ label: string;
415
+ command: string;
416
+ }
417
+ export interface TrayMenuRecentItem {
418
+ id: string;
419
+ label: string;
420
+ status: string;
421
+ }
422
+ export interface TrayMenuModel {
423
+ status_color: TrayStatusColor;
424
+ headline: string;
425
+ actions: TrayMenuAction[];
426
+ recent_models: TrayMenuRecentItem[];
427
+ recent_agents: TrayMenuRecentItem[];
428
+ privacy_note: string;
429
+ }
430
+ export interface C2LifecycleEvent {
431
+ event_id: string;
432
+ event_type: C2LiteEventType;
433
+ occurred_at: string;
434
+ runtime_gaid?: string | null;
435
+ runtime_name: string | null;
436
+ runtime_type: RuntimeType | null;
437
+ model_name: string | null;
438
+ discovery_hash: string | null;
439
+ registration_key: string | null;
440
+ passport_gaid: string | null;
441
+ workspace_id: string | null;
442
+ project_id: string | null;
443
+ pulse_status: PulseStatus | null;
444
+ connection_classification: DiscoveryClassification | null;
445
+ daemon_running: boolean | null;
446
+ shadow_candidate_reason: string | null;
447
+ metadata: Record<string, unknown>;
448
+ sync_state: C2LiteSyncState;
449
+ synced_at: string | null;
450
+ last_error: string | null;
451
+ retry_count?: number;
452
+ }
453
+ export interface BuildDatasetRef {
454
+ dataset_ref: string;
455
+ change_type: DatasetChangeType;
456
+ timestamp: string;
457
+ }
458
+ export interface BuildMetric {
459
+ metric_id: string;
460
+ name: string;
461
+ value: number;
462
+ logged_at: string;
463
+ version_name: string | null;
464
+ }
465
+ export interface BuildVersionRecord {
466
+ version_name: string;
467
+ reason: string;
468
+ created_at: string;
469
+ dataset_refs: BuildDatasetRef[];
470
+ metrics: BuildMetric[];
471
+ }
472
+ export interface BuildArtifactRef {
473
+ created_at: string;
474
+ artifact_path_hash: string;
475
+ artifact_hash: string | null;
476
+ hash_algorithm: 'sha256';
477
+ }
478
+ export interface BuildLifecycleEvent {
479
+ event_id: string;
480
+ event_type: TrainingLifecycleEventType;
481
+ occurred_at: string;
482
+ metadata: Record<string, unknown>;
483
+ }
484
+ export interface BuildSession {
485
+ build_session_id: string;
486
+ model_name: string;
487
+ framework: string;
488
+ task: string;
489
+ source_mode: 'connect_training';
490
+ workspaceId: string | null;
491
+ projectId: string | null;
492
+ draft_id: string | null;
493
+ passport_gaid: string | null;
494
+ status: BuildSessionStatus;
495
+ created_at: string;
496
+ updated_at: string;
497
+ dataset_refs: BuildDatasetRef[];
498
+ versions: BuildVersionRecord[];
499
+ metrics: BuildMetric[];
500
+ lifecycle_events: BuildLifecycleEvent[];
501
+ artifact_refs: BuildArtifactRef[];
502
+ }
503
+ export interface DetectedAgent {
504
+ agent_id: string;
505
+ agent_name: string;
506
+ agent_type: AgentType;
507
+ process_name: string | null;
508
+ process_signature_hash: string;
509
+ detected_at: string;
510
+ last_seen_at: string;
511
+ status: AgentStatus;
512
+ persistence?: 'temporary' | 'permanent';
513
+ discovery_sources: AgentDiscoverySource[];
514
+ metadata: Record<string, unknown>;
515
+ }
516
+ export interface AgentLink {
517
+ link_id: string;
518
+ agent_id: string;
519
+ model_name: string;
520
+ discoveryHash: string;
521
+ registrationKey: string | null;
522
+ passport_gaid: string | null;
523
+ runtime_gaid?: string | null;
524
+ runtime_candidate?: {
525
+ runtime_gaid: string | null;
526
+ runtime_name: string;
527
+ runtime_type: RuntimeType;
528
+ provider: string;
529
+ discoveryHash: string;
530
+ source_endpoint_label: string;
531
+ confidence: RuntimePassportConfidence;
532
+ } | null;
533
+ created_at: string;
534
+ updated_at: string;
535
+ }
536
+ export interface AgentModelUsageRecord {
537
+ usage_id: string;
538
+ agent_id: string;
539
+ agent_name: string;
540
+ agent_type: AgentType;
541
+ process_signature_hash: string;
542
+ model_name: string;
543
+ discoveryHash: string;
544
+ registrationKey: string | null;
545
+ passport_gaid: string | null;
546
+ runtime_gaid: string | null;
547
+ runtime_name: string | null;
548
+ runtime_type: RuntimeType | null;
549
+ provider: string | null;
550
+ source: AgentModelUsageSource;
551
+ confidence: RuntimePassportConfidence | null;
552
+ session_id: string | null;
553
+ first_observed_at: string;
554
+ last_observed_at: string;
555
+ ended_at: string | null;
556
+ metadata: Record<string, unknown>;
557
+ }
558
+ export interface AgentModelUsageLedgerSummary {
559
+ generated_at: string;
560
+ total_records: number;
561
+ active_records: number;
562
+ switch_event_count: number;
563
+ agent_count: number;
564
+ records: AgentModelUsageRecord[];
565
+ }
566
+ export interface RuntimePassport {
567
+ runtime_gaid: string;
568
+ connect_device_id: string;
569
+ runtime_name: string;
570
+ runtime_type: RuntimeType;
571
+ provider: string;
572
+ endpoint_hash: string;
573
+ source_endpoint_label: string;
574
+ discoveryHash: string;
575
+ status: RuntimePassportStatus;
576
+ first_seen_at: string;
577
+ last_seen_at: string;
578
+ health_status: ProviderHealthStatus;
579
+ linked_model_gaids: string[];
580
+ linked_agent_ids: string[];
581
+ workspaceId: string | null;
582
+ projectId: string | null;
583
+ confidence: RuntimePassportConfidence;
584
+ metadata: Record<string, unknown>;
585
+ review_state?: ReviewDisposition | undefined;
586
+ review_deferred_until?: string | null;
587
+ }
588
+ export interface SanitizedProcessMetadata {
589
+ pid: number;
590
+ parent_pid: number | null;
591
+ process_name: string;
592
+ executable_name: string;
593
+ signature: string;
594
+ known_provider: string | null;
595
+ provider_hints?: string[];
596
+ expected_ports?: number[];
597
+ matched_terms: string[];
598
+ command_hash: string | null;
599
+ path_hash: string | null;
600
+ confidence?: RuntimePassportConfidence;
601
+ detection_mode?: 'signature' | 'heuristic';
602
+ source_label?: string;
603
+ reason?: string | null;
604
+ }
605
+ export interface ShadowFinding {
606
+ classification: DiscoveryClassification;
607
+ kind: 'provider' | 'model' | 'process';
608
+ runtime: string | null;
609
+ model: string | null;
610
+ process_name: string | null;
611
+ reason: string;
612
+ action: string;
613
+ discovery_hash: string | null;
614
+ process: SanitizedProcessMetadata | null;
615
+ }
616
+ export interface DaemonScanSummary {
617
+ discovery_mode: DiscoveryMode;
618
+ providers_detected: number;
619
+ models_detected: number;
620
+ new_unregistered_count: number;
621
+ known_unregistered_count: number;
622
+ registered_runtime_count: number;
623
+ shadow_candidate_count: number;
624
+ provider_unavailable_count: number;
625
+ findings: ShadowFinding[];
626
+ }
627
+ export interface DaemonStatus {
628
+ daemon_running: boolean;
629
+ daemon_pid: number | null;
630
+ started_at: string | null;
631
+ last_scan_at: string | null;
632
+ last_scan_summary: DaemonScanSummary | null;
633
+ last_error: string | null;
634
+ }
635
+ export type ObservationMode = 'metadata_only';
636
+ export type ObservationDegradedMode = 'normal' | 'partial_metrics' | 'provider_unavailable';
637
+ export interface VitalityMetricAvailability {
638
+ available: boolean;
639
+ note: string;
640
+ source: string;
641
+ }
642
+ export interface VitalityMetricAvailabilityMap {
643
+ cpu_usage_percent: VitalityMetricAvailability;
644
+ memory_usage_mb: VitalityMetricAvailability;
645
+ uptime_seconds: VitalityMetricAvailability;
646
+ runtime_latency_ms: VitalityMetricAvailability;
647
+ token_metrics: VitalityMetricAvailability;
648
+ gpu_utilization_percent: VitalityMetricAvailability;
649
+ gpu_vram_used_mb: VitalityMetricAvailability;
650
+ }
651
+ export interface VitalityPulseEntry {
652
+ measured_at: string;
653
+ runtime_gaid?: string | null;
654
+ runtime_name: string;
655
+ runtime_type: RuntimeType | null;
656
+ model_name: string | null;
657
+ discovery_hash: string | null;
658
+ registration_key: string | null;
659
+ bound_passport_gaid: string | null;
660
+ binding_status: ModelBindingStatus | null;
661
+ connection_classification: DiscoveryClassification | null;
662
+ provider_status: ProviderHealthStatus;
663
+ registration_state: RegistrationState;
664
+ port_alive: boolean | null;
665
+ process_alive: boolean | null;
666
+ cpu_usage_percent: number | null;
667
+ memory_usage_mb: number | null;
668
+ uptime_seconds?: number | null;
669
+ runtime_latency_ms?: number | null;
670
+ gpu_available: boolean;
671
+ gpu_vram_used_mb: number | null;
672
+ gpu_utilization_percent: number | null;
673
+ observation_mode?: ObservationMode;
674
+ degraded_mode?: ObservationDegradedMode;
675
+ degraded_reasons?: string[];
676
+ metric_availability?: VitalityMetricAvailabilityMap;
677
+ pulse_status: PulseStatus;
678
+ }
679
+ export interface VitalityPulseEvent {
680
+ event_id: string;
681
+ measured_at: string;
682
+ runtime_gaid?: string | null;
683
+ runtime_name: string;
684
+ runtime_type: RuntimeType | null;
685
+ model_name: string | null;
686
+ discovery_hash: string | null;
687
+ registration_key: string | null;
688
+ bound_passport_gaid: string | null;
689
+ binding_status: ModelBindingStatus | null;
690
+ connection_classification: DiscoveryClassification | null;
691
+ provider_status: ProviderHealthStatus;
692
+ registration_state: RegistrationState;
693
+ port_alive: boolean | null;
694
+ process_alive: boolean | null;
695
+ cpu_usage_percent: number | null;
696
+ memory_usage_mb: number | null;
697
+ uptime_seconds?: number | null;
698
+ runtime_latency_ms?: number | null;
699
+ gpu_available: boolean;
700
+ gpu_vram_used_mb: number | null;
701
+ gpu_utilization_percent: number | null;
702
+ observation_mode?: ObservationMode;
703
+ degraded_mode?: ObservationDegradedMode;
704
+ degraded_reasons?: string[];
705
+ metric_availability?: VitalityMetricAvailabilityMap;
706
+ pulse_status: PulseStatus;
707
+ }
708
+ export interface VitalityPulseSummary {
709
+ measured_at: string;
710
+ pulse_status: PulseStatus;
711
+ observation_mode?: ObservationMode;
712
+ degraded_mode?: ObservationDegradedMode;
713
+ degraded_reasons?: string[];
714
+ entries: VitalityPulseEntry[];
715
+ green_count: number;
716
+ amber_count: number;
717
+ red_count: number;
718
+ unknown_count: number;
719
+ }
720
+ export interface RuntimeIdentity {
721
+ runtimeId: string;
722
+ hostname: string;
723
+ platform: string;
724
+ arch: string;
725
+ createdAt: string;
726
+ }
727
+ export interface UserSessionRef {
728
+ credentialPresent: boolean;
729
+ credentialRef: string | null;
730
+ authStatus: 'missing' | 'authenticated';
731
+ lastAuthenticatedAt: string | null;
732
+ updatedAt: string;
733
+ }
734
+ export interface WorkspaceBinding {
735
+ workspaceId: string | null;
736
+ updatedAt: string;
737
+ }
738
+ export interface ProjectBinding {
739
+ projectId: string | null;
740
+ updatedAt: string;
741
+ }
742
+ export interface DetectedRuntime {
743
+ runtime: string;
744
+ runtimeName: string;
745
+ runtimeType: RuntimeType;
746
+ endpoint: string;
747
+ discoveryHash: string;
748
+ discoverySources: DiscoverySource[];
749
+ sourceLabel: SourceLabel;
750
+ status: 'detected' | 'connected' | 'error';
751
+ lastSeenAt: string;
752
+ error: string | null;
753
+ }
754
+ export interface DetectedModel {
755
+ runtime: string;
756
+ runtimeName: string;
757
+ runtimeType: RuntimeType;
758
+ model: string;
759
+ modelId: string | null;
760
+ discoveryHash: string;
761
+ discoverySources: DiscoverySource[];
762
+ digest: string;
763
+ sizeBytes: number;
764
+ modifiedAt: string | null;
765
+ sourceEndpoint: string;
766
+ sourceLabel: SourceLabel;
767
+ status: 'detected' | 'ignored' | 'bound';
768
+ detectedAt: string;
769
+ runtime_name: string;
770
+ runtime_type: RuntimeType;
771
+ model_name: string;
772
+ model_id: string | null;
773
+ source_endpoint: string;
774
+ detected_at: string;
775
+ metadata: Record<string, unknown>;
776
+ checksumValue?: string | null;
777
+ checksumAlgorithm?: 'sha256' | null;
778
+ checksumSource?: 'manifest' | 'weights_blob' | 'file_hash' | null;
779
+ quantizationLevel?: string | null;
780
+ architectureFamily?: string | null;
781
+ parameterSize?: string | null;
782
+ review_state?: ReviewDisposition | undefined;
783
+ review_deferred_until?: string | null;
784
+ }
785
+ export interface ModelBinding {
786
+ modelKey: string;
787
+ discoveryHash?: string | null;
788
+ registrationKey?: string | null;
789
+ gaid: string | null;
790
+ passportName?: string | null;
791
+ passportType?: string | null;
792
+ workspaceId?: string | null;
793
+ projectId?: string | null;
794
+ workspaceName?: string | null;
795
+ projectName?: string | null;
796
+ remoteMatchSource?: 'forkit_passports_mine' | 'local_history' | string | null;
797
+ runtimeGaid?: string | null;
798
+ runtimeDiscoveryHash?: string | null;
799
+ activeSessionId?: string | null;
800
+ runtimeSignalKeyPresent?: boolean;
801
+ runtimeSignalKeyRef?: string | null;
802
+ evolutionBaseline?: ModelEvolutionSnapshot | null;
803
+ draftId: string | null;
804
+ status: ModelBindingStatus;
805
+ updatedAt: string;
806
+ }
807
+ export interface EvidenceEvent {
808
+ id: string;
809
+ type: 'runtime_detected' | 'runtime_scan_failed' | 'runtime_bound_to_model' | 'runtime_linked_to_agent' | 'runtime_health_changed' | 'runtime_restored' | 'runtime_unavailable' | 'model_detected' | 'model_ignored' | 'connect_reviewed' | 'passport_draft_requested' | 'model_draft_created' | 'model_passport_created' | 'model_draft_queued' | 'model_draft_synced' | 'passport_bound' | 'runtime_heartbeat_sent' | 'c2_session_observed' | 'c2_session_paused' | 'c2_session_resumed' | 'c2_session_revoked' | 'passport_governor_paused_observed' | 'passport_governor_revoked_observed' | 'credential_invalid_observed' | 'runtimeSignal_queued' | 'runtimeSignal_synced' | 'runtimeSignal_key_configured' | 'training_session_initialized' | 'training_event_recorded' | 'training_dataset_changed' | 'training_metric_logged' | 'training_version_created' | 'training_artifact_recorded' | 'model_evolution_candidate_detected' | 'model_evolution_candidate_archived' | 'agent_detected' | 'agent_connected' | 'agent_linked' | 'agent_model_usage_observed' | 'agent_model_switched' | 'agent_model_usage_closed' | 'agent_tool_observed' | 'agent_tool_blocked' | 'agent_tool_timed_out' | 'agent_inactive';
810
+ createdAt: string;
811
+ details: Record<string, unknown>;
812
+ }
813
+ export interface SyncQueueItem {
814
+ id: string;
815
+ type: 'passport-draft' | 'runtimeSignal-event';
816
+ endpoint: '/api/v1/passport-drafts' | '/api/v1/runtime-signals/events';
817
+ payload: Record<string, unknown>;
818
+ attempts: number;
819
+ createdAt: string;
820
+ nextRetryAt: string;
821
+ lastError: string | null;
822
+ }
823
+ export interface ConnectState {
824
+ runtime_identity: RuntimeIdentity;
825
+ user_session_reference: UserSessionRef;
826
+ workspace_binding: WorkspaceBinding;
827
+ project_binding: ProjectBinding;
828
+ effective_binding: ConnectEffectiveBindingState | null;
829
+ connect_identity: ConnectIdentityState;
830
+ connect_config: ConnectConfig;
831
+ service_entitlements: ServiceEntitlements;
832
+ daemon_status: DaemonStatus;
833
+ last_c2_sync_at: string | null;
834
+ last_c2_sync_error: string | null;
835
+ c2_events: C2LifecycleEvent[];
836
+ last_pulse_at: string | null;
837
+ last_pulse_summary: VitalityPulseSummary | null;
838
+ last_pulse_error: string | null;
839
+ pulse_events: VitalityPulseEvent[];
840
+ build_sessions: BuildSession[];
841
+ detected_agents: DetectedAgent[];
842
+ agent_links: AgentLink[];
843
+ agent_model_usage: AgentModelUsageRecord[];
844
+ detected_runtimes: DetectedRuntime[];
845
+ runtime_passports: RuntimePassport[];
846
+ c2_sessions: C2SessionState[];
847
+ evolution_candidates: ModelEvolutionCandidate[];
848
+ detected_models: DetectedModel[];
849
+ model_bindings: ModelBinding[];
850
+ delivered_notifications: DeliveredNotification[];
851
+ evidence_events: EvidenceEvent[];
852
+ sync_queue: SyncQueueItem[];
853
+ pending_reviews: PendingReview[];
854
+ lifecycle_monitor_records: LifecycleMonitorRecord[];
855
+ }
856
+ export interface OllamaTagResponse {
857
+ models?: Array<{
858
+ name?: string;
859
+ model?: string;
860
+ digest?: string;
861
+ size?: number;
862
+ modified_at?: string;
863
+ }>;
864
+ }
865
+ export interface LMStudioModelsResponse {
866
+ data?: Array<{
867
+ id?: string;
868
+ object?: string;
869
+ owned_by?: string;
870
+ created?: number | string;
871
+ }>;
872
+ }
873
+ //# sourceMappingURL=types.d.ts.map