@intelligo-dev/core 1.0.0-beta.2 → 1.0.0-beta.3

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 (50) hide show
  1. package/dist/conversations/index.d.ts +3 -3
  2. package/dist/conversations/index.js +2 -2
  3. package/dist/conversations/service.d.ts +1 -1
  4. package/dist/conversations/service.js +3 -3
  5. package/dist/conversations/types.d.ts +1 -1
  6. package/dist/db/client.js +1 -1
  7. package/dist/db/index.d.ts +3 -3
  8. package/dist/db/index.js +3 -3
  9. package/dist/db/schema/ai.d.ts +1 -1
  10. package/dist/db/schema/ai.js +1 -1
  11. package/dist/db/schema/billing.js +1 -1
  12. package/dist/db/schema/identity.js +1 -1
  13. package/dist/db/schema/index.d.ts +9 -9
  14. package/dist/db/schema/index.js +9 -9
  15. package/dist/db/schema/usage.js +1 -1
  16. package/dist/db/validate.js +1 -1
  17. package/dist/documents/index.d.ts +4 -4
  18. package/dist/documents/index.js +3 -3
  19. package/dist/documents/service.d.ts +1 -1
  20. package/dist/documents/service.js +4 -4
  21. package/dist/email/index.d.ts +4 -4
  22. package/dist/email/index.js +4 -4
  23. package/dist/email/send.d.ts +1 -1
  24. package/dist/email/send.js +1 -1
  25. package/dist/email/senders.d.ts +1 -1
  26. package/dist/email/senders.js +2 -2
  27. package/dist/email/templates/index.d.ts +10 -10
  28. package/dist/email/templates/index.js +10 -10
  29. package/dist/email/templates/password-reset.js +1 -1
  30. package/dist/email/templates/payment-failed.js +1 -1
  31. package/dist/email/templates/quota-warning.js +1 -1
  32. package/dist/email/templates/subscription-confirmed.js +1 -1
  33. package/dist/email/templates/trial-expiry.js +1 -1
  34. package/dist/email/templates/trial-warning.js +1 -1
  35. package/dist/email/templates/verify-email.js +1 -1
  36. package/dist/email/templates/welcome.js +1 -1
  37. package/dist/email/templates/workspace-invitation.js +1 -1
  38. package/dist/identity/audit.d.ts +1 -1
  39. package/dist/identity/audit.js +3 -3
  40. package/dist/identity/index.d.ts +3 -3
  41. package/dist/identity/index.js +2 -2
  42. package/dist/identity/service.d.ts +2 -2
  43. package/dist/identity/service.js +4 -4
  44. package/dist/identity/types.d.ts +1 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/notifications/index.d.ts +3 -3
  48. package/dist/notifications/index.js +3 -3
  49. package/dist/notifications/triggers.js +2 -2
  50. package/package.json +2 -2
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Use via subpath import: @intelligo-dev/core/conversations
9
9
  */
10
- export { createConversation, getConversation, listConversations, getConversationHistory, renameConversation, deleteConversation, deleteAllConversations, getMessages, saveMessages, upsertMessages, updateMessage, deleteTrailingMessages, voteMessage, getVotes, } from "./service";
11
- export { ConversationServiceError, isConversationServiceError, type ConversationServiceErrorCode, } from "./errors";
12
- export type { ConversationActor, Conversation, InsertConversation, Message, InsertMessage, Vote, InsertVote, ConversationMetadata, } from "./types";
10
+ export { createConversation, getConversation, listConversations, getConversationHistory, renameConversation, deleteConversation, deleteAllConversations, getMessages, saveMessages, upsertMessages, updateMessage, deleteTrailingMessages, voteMessage, getVotes, } from "./service.js";
11
+ export { ConversationServiceError, isConversationServiceError, type ConversationServiceErrorCode, } from "./errors.js";
12
+ export type { ConversationActor, Conversation, InsertConversation, Message, InsertMessage, Vote, InsertVote, ConversationMetadata, } from "./types.js";
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -7,6 +7,6 @@
7
7
  *
8
8
  * Use via subpath import: @intelligo-dev/core/conversations
9
9
  */
10
- export { createConversation, getConversation, listConversations, getConversationHistory, renameConversation, deleteConversation, deleteAllConversations, getMessages, saveMessages, upsertMessages, updateMessage, deleteTrailingMessages, voteMessage, getVotes, } from "./service";
11
- export { ConversationServiceError, isConversationServiceError, } from "./errors";
10
+ export { createConversation, getConversation, listConversations, getConversationHistory, renameConversation, deleteConversation, deleteAllConversations, getMessages, saveMessages, upsertMessages, updateMessage, deleteTrailingMessages, voteMessage, getVotes, } from "./service.js";
11
+ export { ConversationServiceError, isConversationServiceError, } from "./errors.js";
12
12
  //# sourceMappingURL=index.js.map
@@ -35,7 +35,7 @@
35
35
  *
36
36
  * This module is SERVER-ONLY. Do not import from client components.
37
37
  */
38
- import type { Conversation, ConversationActor, InsertMessage, Message, Vote } from "./types";
38
+ import type { Conversation, ConversationActor, InsertMessage, Message, Vote } from "./types.js";
39
39
  /**
40
40
  * Create a new conversation.
41
41
  *
@@ -36,9 +36,9 @@
36
36
  * This module is SERVER-ONLY. Do not import from client components.
37
37
  */
38
38
  import { and, asc, desc, eq, gt, inArray, lt, sql } from "drizzle-orm";
39
- import { db } from "../db";
40
- import { conversations, messages, votes } from "../db/schema";
41
- import { ConversationServiceError } from "./errors";
39
+ import { db } from "../db/index.js";
40
+ import { conversations, messages, votes } from "../db/schema/index.js";
41
+ import { ConversationServiceError } from "./errors.js";
42
42
  // ---------------------------------------------------------------------------
43
43
  // Internal helpers
44
44
  // ---------------------------------------------------------------------------
@@ -6,5 +6,5 @@ export type ConversationActor = {
6
6
  workspaceId: string;
7
7
  userId: string;
8
8
  };
9
- export type { Conversation, InsertConversation, Message, InsertMessage, Vote, InsertVote, ConversationMetadata, } from "../db/schema";
9
+ export type { Conversation, InsertConversation, Message, InsertMessage, Vote, InsertVote, ConversationMetadata, } from "../db/schema/index.js";
10
10
  //# sourceMappingURL=types.d.ts.map
package/dist/db/client.js CHANGED
@@ -31,7 +31,7 @@ import { drizzle as drizzlePostgres } from "drizzle-orm/node-postgres";
31
31
  import { Pool as NeonPool, neonConfig } from "@neondatabase/serverless";
32
32
  import pkg from "pg";
33
33
  const { Pool } = pkg;
34
- import * as schema from "./schema";
34
+ import * as schema from "./schema/index.js";
35
35
  let cached = null;
36
36
  /**
37
37
  * Which driver a connection string gets. Pure, so the rule is testable
@@ -1,4 +1,4 @@
1
- export * from "./client";
2
- export * from "./validate";
3
- export { workspaceEq, withWorkspaceFilter } from "./workspace-queries";
1
+ export * from "./client.js";
2
+ export * from "./validate.js";
3
+ export { workspaceEq, withWorkspaceFilter } from "./workspace-queries.js";
4
4
  //# sourceMappingURL=index.d.ts.map
package/dist/db/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  // Re-export database client
2
- export * from "./client";
2
+ export * from "./client.js";
3
3
  // Re-export database validation utilities
4
- export * from "./validate";
4
+ export * from "./validate.js";
5
5
  // Re-export workspace-scoped query helpers (Phase 10)
6
- export { workspaceEq, withWorkspaceFilter } from "./workspace-queries";
6
+ export { workspaceEq, withWorkspaceFilter } from "./workspace-queries.js";
7
7
  // This file will later also re-export schema types and helpers
8
8
  //# sourceMappingURL=index.js.map
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Pattern: snake_case columns in PostgreSQL, camelCase TypeScript API (via Drizzle mapping)
8
8
  */
9
- import type { BilingualText } from "./agents";
9
+ import type { BilingualText } from "./agents.js";
10
10
  /**
11
11
  * Generic conversation metadata bag.
12
12
  *
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import { pgTable, text, timestamp, integer, index, uniqueIndex, boolean, primaryKey, jsonb, } from "drizzle-orm/pg-core";
10
10
  import { vector } from "drizzle-orm/pg-core/columns/vector_extension/vector";
11
- import { organization, users } from "./auth";
11
+ import { organization, users } from "./auth.js";
12
12
  /**
13
13
  * Conversations table - Chat sessions per workspace/user
14
14
  * Each conversation tracks a single chat session with a specific agent
@@ -7,7 +7,7 @@
7
7
  * Pattern: snake_case columns in PostgreSQL, camelCase TypeScript API (via Drizzle mapping)
8
8
  */
9
9
  import { pgTable, text, timestamp, integer, boolean, index, unique, } from "drizzle-orm/pg-core";
10
- import { organization } from "./auth";
10
+ import { organization } from "./auth.js";
11
11
  /**
12
12
  * Plans table - DB-configured pricing plans per product
13
13
  * Allows dynamic plan changes without code deployment
@@ -27,7 +27,7 @@
27
27
  */
28
28
  import { pgTable, primaryKey, text, timestamp, integer, index, uniqueIndex, jsonb, doublePrecision, } from "drizzle-orm/pg-core";
29
29
  import { vector } from "drizzle-orm/pg-core/columns/vector_extension/vector";
30
- import { organization, users } from "./auth";
30
+ import { organization, users } from "./auth.js";
31
31
  // ---------------------------------------------------------------------------
32
32
  // 1. user_facts — structured, evidence-backed facts
33
33
  // ---------------------------------------------------------------------------
@@ -4,13 +4,13 @@
4
4
  * Central export point for all database tables.
5
5
  * This file will be extended in future phases with workspace, billing, and AI schemas.
6
6
  */
7
- export * from "./auth";
8
- export * from "./billing";
9
- export * from "./usage";
10
- export * from "./notifications";
11
- export * from "./feature-flags";
12
- export * from "./ai";
13
- export * from "./agents";
14
- export * from "./identity";
15
- export * from "./rag";
7
+ export * from "./auth.js";
8
+ export * from "./billing.js";
9
+ export * from "./usage.js";
10
+ export * from "./notifications.js";
11
+ export * from "./feature-flags.js";
12
+ export * from "./ai.js";
13
+ export * from "./agents.js";
14
+ export * from "./identity.js";
15
+ export * from "./rag.js";
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -5,7 +5,7 @@
5
5
  * This file will be extended in future phases with workspace, billing, and AI schemas.
6
6
  */
7
7
  // Auth tables (Better-Auth managed)
8
- export * from "./auth";
8
+ export * from "./auth.js";
9
9
  // Organization/workspace tables (organization, member, invitation) are
10
10
  // defined in ./auth alongside users/sessions and created by the
11
11
  // migration chain like every other table; Better-Auth's organization
@@ -14,24 +14,24 @@ export * from "./auth";
14
14
  // auth.api.createInvitation(), …) rather than querying them directly, so
15
15
  // membership and role rules stay in one place.
16
16
  // Billing tables (Phase 11)
17
- export * from "./billing";
17
+ export * from "./billing.js";
18
18
  // Usage tracking tables (Phase 12)
19
- export * from "./usage";
19
+ export * from "./usage.js";
20
20
  // Notification tables (Phase 14)
21
- export * from "./notifications";
21
+ export * from "./notifications.js";
22
22
  // Feature flags (Phase 15)
23
- export * from "./feature-flags";
23
+ export * from "./feature-flags.js";
24
24
  // AI tables (Phase 16)
25
- export * from "./ai";
25
+ export * from "./ai.js";
26
26
  // Agents table (Phase 37)
27
- export * from "./agents";
27
+ export * from "./agents.js";
28
28
  // User Identity Graph (AI-ARCHITECTURE Phase B)
29
29
  // Four tables that back the cross-product memory system:
30
30
  // user_facts, user_memories, user_profile_snapshots, user_memory_audit.
31
- export * from "./identity";
31
+ export * from "./identity.js";
32
32
  // RAG documents table (AI-ARCHITECTURE Phase H)
33
33
  // Single shared table that backs every collection in
34
34
  // @intelligo-dev/agents/rag. Per-collection wrappers live in the
35
35
  // product packages.
36
- export * from "./rag";
36
+ export * from "./rag.js";
37
37
  //# sourceMappingURL=index.js.map
@@ -8,7 +8,7 @@
8
8
  * Pattern: snake_case columns in PostgreSQL, camelCase TypeScript API (via Drizzle mapping)
9
9
  */
10
10
  import { pgTable, text, timestamp, integer, real, index, unique, jsonb, } from "drizzle-orm/pg-core";
11
- import { organization, users } from "./auth";
11
+ import { organization, users } from "./auth.js";
12
12
  /**
13
13
  * Usage Records table - Per-request token tracking (QUOTA-05)
14
14
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Validates that the database is connected and tables exist before allowing the app to start.
5
5
  */
6
- import { db } from "./client";
6
+ import { db } from "./client.js";
7
7
  import { sql } from "drizzle-orm";
8
8
  /**
9
9
  * Check if database connection is valid and tables exist
@@ -7,8 +7,8 @@
7
7
  *
8
8
  * Use via subpath import: @intelligo-dev/core/documents
9
9
  */
10
- export { getUserDocuments, getDocument, saveDocument, deleteDocumentVersions, } from "./service";
11
- export { DocumentServiceError, isDocumentServiceError, type DocumentServiceErrorCode, } from "./errors";
12
- export type { DocumentActor, DocumentFilter, DocumentListItem } from "./types";
13
- export { registerDocumentPatterns, classifyDocumentTitle, isProductDocument, listRegisteredDocumentPatterns, clearDocumentPatternRegistry, type DocumentPatternEntry, } from "./classifier";
10
+ export { getUserDocuments, getDocument, saveDocument, deleteDocumentVersions, } from "./service.js";
11
+ export { DocumentServiceError, isDocumentServiceError, type DocumentServiceErrorCode, } from "./errors.js";
12
+ export type { DocumentActor, DocumentFilter, DocumentListItem } from "./types.js";
13
+ export { registerDocumentPatterns, classifyDocumentTitle, isProductDocument, listRegisteredDocumentPatterns, clearDocumentPatternRegistry, type DocumentPatternEntry, } from "./classifier.js";
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Use via subpath import: @intelligo-dev/core/documents
9
9
  */
10
- export { getUserDocuments, getDocument, saveDocument, deleteDocumentVersions, } from "./service";
11
- export { DocumentServiceError, isDocumentServiceError, } from "./errors";
12
- export { registerDocumentPatterns, classifyDocumentTitle, isProductDocument, listRegisteredDocumentPatterns, clearDocumentPatternRegistry, } from "./classifier";
10
+ export { getUserDocuments, getDocument, saveDocument, deleteDocumentVersions, } from "./service.js";
11
+ export { DocumentServiceError, isDocumentServiceError, } from "./errors.js";
12
+ export { registerDocumentPatterns, classifyDocumentTitle, isProductDocument, listRegisteredDocumentPatterns, clearDocumentPatternRegistry, } from "./classifier.js";
13
13
  //# sourceMappingURL=index.js.map
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This module is SERVER-ONLY. Do not import from client components.
24
24
  */
25
- import type { DocumentActor, DocumentFilter, DocumentListItem } from "./types";
25
+ import type { DocumentActor, DocumentFilter, DocumentListItem } from "./types.js";
26
26
  /**
27
27
  * Get all documents for the actor. Ordered by most recently created
28
28
  * first. Uses DISTINCT ON to get the latest version of each document.
@@ -23,10 +23,10 @@
23
23
  * This module is SERVER-ONLY. Do not import from client components.
24
24
  */
25
25
  import { and, desc, eq, gt } from "drizzle-orm";
26
- import { db } from "../db";
27
- import { documents } from "../db/schema";
28
- import { classifyDocumentTitle, isProductDocument } from "./classifier";
29
- import { DocumentServiceError } from "./errors";
26
+ import { db } from "../db/index.js";
27
+ import { documents } from "../db/schema/index.js";
28
+ import { classifyDocumentTitle, isProductDocument } from "./classifier.js";
29
+ import { DocumentServiceError } from "./errors.js";
30
30
  function toListItem(doc) {
31
31
  return {
32
32
  id: doc.id,
@@ -1,5 +1,5 @@
1
- export { sendEmail, type SendEmailParams, type SendEmailWithComponentParams, type SendEmailResult, } from "./send";
2
- export { getEmailProvider, resetEmailProviderCache, type EmailProvider, type EmailProviderName, type EmailSendParams, type EmailTemplateRef, ResendProvider, LoopsProvider, ConsoleProvider, } from "./provider";
3
- export * from "./templates";
4
- export * from "./senders";
1
+ export { sendEmail, type SendEmailParams, type SendEmailWithComponentParams, type SendEmailResult, } from "./send.js";
2
+ export { getEmailProvider, resetEmailProviderCache, type EmailProvider, type EmailProviderName, type EmailSendParams, type EmailTemplateRef, ResendProvider, LoopsProvider, ConsoleProvider, } from "./provider.js";
3
+ export * from "./templates/index.js";
4
+ export * from "./senders.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export { sendEmail, } from "./send";
2
- export { getEmailProvider, resetEmailProviderCache, ResendProvider, LoopsProvider, ConsoleProvider, } from "./provider";
3
- export * from "./templates";
4
- export * from "./senders";
1
+ export { sendEmail, } from "./send.js";
2
+ export { getEmailProvider, resetEmailProviderCache, ResendProvider, LoopsProvider, ConsoleProvider, } from "./provider.js";
3
+ export * from "./templates/index.js";
4
+ export * from "./senders.js";
5
5
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import type React from "react";
2
- import { type EmailTemplateRef } from "./provider";
2
+ import { type EmailTemplateRef } from "./provider.js";
3
3
  export interface SendEmailParams {
4
4
  to: string | string[];
5
5
  subject: string;
@@ -1,5 +1,5 @@
1
1
  import { render } from "@react-email/components";
2
- import { getEmailProvider } from "./provider";
2
+ import { getEmailProvider } from "./provider.js";
3
3
  const MAX_ATTEMPTS = 3;
4
4
  const BASE_DELAY_MS = 1000;
5
5
  /**
@@ -19,7 +19,7 @@
19
19
  * (quota-warning / quota-exceeded, trial-warning / trial-depleted) because
20
20
  * template providers branch per template, not per variable.
21
21
  */
22
- import { type SendEmailResult } from "./send";
22
+ import { type SendEmailResult } from "./send.js";
23
23
  /** Send welcome email after signup (EMAIL-03) */
24
24
  export declare function sendWelcomeEmail(params: {
25
25
  to: string;
@@ -20,8 +20,8 @@
20
20
  * template providers branch per template, not per variable.
21
21
  */
22
22
  import * as React from "react";
23
- import { sendEmail } from "./send";
24
- import { WelcomeEmail, VerifyEmailEmail, PasswordResetEmail, WorkspaceInvitationEmail, QuotaWarningEmail, TrialWarningEmail, TrialExpiryEmail, PaymentFailedEmail, SubscriptionConfirmedEmail, } from "./templates";
23
+ import { sendEmail } from "./send.js";
24
+ import { WelcomeEmail, VerifyEmailEmail, PasswordResetEmail, WorkspaceInvitationEmail, QuotaWarningEmail, TrialWarningEmail, TrialExpiryEmail, PaymentFailedEmail, SubscriptionConfirmedEmail, } from "./templates/index.js";
25
25
  // ---------------------------------------------------------------------------
26
26
  // Auth Emails
27
27
  // ---------------------------------------------------------------------------
@@ -1,11 +1,11 @@
1
- export { BaseLayout, type BaseLayoutProps } from "./base-layout";
2
- export { WelcomeEmail, type WelcomeEmailProps } from "./welcome";
3
- export { VerifyEmailEmail, type VerifyEmailEmailProps } from "./verify-email";
4
- export { PasswordResetEmail, type PasswordResetEmailProps, } from "./password-reset";
5
- export { WorkspaceInvitationEmail, type WorkspaceInvitationEmailProps, } from "./workspace-invitation";
6
- export { QuotaWarningEmail, type QuotaWarningEmailProps, } from "./quota-warning";
7
- export { TrialWarningEmail, type TrialWarningEmailProps, } from "./trial-warning";
8
- export { PaymentFailedEmail, type PaymentFailedEmailProps, } from "./payment-failed";
9
- export { SubscriptionConfirmedEmail, type SubscriptionConfirmedEmailProps, } from "./subscription-confirmed";
10
- export { TrialExpiryEmail, type TrialExpiryEmailProps } from "./trial-expiry";
1
+ export { BaseLayout, type BaseLayoutProps } from "./base-layout.js";
2
+ export { WelcomeEmail, type WelcomeEmailProps } from "./welcome.js";
3
+ export { VerifyEmailEmail, type VerifyEmailEmailProps } from "./verify-email.js";
4
+ export { PasswordResetEmail, type PasswordResetEmailProps, } from "./password-reset.js";
5
+ export { WorkspaceInvitationEmail, type WorkspaceInvitationEmailProps, } from "./workspace-invitation.js";
6
+ export { QuotaWarningEmail, type QuotaWarningEmailProps, } from "./quota-warning.js";
7
+ export { TrialWarningEmail, type TrialWarningEmailProps, } from "./trial-warning.js";
8
+ export { PaymentFailedEmail, type PaymentFailedEmailProps, } from "./payment-failed.js";
9
+ export { SubscriptionConfirmedEmail, type SubscriptionConfirmedEmailProps, } from "./subscription-confirmed.js";
10
+ export { TrialExpiryEmail, type TrialExpiryEmailProps } from "./trial-expiry.js";
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -4,14 +4,14 @@
4
4
  // All React Email templates with Intelligo branding. Each template wraps
5
5
  // content in BaseLayout for consistent styling.
6
6
  // ---------------------------------------------------------------------------
7
- export { BaseLayout } from "./base-layout";
8
- export { WelcomeEmail } from "./welcome";
9
- export { VerifyEmailEmail } from "./verify-email";
10
- export { PasswordResetEmail, } from "./password-reset";
11
- export { WorkspaceInvitationEmail, } from "./workspace-invitation";
12
- export { QuotaWarningEmail, } from "./quota-warning";
13
- export { TrialWarningEmail, } from "./trial-warning";
14
- export { PaymentFailedEmail, } from "./payment-failed";
15
- export { SubscriptionConfirmedEmail, } from "./subscription-confirmed";
16
- export { TrialExpiryEmail } from "./trial-expiry";
7
+ export { BaseLayout } from "./base-layout.js";
8
+ export { WelcomeEmail } from "./welcome.js";
9
+ export { VerifyEmailEmail } from "./verify-email.js";
10
+ export { PasswordResetEmail, } from "./password-reset.js";
11
+ export { WorkspaceInvitationEmail, } from "./workspace-invitation.js";
12
+ export { QuotaWarningEmail, } from "./quota-warning.js";
13
+ export { TrialWarningEmail, } from "./trial-warning.js";
14
+ export { PaymentFailedEmail, } from "./payment-failed.js";
15
+ export { SubscriptionConfirmedEmail, } from "./subscription-confirmed.js";
16
+ export { TrialExpiryEmail } from "./trial-expiry.js";
17
17
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function PasswordResetEmail({ userName, resetUrl, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function PaymentFailedEmail({ workspaceName, amount, updatePaymentUrl, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function QuotaWarningEmail({ workspaceName, percentageUsed, tokensUsed, tokensLimit, upgradeUrl, isExceeded, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function SubscriptionConfirmedEmail({ workspaceName, planName, amount, dashboardUrl, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function TrialExpiryEmail({ workspaceName, expiryDate, daysRemaining, upgradeUrl, locale = "en", }) {
5
5
  const isExpired = daysRemaining <= 0;
6
6
  const isUrgent = daysRemaining <= 1 && daysRemaining > 0;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function TrialWarningEmail({ workspaceName, creditsRemaining, totalCredits, percentageRemaining, upgradeUrl, isDepleted, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function VerifyEmailEmail({ userName, verificationUrl, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function WelcomeEmail({ userName, dashboardUrl, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Section, Text } from "@react-email/components";
3
- import { BaseLayout } from "./base-layout";
3
+ import { BaseLayout } from "./base-layout.js";
4
4
  export function WorkspaceInvitationEmail({ inviterName, workspaceName, role, acceptUrl, declineUrl, locale = "en", }) {
5
5
  const text = locale === "mn"
6
6
  ? {
@@ -22,7 +22,7 @@
22
22
  * Not re-exported from `./index.ts`: it is this module's own
23
23
  * implementation detail, not identity's public API.
24
24
  */
25
- import type { AuditTargetKind, AuditAction, AuditActorKind, UserMemoryAuditRow } from "../db/schema";
25
+ import type { AuditTargetKind, AuditAction, AuditActorKind, UserMemoryAuditRow } from "../db/schema/index.js";
26
26
  export type RecordMemoryAuditInput = {
27
27
  userId: string;
28
28
  workspaceId: string;
@@ -22,9 +22,9 @@
22
22
  * Not re-exported from `./index.ts`: it is this module's own
23
23
  * implementation detail, not identity's public API.
24
24
  */
25
- import { db } from "../db";
26
- import { userMemoryAudit } from "../db/schema";
27
- import { IdentityServiceError } from "./errors";
25
+ import { db } from "../db/index.js";
26
+ import { userMemoryAudit } from "../db/schema/index.js";
27
+ import { IdentityServiceError } from "./errors.js";
28
28
  export async function recordMemoryAudit(input) {
29
29
  const [row] = await db
30
30
  .insert(userMemoryAudit)
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * Use via subpath import: @intelligo-dev/core/identity
12
12
  */
13
- export { listFacts, deleteFact, exportIdentity, getAuditTrail, } from "./service";
14
- export { IdentityServiceError, isIdentityServiceError, type IdentityServiceErrorCode, } from "./errors";
15
- export type { IdentityActor, IdentityExport, UserFact, UserMemory, UserProfileSnapshot, UserMemoryAuditRow, } from "./types";
13
+ export { listFacts, deleteFact, exportIdentity, getAuditTrail, } from "./service.js";
14
+ export { IdentityServiceError, isIdentityServiceError, type IdentityServiceErrorCode, } from "./errors.js";
15
+ export type { IdentityActor, IdentityExport, UserFact, UserMemory, UserProfileSnapshot, UserMemoryAuditRow, } from "./types.js";
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -10,6 +10,6 @@
10
10
  *
11
11
  * Use via subpath import: @intelligo-dev/core/identity
12
12
  */
13
- export { listFacts, deleteFact, exportIdentity, getAuditTrail, } from "./service";
14
- export { IdentityServiceError, isIdentityServiceError, } from "./errors";
13
+ export { listFacts, deleteFact, exportIdentity, getAuditTrail, } from "./service.js";
14
+ export { IdentityServiceError, isIdentityServiceError, } from "./errors.js";
15
15
  //# sourceMappingURL=index.js.map
@@ -41,8 +41,8 @@
41
41
  *
42
42
  * This module is SERVER-ONLY. Do not import from client components.
43
43
  */
44
- import type { UserFact, UserMemoryAuditRow } from "../db/schema";
45
- import type { IdentityActor, IdentityExport } from "./types";
44
+ import type { UserFact, UserMemoryAuditRow } from "../db/schema/index.js";
45
+ import type { IdentityActor, IdentityExport } from "./types.js";
46
46
  /** List the actor's facts, most important and most confident first. */
47
47
  export declare function listFacts(actor: IdentityActor): Promise<UserFact[]>;
48
48
  /**
@@ -42,10 +42,10 @@
42
42
  * This module is SERVER-ONLY. Do not import from client components.
43
43
  */
44
44
  import { and, desc, eq } from "drizzle-orm";
45
- import { db } from "../db";
46
- import { userFacts, userMemories, userProfileSnapshots, userMemoryAudit, } from "../db/schema";
47
- import { recordMemoryAudit } from "./audit";
48
- import { IdentityServiceError } from "./errors";
45
+ import { db } from "../db/index.js";
46
+ import { userFacts, userMemories, userProfileSnapshots, userMemoryAudit, } from "../db/schema/index.js";
47
+ import { recordMemoryAudit } from "./audit.js";
48
+ import { IdentityServiceError } from "./errors.js";
49
49
  // ---------------------------------------------------------------------------
50
50
  // Internal helpers
51
51
  // ---------------------------------------------------------------------------
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Shared types for the identity service.
3
3
  */
4
- import type { UserFact, UserMemory, UserProfileSnapshot, UserMemoryAuditRow } from "../db/schema";
4
+ import type { UserFact, UserMemory, UserProfileSnapshot, UserMemoryAuditRow } from "../db/schema/index.js";
5
5
  export type { UserFact, UserMemory, UserProfileSnapshot, UserMemoryAuditRow };
6
6
  /** Resolved actor identity — every query is scoped to this pair. */
7
7
  export type IdentityActor = {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export declare const version = "0.0.0";
2
- export * from "./db";
2
+ export * from "./db/index.js";
3
3
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const version = "0.0.0";
2
2
  // Re-export database client
3
- export * from "./db";
3
+ export * from "./db/index.js";
4
4
  // Email module -- use subpath import: @intelligo-dev/core/email
5
5
  // Notifications module -- use subpath import: @intelligo-dev/core/notifications
6
6
  // Conversations module -- use subpath import: @intelligo-dev/core/conversations
@@ -8,9 +8,9 @@
8
8
  * Notifications are user-scoped (not workspace-scoped) so a user can see
9
9
  * all their notifications across workspaces.
10
10
  */
11
- import type { CreateNotificationParams } from "./types";
12
- export type { NotificationType, CreateNotificationParams } from "./types";
13
- export { triggerQuotaNotification, triggerTrialNotification, triggerPaymentFailedNotification, triggerTeamMemberJoinedNotification, } from "./triggers";
11
+ import type { CreateNotificationParams } from "./types.js";
12
+ export type { NotificationType, CreateNotificationParams } from "./types.js";
13
+ export { triggerQuotaNotification, triggerTrialNotification, triggerPaymentFailedNotification, triggerTeamMemberJoinedNotification, } from "./triggers.js";
14
14
  /**
15
15
  * Create a new notification for a user
16
16
  *
@@ -8,11 +8,11 @@
8
8
  * Notifications are user-scoped (not workspace-scoped) so a user can see
9
9
  * all their notifications across workspaces.
10
10
  */
11
- import { db } from "../db";
12
- import { notifications } from "../db/schema";
11
+ import { db } from "../db/index.js";
12
+ import { notifications } from "../db/schema/index.js";
13
13
  import { eq, and, desc, count } from "drizzle-orm";
14
14
  // Re-export trigger functions
15
- export { triggerQuotaNotification, triggerTrialNotification, triggerPaymentFailedNotification, triggerTeamMemberJoinedNotification, } from "./triggers";
15
+ export { triggerQuotaNotification, triggerTrialNotification, triggerPaymentFailedNotification, triggerTeamMemberJoinedNotification, } from "./triggers.js";
16
16
  /**
17
17
  * Create a new notification for a user
18
18
  *
@@ -16,8 +16,8 @@
16
16
  * - Payment failed trigger is called by billing email triggers
17
17
  * - Team member joined trigger is called by server actions
18
18
  */
19
- import { createNotification } from "./index";
20
- import { sendQuotaWarningEmail, sendTrialWarningEmail, sendPaymentFailedEmail, } from "../email/senders";
19
+ import { createNotification } from "./index.js";
20
+ import { sendQuotaWarningEmail, sendTrialWarningEmail, sendPaymentFailedEmail, } from "../email/senders.js";
21
21
  // ---------------------------------------------------------------------------
22
22
  // Quota Notifications (QUOTA-08, QUOTA-09)
23
23
  // ---------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intelligo-dev/core",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -96,6 +96,6 @@
96
96
  "db:studio": "drizzle-kit studio",
97
97
  "db:push": "drizzle-kit push",
98
98
  "db:check": "tsx scripts/check-db.ts",
99
- "build": "tsc -p tsconfig.build.json"
99
+ "build": "tsc -p tsconfig.build.json && node ../../scripts/fix-esm-extensions.mjs dist"
100
100
  }
101
101
  }