@happyvertical/smrt-projects 0.41.0 → 0.42.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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-projects",
5
- "packageVersion": "0.41.0",
5
+ "packageVersion": "0.42.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-projects:DevelopmentRequestHistoryCollection": {
8
8
  "name": "developmentrequesthistorycollection",
@@ -3,13 +3,13 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-projects",
6
- "packageVersion": "0.41.0",
6
+ "packageVersion": "0.42.0",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "972016cf4af90a3f972993a944bac1620cfca20fcf28d7729e50774ad8007485",
11
- "packageJson": "1f241101ce11df6af493f06d501329fcd88445606ad864981f555ef8808211b4",
12
- "agents": "d7be7e278e0907430f329e3389847f7e83163bf45dee6c919bce60aea119eecc"
10
+ "manifest": "7b5fae39800d200455a94eaa76b910590196d320d2be43cfbff550ce0584c7cc",
11
+ "packageJson": "0dedc435816e833edd71ce4e0d1cd91b7e5dfd391622e3eb19fff2e71d6a444d",
12
+ "agents": "1642532c0c1bf16fb07b0184326f76f9fb3b142cb111e39f8e763c2d08be40d3"
13
13
  },
14
14
  "exports": [
15
15
  ".",
@@ -5507,5 +5507,5 @@
5507
5507
  "polymorphicAssociations": 0,
5508
5508
  "uuidColumns": 73
5509
5509
  },
5510
- "agentDoc": "# @happyvertical/smrt-projects\n\nProvider-agnostic project management plus the managed-application delivery\ncontrol plane. Repository and board providers remain canonical; managed apps\nonly receive scoped Project Integration credentials and provider-neutral\nrequest/delivery projections.\n\n## Managed application delivery (#1949)\n\n- `ProjectIntegration` stores capability grants and a sensitive credential\n hash; the raw credential is returned once by\n `ProjectIntegrationCollection.provision()`/`rotate()` and is never persisted.\n Provisioning, rotation, and revocation are append-only audited.\n- The stable requester identity is supplied when authenticating\n `ManagedProjectClient`; request reads are always restricted to that requester\n and integration.\n- `DevelopmentRequest` preserves evidence, origin, discussion, visibility, and\n lifecycle history. `ManagedProjectClient` owns managed intake and\n `DevelopmentRequestService` adds internal triage and work projection.\n- `DevelopmentRequestWorkLink` connects zero-to-many provider-neutral work\n items. Canonical status stays on the link and drives request lifecycle\n projection without granting the managed app provider credentials.\n- `ProjectDeliveryEvent` is idempotent per integration key and sequenced for\n replay. Preview decisions flow through the control-plane adapter, never\n directly to repository providers.\n- `AssistanceRequest` preserves conversational intake before lossless routing\n to Support, Development, or both. `smrt-support` supplies the concrete\n `ProjectAssistanceSupportAdapter`.\n- `ManagedProjectClient` deliberately exposes no repository or board client;\n delivery and assistance use separate capability-gated service facades.\n\n## Shared Professional Service evidence (#1955)\n\n`ServiceTimeEntry` is canonical here on the existing `service_time_entries`\ntable. Planning, development, and support use the same immutable evidence and\ncorrection chain. `SubscriptionServiceCommercialResolver` prices client work\nthrough `smrt-subscriptions` (#1925); provider compensation remains a separate\nresolver and snapshot. See `SERVICE_TIME_MIGRATION.md`.\n\n## Models\n\n| Model | Key Fields | Notes |\n|-------|-----------|-------|\n| **Repository** | `owner`, `name`, `providerType`, `tokenConfigKey` | `sync()`, `getIssues()`, `getPullRequests()` |\n| **Issue** | `repositoryId` (FK), `number`, `title`, `body`, `state`, `labels[]` | `incorporateFeedback()`, `rollback()`, `suggestLabels()` |\n| **PullRequest** | extends Issue + `headRef`, `baseRef`, `merged`, `draft` | STI on Issue table. `summarize()`, `merge()` |\n| **Project** | `projectId`, `title`, `statuses[]`, `statusFieldId` | GitHub Projects V2. `addItem()`, `moveItem()`, `analyzeHealth()` |\n| **Comment** | `issueId` (FK), `body`, `authorLogin` | AI analysis support |\n| **Label** | `repositoryId` (FK), `name`, `color` | |\n\n## Key Patterns\n\n- **Token config reference**: stores env var name (`tokenConfigKey: 'GITHUB_TOKEN'`), not the token itself. Resolved at runtime from `process.env` or `getModuleConfig()`\n- **Living spec** (`incorporateFeedback()`): AI synthesizes issue comments into updated body. Supports preview mode and `rollback()`\n- **Provider-agnostic**: GitHub primary, GitLab/Bitbucket/Azure planned. Uses `@happyvertical/repos` and `@happyvertical/projects` SDK packages\n- **PullRequest is STI on Issue**: shares table, discriminated by `_meta_type`\n\n## Collection Methods\n\nAll collections provide: `discover({ repository, filters })`, `findByRepository(repoId)`, `findOpen(repoId?)`, `batchSync(repository)`.\n\n## Gotchas\n\n- **Money is integer minor units** (cents) — `$19.99` is `1999`.\n `ServiceChargeSnapshot.amount` and `ServiceCompensationSnapshot.amount`\n initialize `= 0`, never `= 0.0`: the integer literal is what maps them to\n INTEGER columns (#2401). The two convert as a pair — the delivery margin is\n `charge - compensation`, an exact integer subtraction with no tolerance —\n and both are fed verbatim by `CommercialSnapshot.amount`, so a resolver that\n returns major units corrupts the snapshot silently on SQLite and fails with\n `22P02` on PostgreSQL. `pnpm --filter @happyvertical/smrt-projects\n test:postgres` is the lane that holds the line.\n- **UI formats by dividing, never by `toFixed`**: `formatCurrency()` and\n `ServiceEvidenceList`'s `money()` scale back to major units using the\n currency's own minor-unit exponent, so zero-decimal currencies (JPY, KRW) are\n not divided.\n- **Migrating an existing database**: `preflightProjectsMoneyMinorUnits(db)`\n reports which columns still hold major units and which rows would be rounded\n or overflow `int4`; `migrateProjectsMoneyToMinorUnits(db)` converts them\n (idempotent via `_smrt_backfills`). On SQLite the values are rescaled but the\n declared type needs the table-rebuild path (#2370). The `int4` ceiling is\n ~2.1e9 minor units (~$21.4M) per column; BIGINT is parked in #2373.\n- **SDK dependency**: requires `@happyvertical/repos` and `@happyvertical/projects` from SDK\n- **tokenConfigKey not tokenValue**: never store actual tokens in the database\n- **synthesisCount tracks incorporateFeedback calls**: incremented on each apply\n"
5510
+ "agentDoc": "# @happyvertical/smrt-projects\n\nProvider-agnostic project management plus the managed-application delivery\ncontrol plane. Repository and board providers remain canonical; managed apps\nonly receive scoped Project Integration credentials and provider-neutral\nrequest/delivery projections.\n\n## Managed application delivery (#1949)\n\n- `ProjectIntegration` stores capability grants and a sensitive credential\n hash; the raw credential is returned once by\n `ProjectIntegrationCollection.provision()`/`rotate()` and is never persisted.\n Provisioning, rotation, and revocation are append-only audited.\n- The stable requester identity is supplied when authenticating\n `ManagedProjectClient`; request reads are always restricted to that requester\n and integration.\n- `DevelopmentRequest` preserves evidence, origin, discussion, visibility, and\n lifecycle history. `ManagedProjectClient` owns managed intake and\n `DevelopmentRequestService` adds internal triage and work projection.\n- `DevelopmentRequestWorkLink` connects zero-to-many provider-neutral work\n items. Canonical status stays on the link and drives request lifecycle\n projection without granting the managed app provider credentials.\n- `ProjectDeliveryEvent` is idempotent per integration key and sequenced for\n replay. Preview decisions flow through the control-plane adapter, never\n directly to repository providers.\n- `AssistanceRequest` preserves conversational intake before lossless routing\n to Support, Development, or both. `smrt-support` supplies the concrete\n `ProjectAssistanceSupportAdapter`.\n- `ManagedProjectClient` deliberately exposes no repository or board client;\n delivery and assistance use separate capability-gated service facades.\n\n## Shared Professional Service evidence (#1955)\n\n`ServiceTimeEntry` is canonical here on the existing `service_time_entries`\ntable. Planning, development, and support use the same immutable evidence and\ncorrection chain. `SubscriptionServiceCommercialResolver` prices client work\nthrough `smrt-subscriptions` (#1925); provider compensation remains a separate\nresolver and snapshot. See `SERVICE_TIME_MIGRATION.md`.\n\n## Models\n\n| Model | Key Fields | Notes |\n|-------|-----------|-------|\n| **Repository** | `owner`, `name`, `providerType`, `tokenConfigKey` | `sync()`, `getIssues()`, `getPullRequests()` |\n| **Issue** | `repositoryId` (FK), `number`, `title`, `body`, `state`, `labels[]` | `incorporateFeedback()`, `rollback()`, `suggestLabels()` |\n| **PullRequest** | extends Issue + `headRef`, `baseRef`, `merged`, `draft` | STI on Issue table. `summarize()`, `merge()` |\n| **Project** | `projectId`, `title`, `statuses[]`, `statusFieldId` | GitHub Projects V2. `addItem()`, `moveItem()`, `analyzeHealth()` |\n| **Comment** | `issueId` (FK), `body`, `authorLogin` | AI analysis support |\n| **Label** | `repositoryId` (FK), `name`, `color` | |\n\n## Key Patterns\n\n- **Token config reference**: stores env var name (`tokenConfigKey: 'GITHUB_TOKEN'`), not the token itself. Resolved at runtime from `process.env` or `getModuleConfig()`\n- **Living spec** (`incorporateFeedback()`): AI synthesizes issue comments into updated body. Supports preview mode and `rollback()`\n- **Provider-agnostic**: GitHub primary, GitLab/Bitbucket/Azure planned. Uses `@happyvertical/repos` and `@happyvertical/projects` SDK packages\n- **PullRequest is STI on Issue**: shares table, discriminated by `_meta_type`\n\n## Collection Methods\n\nAll collections provide: `discover({ repository, filters })`, `findByRepository(repoId)`, `findOpen(repoId?)`, `batchSync(repository)`.\n\n## Gotchas\n\n- **Money is integer minor units** (cents) — `$19.99` is `1999`.\n `ServiceChargeSnapshot.amount` and `ServiceCompensationSnapshot.amount`\n initialize `= 0`, never `= 0.0`: the integer literal is what maps them to\n INTEGER columns (BIGINT on fresh PostgreSQL/DuckDB databases; #2401, #2373). The two convert as a pair — the delivery margin is\n `charge - compensation`, an exact integer subtraction with no tolerance —\n and both are fed verbatim by `CommercialSnapshot.amount`, so a resolver that\n returns major units corrupts the snapshot silently on SQLite and fails with\n `22P02` on PostgreSQL. `pnpm --filter @happyvertical/smrt-projects\n test:postgres` is the lane that holds the line.\n- **UI formats by dividing, never by `toFixed`**: `formatCurrency()` and\n `ServiceEvidenceList`'s `money()` scale back to major units using the\n currency's own minor-unit exponent, so zero-decimal currencies (JPY, KRW) are\n not divided.\n- **Migrating an existing database**: `preflightProjectsMoneyMinorUnits(db)`\n reports which columns still hold major units and which rows would be rounded\n or exceed JavaScript's safe-integer range; `migrateProjectsMoneyToMinorUnits(db)` converts them\n (idempotent via `_smrt_backfills`). On SQLite the values are rescaled but the\n declared type needs the table-rebuild path (#2370). Fresh PostgreSQL/DuckDB\n INTEGER columns are BIGINT and hydration rejects values outside JavaScript's\n safe-integer range; existing PostgreSQL `int4` columns require #2424.\n- **SDK dependency**: requires `@happyvertical/repos` and `@happyvertical/projects` from SDK\n- **tokenConfigKey not tokenValue**: never store actual tokens in the database\n- **synthesisCount tracks incorporateFeedback calls**: incremented on each apply\n"
5511
5511
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-projects",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "Provider-agnostic project management models (Issues, PRs, Repositories, Projects) for SMRT framework",
5
5
  "type": "module",
6
6
  "smrtRawPrimitives": "strict",
@@ -40,14 +40,14 @@
40
40
  "@happyvertical/repos": "^0.88.0",
41
41
  "@happyvertical/sql": "^0.88.0",
42
42
  "@happyvertical/utils": "^0.88.0",
43
- "@happyvertical/smrt-config": "0.41.0",
44
- "@happyvertical/smrt-core": "0.41.0",
45
- "@happyvertical/smrt-svelte": "0.41.0",
46
- "@happyvertical/smrt-prompts": "0.41.0",
47
- "@happyvertical/smrt-subscriptions": "0.41.0",
48
- "@happyvertical/smrt-tenancy": "0.41.0",
49
- "@happyvertical/smrt-types": "0.41.0",
50
- "@happyvertical/smrt-ui": "0.41.0"
43
+ "@happyvertical/smrt-core": "0.42.0",
44
+ "@happyvertical/smrt-prompts": "0.42.0",
45
+ "@happyvertical/smrt-svelte": "0.42.0",
46
+ "@happyvertical/smrt-subscriptions": "0.42.0",
47
+ "@happyvertical/smrt-config": "0.42.0",
48
+ "@happyvertical/smrt-tenancy": "0.42.0",
49
+ "@happyvertical/smrt-types": "0.42.0",
50
+ "@happyvertical/smrt-ui": "0.42.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "svelte": "^5.56.4"
@@ -67,8 +67,8 @@
67
67
  "typescript": "5.9.3",
68
68
  "vite": "8.1.4",
69
69
  "vitest": "4.1.10",
70
- "@happyvertical/smrt-cli": "0.41.0",
71
- "@happyvertical/smrt-vitest": "0.41.0"
70
+ "@happyvertical/smrt-vitest": "0.42.0",
71
+ "@happyvertical/smrt-cli": "0.42.0"
72
72
  },
73
73
  "keywords": [
74
74
  "ai",