@guinetik/primitives-ts 0.8.3 → 0.8.4

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/README.md CHANGED
@@ -40,31 +40,105 @@ const metrics: SystemMetrics = {
40
40
  };
41
41
  ```
42
42
 
43
- ## Type Categories
44
-
45
- ### Authentication (`auth.types.ts`)
46
- - `User` - User information
47
- - `AuthResponse` - Authentication response
48
- - `AuthProvider` - Authentication provider types
49
- - `UserUpdateData` - User profile update data
50
- - `LoginPayload` - Login request payload
51
-
52
- ### System Monitoring (`system.types.ts`)
53
- - `SystemMetrics` - System metrics (CPU, memory, disk)
54
- - `Container` - Docker container information
55
- - `LogEntry` - Container log entry
56
- - `NetworkStats` - Network statistics
57
- - `DeploymentInfo` - Deployment information
58
- - `CommandResult` - Shell command execution result
59
-
60
- ### Website Content (`website.types.ts`)
61
- - `SiteContent` - Full site content structure
62
- - `SiteMetadata` - Site metadata
63
- - `Menu`, `MenuItem` - Navigation menu
64
- - `Theme`, `ThemeConfig` - Theme configuration
65
- - `Card`, `Tag` - Project/demo cards with tags
66
- - `Experiment` - CodePen experiments
67
- - `AboutSection`, `ProjectsSection`, `DemosSection`, `ReposSection` - Content sections
43
+ ## Concept Catalog
44
+
45
+ `primitives-ts` is the contract layer of the Guinetik stack. Every type below is
46
+ consumed by at least two of: the NestJS API, the Vue admin panel, the Firestore
47
+ migration tooling, and guinetik.com itself.
48
+
49
+ ```mermaid
50
+ flowchart LR
51
+ P[primitives-ts]
52
+ P --> ID[Identity]
53
+ P --> CO[Content]
54
+ P --> OP[Operations]
55
+ P --> AS[Assistant]
56
+ P --> ST[Storage]
57
+
58
+ ID --> ID1[auth]
59
+ ID --> ID2[access]
60
+ ID --> ID3[totp]
61
+ ID --> ID4[security]
62
+
63
+ CO --> CO1[website]
64
+ CO --> CO2[launchpad]
65
+ CO --> CO3[files]
66
+
67
+ OP --> OP1[system]
68
+ OP --> OP2[agents]
69
+ OP --> OP3[deployments]
70
+ OP --> OP4[github]
71
+
72
+ AS --> AS1[chat]
73
+ AS --> AS2[guards]
74
+
75
+ ST --> ST1[firestore]
76
+ ```
77
+
78
+ ### How the domains relate
79
+
80
+ ```mermaid
81
+ flowchart LR
82
+ A[auth<br/>who you are] --> B[access<br/>what you may do]
83
+ T[totp<br/>second factor] --> A
84
+ B --> F[FeatureKey]
85
+ F --> C[Content]
86
+ F --> O[Operations]
87
+ F --> X[Assistant]
88
+ C --> S[(firestore)]
89
+ X --> S
90
+ ```
91
+
92
+ Authentication proves identity, access control turns that identity into a set of
93
+ `FeatureKey` grants, and every other domain is gated by one of those keys. The
94
+ Firestore document types are the persisted shape of whatever the other domains
95
+ produce.
96
+
97
+ ---
98
+
99
+ ### Identity & Access
100
+
101
+ | Module | Key exports | Purpose |
102
+ | --- | --- | --- |
103
+ | `auth.types` | `User`, `AuthResponse`, `LoginPayload`, `AuthProvider`, `UserProvider` | Firebase-backed sign-in, email or Google |
104
+ | `access.types` | `AdminRole`, `FeatureKey`, `FEATURE_CATALOG`, `AdminUser`, `userHasFeature` | Role plus per-feature grants for the admin panel |
105
+ | `totp.types` | `TotpSetupResponse`, `TotpVerifyRequest`, `TotpStatusResponse` | Time-based one-time password enrolment and checks |
106
+ | `security.interface` | `Security`, `SecurityLevel`, `SecurityChallengeResult` | Provider-agnostic challenge contract |
107
+
108
+ An `AdminUser` is an `admin` or a `guest`; a guest sees only the features
109
+ explicitly granted to it. The nine grantable features are `dashboard`, `site`,
110
+ `runtime`, `files`, `launchpad`, `users`, `system`, `chat` and `agents`.
111
+
112
+ ### Content
113
+
114
+ | Module | Key exports | Purpose |
115
+ | --- | --- | --- |
116
+ | `website.types` | `SiteContent`, `SiteMetadata`, `SiteSections`, `Menu`, `Theme`, `Card` | Everything guinetik.com renders |
117
+ | `website-firestore.types` | `ProjectDocument`, `DemoDocument`, `FIRESTORE_COLLECTIONS` | The stored counterparts of the above |
118
+ | `launchpad.types` | `LaunchpadBoard`, `LaunchpadGroup`, `LaunchpadItem` | Bookmark board grouping and layout |
119
+ | `file.types` | `FileMetadata`, `FileUploadResponse`, `FileUploadProgress` | Uploads and their lifecycle |
120
+
121
+ ### Operations
122
+
123
+ | Module | Key exports | Purpose |
124
+ | --- | --- | --- |
125
+ | `system.types` | `SystemMetrics`, `Container`, `LogEntry`, `NetworkStats`, `CommandResult` | Host and Docker telemetry |
126
+ | `agent.types` | `AgentInfo`, `AgentStatus`, `AgentTask`, `AgentTasksResponse` | Autonomous agent fleet monitoring |
127
+ | `deployment-history.types` | `DeploymentRecord`, `DeploymentHistoryResponse` | What shipped, when, and whether it held |
128
+ | `github.types` | `GitHubRepository`, `GitHubOwner`, `GitHubLicense` | The subset of the GitHub REST shape we consume |
129
+
130
+ ### Assistant
131
+
132
+ | Module | Key exports | Purpose |
133
+ | --- | --- | --- |
134
+ | `chat.types` | `ChatSession`, `ChatMessage`, `ClaudeModel`, `SendMessageRequest` | Session-based chat with model selection |
135
+ | `type-guards` | `isChatMessage`, `isChatSession`, `isModel`, `isClaudeModel` | Runtime validation at the API boundary |
136
+
137
+ ### Storage
138
+
139
+ | Module | Key exports | Purpose |
140
+ | --- | --- | --- |
141
+ | `firestore.types` | `FirestoreDocument`, `FirestoreCollection` | Base document shape every stored type extends |
68
142
 
69
143
  ## Development
70
144
 
@@ -20,14 +20,14 @@ export interface Model {
20
20
  * @deprecated Use Model type instead
21
21
  */
22
22
  export declare enum ClaudeModel {
23
- /** Claude Haiku 3.5 - Fastest, most cost-effective */
24
- HAIKU_3_5 = "claude-3-5-haiku-20241022",
25
- /** Claude Sonnet 3.5 - Balanced performance and quality */
26
- SONNET_3_5 = "claude-3-5-sonnet-20241022",
27
- /** Claude Sonnet 3.7 - Extended thinking capability */
28
- SONNET_3_7 = "claude-3-5-sonnet-20250219",
29
- /** Claude Opus 3 - Most powerful model for complex reasoning */
30
- OPUS_3 = "claude-3-opus-20240229"
23
+ /** Claude Haiku 4.5 - Fastest, most cost-effective */
24
+ HAIKU_4_5 = "claude-haiku-4-5",
25
+ /** Claude Sonnet 5 - Balanced performance and quality */
26
+ SONNET_5 = "claude-sonnet-5",
27
+ /** Claude Opus 5 - Powerful reasoning, adaptive thinking on by default */
28
+ OPUS_5 = "claude-opus-5",
29
+ /** Claude Fable 5 - Most capable model, premium pricing */
30
+ FABLE_5 = "claude-fable-5"
31
31
  }
32
32
  /**
33
33
  * Model metadata for display in UI
@@ -55,7 +55,7 @@ export interface ChatSession {
55
55
  id: string;
56
56
  /** User ID who created the session */
57
57
  userId: string;
58
- /** Current model ID for the session (e.g., "claude-sonnet-4-5-20250929") */
58
+ /** Current model ID for the session (e.g., "claude-opus-5") */
59
59
  model: string;
60
60
  /** Session creation timestamp */
61
61
  createdAt: Date;
@@ -89,7 +89,7 @@ export interface SendMessageRequest {
89
89
  sessionId?: string;
90
90
  /** User message content */
91
91
  message: string;
92
- /** Model ID to use for response (e.g., "claude-sonnet-4-5-20250929") */
92
+ /** Model ID to use for response (e.g., "claude-opus-5") */
93
93
  model: string;
94
94
  }
95
95
  /**
@@ -127,7 +127,7 @@ export interface GetSessionMessagesResponse {
127
127
  * Create new session request
128
128
  */
129
129
  export interface CreateSessionRequest {
130
- /** Initial model ID for the session (e.g., "claude-sonnet-4-5-20250929") */
130
+ /** Initial model ID for the session (e.g., "claude-opus-5") */
131
131
  model: string;
132
132
  /** Optional session title */
133
133
  title?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.types.d.ts","sourceRoot":"","sources":["../src/chat.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;CACpD;AAED;;;GAGG;AACH,oBAAY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;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAElB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IAEjB,sBAAsB;IACtB,aAAa,EAAE,MAAM,CAAC;IAEtB,2BAA2B;IAC3B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,4BAA4B;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,sCAAsC;IACtC,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,4BAA4B;IAC5B,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,EAAE,CAAC;CACrC"}
@@ -11,12 +11,12 @@ exports.ClaudeModel = void 0;
11
11
  */
12
12
  var ClaudeModel;
13
13
  (function (ClaudeModel) {
14
- /** Claude Haiku 3.5 - Fastest, most cost-effective */
15
- ClaudeModel["HAIKU_3_5"] = "claude-3-5-haiku-20241022";
16
- /** Claude Sonnet 3.5 - Balanced performance and quality */
17
- ClaudeModel["SONNET_3_5"] = "claude-3-5-sonnet-20241022";
18
- /** Claude Sonnet 3.7 - Extended thinking capability */
19
- ClaudeModel["SONNET_3_7"] = "claude-3-5-sonnet-20250219";
20
- /** Claude Opus 3 - Most powerful model for complex reasoning */
21
- ClaudeModel["OPUS_3"] = "claude-3-opus-20240229";
14
+ /** Claude Haiku 4.5 - Fastest, most cost-effective */
15
+ ClaudeModel["HAIKU_4_5"] = "claude-haiku-4-5";
16
+ /** Claude Sonnet 5 - Balanced performance and quality */
17
+ ClaudeModel["SONNET_5"] = "claude-sonnet-5";
18
+ /** Claude Opus 5 - Powerful reasoning, adaptive thinking on by default */
19
+ ClaudeModel["OPUS_5"] = "claude-opus-5";
20
+ /** Claude Fable 5 - Most capable model, premium pricing */
21
+ ClaudeModel["FABLE_5"] = "claude-fable-5";
22
22
  })(ClaudeModel || (exports.ClaudeModel = ClaudeModel = {}));
@@ -17,35 +17,35 @@ describe('Chat Types', () => {
17
17
  const modelCount = Object.keys(chat_types_1.ClaudeModel).length;
18
18
  expect(modelCount).toBe(4);
19
19
  });
20
- it('should have HAIKU_3_5 with correct ID', () => {
21
- expect(chat_types_1.ClaudeModel.HAIKU_3_5).toBe('claude-3-5-haiku-20241022');
20
+ it('should have HAIKU_4_5 with correct ID', () => {
21
+ expect(chat_types_1.ClaudeModel.HAIKU_4_5).toBe('claude-haiku-4-5');
22
22
  });
23
- it('should have SONNET_3_5 with correct ID', () => {
24
- expect(chat_types_1.ClaudeModel.SONNET_3_5).toBe('claude-3-5-sonnet-20241022');
23
+ it('should have SONNET_5 with correct ID', () => {
24
+ expect(chat_types_1.ClaudeModel.SONNET_5).toBe('claude-sonnet-5');
25
25
  });
26
- it('should have SONNET_3_7 with correct ID', () => {
27
- expect(chat_types_1.ClaudeModel.SONNET_3_7).toBe('claude-3-5-sonnet-20250219');
26
+ it('should have OPUS_5 with correct ID', () => {
27
+ expect(chat_types_1.ClaudeModel.OPUS_5).toBe('claude-opus-5');
28
28
  });
29
- it('should have OPUS_3 with correct ID', () => {
30
- expect(chat_types_1.ClaudeModel.OPUS_3).toBe('claude-3-opus-20240229');
29
+ it('should have FABLE_5 with correct ID', () => {
30
+ expect(chat_types_1.ClaudeModel.FABLE_5).toBe('claude-fable-5');
31
31
  });
32
32
  it('should not have duplicate model IDs', () => {
33
33
  const modelIds = Object.values(chat_types_1.ClaudeModel);
34
34
  const uniqueIds = new Set(modelIds);
35
35
  expect(modelIds.length).toBe(uniqueIds.size);
36
36
  });
37
- it('should have model IDs with valid date format', () => {
37
+ it('should not carry legacy date suffixes', () => {
38
38
  const allModels = Object.values(chat_types_1.ClaudeModel);
39
- const datePattern = /\d{8}$/; // YYYYMMDD at the end
39
+ const datePattern = /-\d{8}$/; // legacy YYYYMMDD snapshot suffix
40
40
  allModels.forEach((modelId) => {
41
- expect(modelId).toMatch(datePattern);
41
+ expect(modelId).not.toMatch(datePattern);
42
42
  });
43
43
  });
44
44
  it('should be accessible by enum key', () => {
45
- expect(chat_types_1.ClaudeModel['HAIKU_3_5']).toBeDefined();
46
- expect(chat_types_1.ClaudeModel['SONNET_3_5']).toBeDefined();
47
- expect(chat_types_1.ClaudeModel['SONNET_3_7']).toBeDefined();
48
- expect(chat_types_1.ClaudeModel['OPUS_3']).toBeDefined();
45
+ expect(chat_types_1.ClaudeModel['HAIKU_4_5']).toBeDefined();
46
+ expect(chat_types_1.ClaudeModel['SONNET_5']).toBeDefined();
47
+ expect(chat_types_1.ClaudeModel['OPUS_5']).toBeDefined();
48
+ expect(chat_types_1.ClaudeModel['FABLE_5']).toBeDefined();
49
49
  });
50
50
  it('should support iteration over enum values', () => {
51
51
  const models = [];
@@ -53,10 +53,10 @@ describe('Chat Types', () => {
53
53
  models.push(model);
54
54
  }
55
55
  expect(models).toHaveLength(4);
56
- expect(models).toContain('claude-3-5-haiku-20241022');
57
- expect(models).toContain('claude-3-5-sonnet-20241022');
58
- expect(models).toContain('claude-3-5-sonnet-20250219');
59
- expect(models).toContain('claude-3-opus-20240229');
56
+ expect(models).toContain('claude-haiku-4-5');
57
+ expect(models).toContain('claude-sonnet-5');
58
+ expect(models).toContain('claude-opus-5');
59
+ expect(models).toContain('claude-fable-5');
60
60
  });
61
61
  });
62
62
  describe('Model Tier Values', () => {
@@ -35,7 +35,7 @@ describe('Type Guards', () => {
35
35
  it('should return true for ChatMessage with optional model', () => {
36
36
  const messageWithModel = {
37
37
  ...validMessage,
38
- model: 'claude-sonnet-4-5-20250929',
38
+ model: 'claude-opus-5',
39
39
  };
40
40
  expect((0, type_guards_1.isChatMessage)(messageWithModel)).toBe(true);
41
41
  });
@@ -68,7 +68,7 @@ describe('Type Guards', () => {
68
68
  const validSession = {
69
69
  id: 'session_123',
70
70
  userId: 'user_456',
71
- model: 'claude-sonnet-4-5-20250929',
71
+ model: 'claude-opus-5',
72
72
  createdAt: new Date(),
73
73
  updatedAt: new Date(),
74
74
  };
@@ -105,7 +105,7 @@ describe('Type Guards', () => {
105
105
  describe('isModel', () => {
106
106
  const validModel = {
107
107
  type: 'model',
108
- id: 'claude-sonnet-4-5-20250929',
108
+ id: 'claude-opus-5',
109
109
  display_name: 'Claude Sonnet 4.5',
110
110
  created_at: '2025-09-29T00:00:00Z',
111
111
  };
@@ -139,19 +139,19 @@ describe('Type Guards', () => {
139
139
  });
140
140
  describe('isClaudeModel', () => {
141
141
  it('should return true for valid ClaudeModel enum values', () => {
142
- expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.HAIKU_3_5)).toBe(true);
143
- expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.SONNET_3_5)).toBe(true);
144
- expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.SONNET_3_7)).toBe(true);
145
- expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.OPUS_3)).toBe(true);
142
+ expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.HAIKU_4_5)).toBe(true);
143
+ expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.SONNET_5)).toBe(true);
144
+ expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.OPUS_5)).toBe(true);
145
+ expect((0, type_guards_1.isClaudeModel)(chat_types_1.ClaudeModel.FABLE_5)).toBe(true);
146
146
  });
147
147
  it('should return true for valid model ID strings', () => {
148
- expect((0, type_guards_1.isClaudeModel)('claude-3-5-haiku-20241022')).toBe(true);
149
- expect((0, type_guards_1.isClaudeModel)('claude-3-5-sonnet-20241022')).toBe(true);
150
- expect((0, type_guards_1.isClaudeModel)('claude-3-5-sonnet-20250219')).toBe(true);
151
- expect((0, type_guards_1.isClaudeModel)('claude-3-opus-20240229')).toBe(true);
148
+ expect((0, type_guards_1.isClaudeModel)('claude-haiku-4-5')).toBe(true);
149
+ expect((0, type_guards_1.isClaudeModel)('claude-sonnet-5')).toBe(true);
150
+ expect((0, type_guards_1.isClaudeModel)('claude-opus-5')).toBe(true);
151
+ expect((0, type_guards_1.isClaudeModel)('claude-fable-5')).toBe(true);
152
152
  });
153
153
  it('should return false for invalid model IDs', () => {
154
- expect((0, type_guards_1.isClaudeModel)('claude-4-sonnet')).toBe(false);
154
+ expect((0, type_guards_1.isClaudeModel)('claude-3-opus-20240229')).toBe(false);
155
155
  expect((0, type_guards_1.isClaudeModel)('gpt-4')).toBe(false);
156
156
  expect((0, type_guards_1.isClaudeModel)('invalid-model')).toBe(false);
157
157
  expect((0, type_guards_1.isClaudeModel)('')).toBe(false);
@@ -166,7 +166,7 @@ describe('Type Guards', () => {
166
166
  describe('isSendMessageRequest', () => {
167
167
  const validRequest = {
168
168
  message: 'Hello, Claude!',
169
- model: 'claude-sonnet-4-5-20250929',
169
+ model: 'claude-opus-5',
170
170
  };
171
171
  it('should return true for valid SendMessageRequest', () => {
172
172
  expect((0, type_guards_1.isSendMessageRequest)(validRequest)).toBe(true);
@@ -194,7 +194,7 @@ describe('Type Guards', () => {
194
194
  });
195
195
  describe('isCreateSessionRequest', () => {
196
196
  const validRequest = {
197
- model: 'claude-sonnet-4-5-20250929',
197
+ model: 'claude-opus-5',
198
198
  };
199
199
  it('should return true for valid CreateSessionRequest', () => {
200
200
  expect((0, type_guards_1.isCreateSessionRequest)(validRequest)).toBe(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guinetik/primitives-ts",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Shared TypeScript primitives for Guinetik projects",
5
5
  "author": "Guinetik",
6
6
  "license": "MIT",