@synapsor/runner 1.6.3 → 1.6.5
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/AGENTS.md +2 -2
- package/CHANGELOG.md +94 -8
- package/CONTRIBUTING.md +10 -3
- package/README.md +90 -109
- package/SECURITY.md +7 -3
- package/THREAT_MODEL.md +37 -0
- package/dist/authoring.mjs +98 -13
- package/dist/cli.d.ts +12 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts +60 -0
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +7688 -2227
- package/dist/runtime.mjs +528 -51
- package/docs/README.md +14 -0
- package/docs/agent-guided-setup.md +13 -11
- package/docs/aggregate-reads.md +14 -5
- package/docs/app-owned-executors.md +5 -6
- package/docs/auto-boundary-and-scoped-explore.md +70 -14
- package/docs/capability-authoring.md +2 -2
- package/docs/client-recipes.md +41 -12
- package/docs/cloud-mode.md +7 -7
- package/docs/conformance.md +6 -3
- package/docs/current-scope.md +13 -2
- package/docs/cursor-plugin.md +3 -3
- package/docs/database-enforced-scope.md +6 -0
- package/docs/dsl-reference.md +12 -1
- package/docs/fresh-developer-usability.md +6 -6
- package/docs/getting-started-own-database.md +52 -50
- package/docs/guided-onboarding.md +104 -34
- package/docs/host-compatibility.md +24 -11
- package/docs/limitations.md +34 -14
- package/docs/local-mode.md +20 -20
- package/docs/mcp-audit.md +14 -14
- package/docs/mcp-client-setup.md +26 -14
- package/docs/mcp-clients.md +47 -11
- package/docs/migrating-to-synapsor-spec.md +5 -1
- package/docs/openai-agents-sdk.md +2 -2
- package/docs/proposal-evidence-freshness.md +7 -7
- package/docs/recipes.md +6 -6
- package/docs/release-notes.md +100 -10
- package/docs/release-policy.md +20 -7
- package/docs/reversible-change-sets.md +1 -1
- package/docs/reviewed-database-views.md +132 -0
- package/docs/reviewed-relationships.md +245 -0
- package/docs/rfcs/006-reviewed-reversible-change-sets.md +1 -1
- package/docs/runner-bundles.md +7 -7
- package/docs/schema-api-candidates.md +1 -1
- package/docs/security-boundary.md +30 -0
- package/docs/troubleshooting-first-run.md +63 -19
- package/docs/use-your-own-database.md +6 -4
- package/docs/workbench-ask.md +279 -0
- package/docs/writeback-executors.md +7 -7
- package/examples/auto-boundary-churn/README.md +1 -1
- package/examples/community-solar-clean-room/README.md +7 -0
- package/examples/community-solar-clean-room/docker-compose.yml +16 -0
- package/examples/community-solar-clean-room/package.json +15 -0
- package/examples/community-solar-clean-room/prisma/schema.prisma +171 -0
- package/examples/community-solar-clean-room/seed/postgres.sql +571 -0
- package/examples/fitflow-guided-onboarding/README.md +2 -2
- package/examples/openai-agents-http/Makefile +1 -1
- package/examples/openai-agents-http/README.md +1 -1
- package/examples/openai-agents-stdio/Makefile +1 -1
- package/examples/openai-agents-stdio/README.md +2 -2
- package/examples/openai-agents-stdio/agent.py +1 -4
- package/examples/reference-support-billing-app/README.md +16 -16
- package/examples/retail-clean-room/README.md +7 -0
- package/examples/retail-clean-room/docker-compose.yml +16 -0
- package/examples/retail-clean-room/package.json +9 -0
- package/examples/retail-clean-room/prisma/schema.prisma +239 -0
- package/examples/retail-clean-room/seed/postgres.sql +781 -0
- package/examples/retail-clean-room/view-recipe/average-retained-revenue.synapsor.sql +21 -0
- package/examples/retail-clean-room/view-recipe/synapsor.runner.json +25 -0
- package/examples/support-plan-credit/mcp-client-examples/claude-code.sh +1 -4
- package/examples/support-plan-credit/mcp-client-examples/claude-desktop.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/codex.config.toml +1 -4
- package/examples/support-plan-credit/mcp-client-examples/cursor-global.mcp.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/cursor-project.mcp.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/generic-stdio.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/generic-stdio.mjs +1 -1
- package/examples/support-plan-credit/mcp-client-examples/google-adk.py +1 -1
- package/examples/support-plan-credit/mcp-client-examples/langchain.mjs +1 -1
- package/examples/support-plan-credit/mcp-client-examples/llamaindex.py +1 -1
- package/examples/support-plan-credit/mcp-client-examples/openai-agents-stdio.ts +1 -1
- package/examples/support-plan-credit/mcp-client-examples/vscode.mcp.json +1 -4
- package/fixtures/compatibility/published-1.6.3/manifest.json +76 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/aggregate-read.synapsor.sql +21 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/billing-late-fee.synapsor.sql +56 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/bounded-set-multi-term.synapsor.sql +30 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/principal-row-scope.synapsor.sql +23 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/aggregate-read/contract.json +119 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/approval-quorum/contract.json +44 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/bounded-set-threats/contract.json +115 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/principal-row-scope/contract.json +78 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/proposal-capability/contract.json +101 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/reversible-change-sets/contract.json +98 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/valid/basic-read.contract.json +60 -0
- package/llms.txt +10 -5
- package/package.json +9 -2
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client-js"
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
datasource db {
|
|
6
|
+
provider = "postgresql"
|
|
7
|
+
url = env("DATABASE_URL")
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
model Cooperative {
|
|
11
|
+
id String @id
|
|
12
|
+
name String
|
|
13
|
+
regions Region[]
|
|
14
|
+
teams TechnicianTeam[]
|
|
15
|
+
technicians Technician[]
|
|
16
|
+
sites SolarSite[]
|
|
17
|
+
models InverterModel[]
|
|
18
|
+
workOrders WorkOrder[]
|
|
19
|
+
incidents Incident[]
|
|
20
|
+
|
|
21
|
+
@@map("cooperatives")
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
model Region {
|
|
25
|
+
id String @id
|
|
26
|
+
cooperativeId String @map("cooperative_id")
|
|
27
|
+
name String
|
|
28
|
+
climateZone String @map("climate_zone")
|
|
29
|
+
cooperative Cooperative @relation(fields: [cooperativeId], references: [id])
|
|
30
|
+
sites SolarSite[]
|
|
31
|
+
workOrders WorkOrder[]
|
|
32
|
+
incidents Incident[]
|
|
33
|
+
|
|
34
|
+
@@unique([cooperativeId, name])
|
|
35
|
+
@@map("regions")
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
model TechnicianTeam {
|
|
39
|
+
id String @id
|
|
40
|
+
cooperativeId String @map("cooperative_id")
|
|
41
|
+
name String
|
|
42
|
+
cooperative Cooperative @relation(fields: [cooperativeId], references: [id])
|
|
43
|
+
technicians Technician[]
|
|
44
|
+
workOrders WorkOrder[]
|
|
45
|
+
|
|
46
|
+
@@unique([cooperativeId, name])
|
|
47
|
+
@@map("technician_teams")
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
model Technician {
|
|
51
|
+
id String @id
|
|
52
|
+
cooperativeId String @map("cooperative_id")
|
|
53
|
+
teamId String @map("team_id")
|
|
54
|
+
displayName String @map("display_name")
|
|
55
|
+
privateNotes String @map("private_technician_notes")
|
|
56
|
+
cooperative Cooperative @relation(fields: [cooperativeId], references: [id])
|
|
57
|
+
team TechnicianTeam @relation(fields: [teamId], references: [id])
|
|
58
|
+
workOrders WorkOrder[]
|
|
59
|
+
|
|
60
|
+
@@map("technicians")
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
model SolarSite {
|
|
64
|
+
id String @id
|
|
65
|
+
cooperativeId String @map("cooperative_id")
|
|
66
|
+
regionId String @map("region_id")
|
|
67
|
+
name String
|
|
68
|
+
siteGroup String @map("site_group")
|
|
69
|
+
cooperative Cooperative @relation(fields: [cooperativeId], references: [id])
|
|
70
|
+
region Region @relation(fields: [regionId], references: [id])
|
|
71
|
+
inverters Inverter[]
|
|
72
|
+
workOrders WorkOrder[]
|
|
73
|
+
incidents Incident[]
|
|
74
|
+
|
|
75
|
+
@@unique([cooperativeId, name])
|
|
76
|
+
@@map("solar_sites")
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
model InverterModel {
|
|
80
|
+
id String @id
|
|
81
|
+
cooperativeId String @map("cooperative_id")
|
|
82
|
+
manufacturer String
|
|
83
|
+
modelName String @map("model_name")
|
|
84
|
+
cooperative Cooperative @relation(fields: [cooperativeId], references: [id])
|
|
85
|
+
inverters Inverter[]
|
|
86
|
+
workOrders WorkOrder[]
|
|
87
|
+
incidents Incident[]
|
|
88
|
+
|
|
89
|
+
@@unique([cooperativeId, manufacturer, modelName])
|
|
90
|
+
@@map("inverter_models")
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
model Inverter {
|
|
94
|
+
id String @id
|
|
95
|
+
cooperativeId String @map("cooperative_id")
|
|
96
|
+
siteId String @map("site_id")
|
|
97
|
+
inverterModelId String @map("inverter_model_id")
|
|
98
|
+
serialNumber String @map("serial_number")
|
|
99
|
+
accessToken String @map("access_token")
|
|
100
|
+
panelPosition String @map("panel_position")
|
|
101
|
+
site SolarSite @relation(fields: [siteId], references: [id])
|
|
102
|
+
model InverterModel @relation(fields: [inverterModelId], references: [id])
|
|
103
|
+
|
|
104
|
+
@@unique([cooperativeId, serialNumber])
|
|
105
|
+
@@map("inverters")
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
model FaultCategory {
|
|
109
|
+
id String @id
|
|
110
|
+
cooperativeId String @map("cooperative_id")
|
|
111
|
+
name String
|
|
112
|
+
severity String
|
|
113
|
+
incidents Incident[]
|
|
114
|
+
workOrders WorkOrder[]
|
|
115
|
+
|
|
116
|
+
@@unique([cooperativeId, name])
|
|
117
|
+
@@map("fault_categories")
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
model WorkOrder {
|
|
121
|
+
id String @id
|
|
122
|
+
cooperativeId String @map("cooperative_id")
|
|
123
|
+
siteId String @map("site_id")
|
|
124
|
+
regionId String @map("region_id")
|
|
125
|
+
inverterModelId String @map("inverter_model_id")
|
|
126
|
+
faultCategoryId String @map("fault_category_id")
|
|
127
|
+
assignedTechnicianId String @map("assigned_technician_id")
|
|
128
|
+
technicianTeamId String @map("technician_team_id")
|
|
129
|
+
status String
|
|
130
|
+
openedAt DateTime @map("opened_at") @db.Timestamptz(6)
|
|
131
|
+
completedAt DateTime? @map("completed_at") @db.Timestamptz(6)
|
|
132
|
+
downtimeMinutes Int @map("downtime_minutes")
|
|
133
|
+
repairDurationMinutes Int @map("repair_duration_minutes")
|
|
134
|
+
estimatedEnergyLossWh Int @map("estimated_energy_loss_wh")
|
|
135
|
+
lostRevenueCents Int @map("lost_revenue_cents")
|
|
136
|
+
inspectionFailed Boolean @map("inspection_failed")
|
|
137
|
+
version Int
|
|
138
|
+
privateTechnicianNotes String @map("private_technician_notes")
|
|
139
|
+
cooperative Cooperative @relation(fields: [cooperativeId], references: [id])
|
|
140
|
+
site SolarSite @relation(fields: [siteId], references: [id])
|
|
141
|
+
region Region @relation(fields: [regionId], references: [id])
|
|
142
|
+
inverterModel InverterModel @relation(fields: [inverterModelId], references: [id])
|
|
143
|
+
faultCategory FaultCategory @relation(fields: [faultCategoryId], references: [id])
|
|
144
|
+
assignedTechnician Technician @relation(fields: [assignedTechnicianId], references: [id])
|
|
145
|
+
technicianTeam TechnicianTeam @relation(fields: [technicianTeamId], references: [id])
|
|
146
|
+
|
|
147
|
+
@@index([cooperativeId, assignedTechnicianId, openedAt])
|
|
148
|
+
@@map("work_orders")
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
model Incident {
|
|
152
|
+
id String @id
|
|
153
|
+
cooperativeId String @map("cooperative_id")
|
|
154
|
+
siteId String @map("site_id")
|
|
155
|
+
regionId String @map("region_id")
|
|
156
|
+
inverterModelId String @map("inverter_model_id")
|
|
157
|
+
faultCategoryId String @map("fault_category_id")
|
|
158
|
+
status String
|
|
159
|
+
occurredAt DateTime @map("occurred_at") @db.Timestamptz(6)
|
|
160
|
+
resolvedAt DateTime? @map("resolved_at") @db.Timestamptz(6)
|
|
161
|
+
downtimeMinutes Int @map("downtime_minutes")
|
|
162
|
+
estimatedEnergyLossWh Int @map("estimated_energy_loss_wh")
|
|
163
|
+
cooperative Cooperative @relation(fields: [cooperativeId], references: [id])
|
|
164
|
+
site SolarSite @relation(fields: [siteId], references: [id])
|
|
165
|
+
region Region @relation(fields: [regionId], references: [id])
|
|
166
|
+
inverterModel InverterModel @relation(fields: [inverterModelId], references: [id])
|
|
167
|
+
faultCategory FaultCategory @relation(fields: [faultCategoryId], references: [id])
|
|
168
|
+
|
|
169
|
+
@@index([cooperativeId, occurredAt])
|
|
170
|
+
@@map("incidents")
|
|
171
|
+
}
|