@contractspec/example.pocket-family-office 3.7.17 → 3.7.18

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 (64) hide show
  1. package/dist/blueprint.js +1 -197
  2. package/dist/browser/blueprint.js +1 -197
  3. package/dist/browser/connections/samples.js +1 -197
  4. package/dist/browser/docs/index.js +3 -48
  5. package/dist/browser/docs/pocket-family-office.docblock.js +3 -48
  6. package/dist/browser/example.js +1 -42
  7. package/dist/browser/index.js +4 -1660
  8. package/dist/browser/knowledge/sources.sample.js +1 -70
  9. package/dist/browser/operations/index.js +1 -314
  10. package/dist/browser/pocket-family-office.capability.js +1 -19
  11. package/dist/browser/pocket-family-office.feature.js +2 -86
  12. package/dist/browser/telemetry.js +1 -176
  13. package/dist/browser/tenant.sample.js +1 -71
  14. package/dist/browser/workflows/generate-financial-summary.js +1 -58
  15. package/dist/browser/workflows/generate-openbanking-overview.js +1 -52
  16. package/dist/browser/workflows/index.js +1 -467
  17. package/dist/browser/workflows/ingest-email-threads.js +1 -56
  18. package/dist/browser/workflows/process-uploaded-document.js +1 -54
  19. package/dist/browser/workflows/refresh-openbanking-balances.js +1 -64
  20. package/dist/browser/workflows/sync-openbanking-accounts.js +1 -64
  21. package/dist/browser/workflows/sync-openbanking-transactions.js +1 -64
  22. package/dist/browser/workflows/upcoming-payments-reminder.js +1 -62
  23. package/dist/connections/samples.js +1 -197
  24. package/dist/docs/index.js +3 -48
  25. package/dist/docs/pocket-family-office.docblock.js +3 -48
  26. package/dist/example.js +1 -42
  27. package/dist/index.js +4 -1660
  28. package/dist/knowledge/sources.sample.js +1 -70
  29. package/dist/node/blueprint.js +1 -197
  30. package/dist/node/connections/samples.js +1 -197
  31. package/dist/node/docs/index.js +3 -48
  32. package/dist/node/docs/pocket-family-office.docblock.js +3 -48
  33. package/dist/node/example.js +1 -42
  34. package/dist/node/index.js +4 -1660
  35. package/dist/node/knowledge/sources.sample.js +1 -70
  36. package/dist/node/operations/index.js +1 -314
  37. package/dist/node/pocket-family-office.capability.js +1 -19
  38. package/dist/node/pocket-family-office.feature.js +2 -86
  39. package/dist/node/telemetry.js +1 -176
  40. package/dist/node/tenant.sample.js +1 -71
  41. package/dist/node/workflows/generate-financial-summary.js +1 -58
  42. package/dist/node/workflows/generate-openbanking-overview.js +1 -52
  43. package/dist/node/workflows/index.js +1 -467
  44. package/dist/node/workflows/ingest-email-threads.js +1 -56
  45. package/dist/node/workflows/process-uploaded-document.js +1 -54
  46. package/dist/node/workflows/refresh-openbanking-balances.js +1 -64
  47. package/dist/node/workflows/sync-openbanking-accounts.js +1 -64
  48. package/dist/node/workflows/sync-openbanking-transactions.js +1 -64
  49. package/dist/node/workflows/upcoming-payments-reminder.js +1 -62
  50. package/dist/operations/index.js +1 -314
  51. package/dist/pocket-family-office.capability.js +1 -19
  52. package/dist/pocket-family-office.feature.js +2 -86
  53. package/dist/telemetry.js +1 -176
  54. package/dist/tenant.sample.js +1 -71
  55. package/dist/workflows/generate-financial-summary.js +1 -58
  56. package/dist/workflows/generate-openbanking-overview.js +1 -52
  57. package/dist/workflows/index.js +1 -467
  58. package/dist/workflows/ingest-email-threads.js +1 -56
  59. package/dist/workflows/process-uploaded-document.js +1 -54
  60. package/dist/workflows/refresh-openbanking-balances.js +1 -64
  61. package/dist/workflows/sync-openbanking-accounts.js +1 -64
  62. package/dist/workflows/sync-openbanking-transactions.js +1 -64
  63. package/dist/workflows/upcoming-payments-reminder.js +1 -62
  64. package/package.json +7 -7
@@ -1,70 +1 @@
1
- // src/knowledge/sources.sample.ts
2
- var now = new Date;
3
- var pocketFamilyOfficeKnowledgeSources = [
4
- {
5
- meta: {
6
- id: "source-financial-uploads",
7
- tenantId: "tenant.family-office",
8
- spaceKey: "knowledge.financial-docs",
9
- spaceVersion: "1.0.0",
10
- label: "Uploaded Financial Documents",
11
- sourceType: "file_upload",
12
- createdAt: now,
13
- updatedAt: now
14
- },
15
- config: {
16
- bucket: "pfo-uploads",
17
- prefix: "financial-docs/"
18
- },
19
- syncSchedule: {
20
- enabled: true,
21
- intervalMs: 15 * 60 * 1000
22
- },
23
- lastSync: {
24
- timestamp: now,
25
- success: true
26
- }
27
- },
28
- {
29
- meta: {
30
- id: "source-gmail-threads",
31
- tenantId: "tenant.family-office",
32
- spaceKey: "knowledge.email-threads",
33
- spaceVersion: "1.0.0",
34
- label: "Household Gmail Threads",
35
- sourceType: "email",
36
- createdAt: now,
37
- updatedAt: now
38
- },
39
- config: {
40
- labelIds: ["INBOX", "FINANCE"]
41
- },
42
- syncSchedule: {
43
- enabled: true,
44
- intervalMs: 5 * 60 * 1000
45
- },
46
- lastSync: {
47
- timestamp: now,
48
- success: true
49
- }
50
- },
51
- {
52
- meta: {
53
- id: "source-financial-overview",
54
- tenantId: "tenant.family-office",
55
- spaceKey: "knowledge.financial-overview",
56
- spaceVersion: "1.0.0",
57
- label: "Financial Overview",
58
- sourceType: "api",
59
- createdAt: now,
60
- updatedAt: now
61
- },
62
- config: {},
63
- syncSchedule: {
64
- enabled: false
65
- }
66
- }
67
- ];
68
- export {
69
- pocketFamilyOfficeKnowledgeSources
70
- };
1
+ var e=new Date,a=[{meta:{id:"source-financial-uploads",tenantId:"tenant.family-office",spaceKey:"knowledge.financial-docs",spaceVersion:"1.0.0",label:"Uploaded Financial Documents",sourceType:"file_upload",createdAt:e,updatedAt:e},config:{bucket:"pfo-uploads",prefix:"financial-docs/"},syncSchedule:{enabled:!0,intervalMs:900000},lastSync:{timestamp:e,success:!0}},{meta:{id:"source-gmail-threads",tenantId:"tenant.family-office",spaceKey:"knowledge.email-threads",spaceVersion:"1.0.0",label:"Household Gmail Threads",sourceType:"email",createdAt:e,updatedAt:e},config:{labelIds:["INBOX","FINANCE"]},syncSchedule:{enabled:!0,intervalMs:300000},lastSync:{timestamp:e,success:!0}},{meta:{id:"source-financial-overview",tenantId:"tenant.family-office",spaceKey:"knowledge.financial-overview",spaceVersion:"1.0.0",label:"Financial Overview",sourceType:"api",createdAt:e,updatedAt:e},config:{},syncSchedule:{enabled:!1}}];export{a as pocketFamilyOfficeKnowledgeSources};
@@ -1,314 +1 @@
1
- // src/operations/index.ts
2
- import { OPENBANKING_TELEMETRY_EVENTS } from "@contractspec/lib.contracts-integrations";
3
- import {
4
- defineCommand,
5
- defineQuery
6
- } from "@contractspec/lib.contracts-spec";
7
- import {
8
- OwnersEnum,
9
- StabilityEnum,
10
- TagsEnum
11
- } from "@contractspec/lib.contracts-spec/ownership";
12
- import {
13
- defineEnum,
14
- defineSchemaModel,
15
- ScalarTypeEnum
16
- } from "@contractspec/lib.schema";
17
- var SourceEnum = defineEnum("Source", ["upload", "email", "sync"]);
18
- var ChannelEnum = defineEnum("Channel", ["email", "sms", "both"]);
19
- var PeriodEnum = defineEnum("Period", ["P7d", "P30d", "P90d"]);
20
- var ObPeriodEnum = defineEnum("ObPeriod", ["Pweek", "Pmonth", "Pquarter"]);
21
- var UploadDocumentInputModel = defineSchemaModel({
22
- name: "UploadDocumentInput",
23
- fields: {
24
- bucket: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
25
- objectKey: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
26
- mimeType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
27
- bytes: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
28
- tags: {
29
- type: ScalarTypeEnum.String_unsecure(),
30
- isOptional: false,
31
- isArray: true
32
- },
33
- uploadedAt: { type: ScalarTypeEnum.Date(), isOptional: false },
34
- source: { type: SourceEnum, isOptional: false }
35
- }
36
- });
37
- var UploadDocumentOutputModel = defineSchemaModel({
38
- name: "UploadDocumentOutput",
39
- fields: {
40
- documentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
41
- ingestionJobId: {
42
- type: ScalarTypeEnum.String_unsecure(),
43
- isOptional: false
44
- }
45
- }
46
- });
47
- var uploadDocumentContract = defineCommand({
48
- meta: {
49
- key: "pfo.documents.upload",
50
- version: "1.0.0",
51
- description: "Stores an object in tenant storage and schedules ingestion into the knowledge base.",
52
- goal: "Allow users to ingest financial documents for processing.",
53
- context: "Part of the finance domain. Documents are uploaded to object storage and then processed by the ingestion pipeline.",
54
- owners: [OwnersEnum.PlatformFinance],
55
- tags: ["documents", "ingestion", TagsEnum.Guide],
56
- stability: StabilityEnum.Experimental
57
- },
58
- io: {
59
- input: UploadDocumentInputModel,
60
- output: UploadDocumentOutputModel
61
- },
62
- policy: {
63
- auth: "user",
64
- rateLimit: {
65
- rpm: 30,
66
- key: "user"
67
- }
68
- }
69
- });
70
- var PaymentReminderInputModel = defineSchemaModel({
71
- name: "PaymentReminderInput",
72
- fields: {
73
- billId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
74
- recipientEmail: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },
75
- recipientPhone: {
76
- type: ScalarTypeEnum.String_unsecure(),
77
- isOptional: true
78
- },
79
- dueDate: { type: ScalarTypeEnum.Date(), isOptional: false },
80
- amountCents: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
81
- currency: { type: ScalarTypeEnum.Currency(), isOptional: false },
82
- channel: { type: ChannelEnum, isOptional: false },
83
- memo: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
84
- }
85
- });
86
- var PaymentReminderOutputModel = defineSchemaModel({
87
- name: "PaymentReminderOutput",
88
- fields: {
89
- reminderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
90
- scheduledAt: { type: ScalarTypeEnum.Date(), isOptional: false }
91
- }
92
- });
93
- var schedulePaymentReminderContract = defineCommand({
94
- meta: {
95
- key: "pfo.reminders.schedule-payment",
96
- version: "1.0.0",
97
- description: "Queues outbound email/SMS reminders for upcoming bills and adds an optional calendar hold.",
98
- goal: "Ensure bills are paid on time by notifying users.",
99
- context: "Finance automation. Reminders are sent via configured channels (email, SMS).",
100
- owners: [OwnersEnum.PlatformFinance],
101
- tags: ["payments", "reminders", TagsEnum.Automation],
102
- stability: StabilityEnum.Beta
103
- },
104
- io: {
105
- input: PaymentReminderInputModel,
106
- output: PaymentReminderOutputModel
107
- },
108
- policy: {
109
- auth: "user"
110
- }
111
- });
112
- var FinancialSummaryInputModel = defineSchemaModel({
113
- name: "FinancialSummaryInput",
114
- fields: {
115
- period: { type: PeriodEnum, isOptional: false },
116
- includeVoiceSummary: { type: ScalarTypeEnum.Boolean(), isOptional: false }
117
- }
118
- });
119
- var SummaryHighlightModel = defineSchemaModel({
120
- name: "SummaryHighlight",
121
- fields: {
122
- label: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
123
- value: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
124
- }
125
- });
126
- var FinancialSummaryOutputModel = defineSchemaModel({
127
- name: "FinancialSummaryOutput",
128
- fields: {
129
- summaryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
130
- generatedAt: { type: ScalarTypeEnum.Date(), isOptional: false },
131
- markdown: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
132
- highlights: {
133
- type: SummaryHighlightModel,
134
- isOptional: false,
135
- isArray: true
136
- },
137
- cashflowDelta: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false }
138
- }
139
- });
140
- var generateFinancialSummaryContract = defineQuery({
141
- meta: {
142
- key: "pfo.summary.generate",
143
- version: "1.0.0",
144
- description: "Runs RAG over financial documents and email threads to provide a natural-language summary with key metrics.",
145
- goal: "Provide a quick overview of financial status and recent activity.",
146
- context: "Uses RAG over ingested knowledge. Summaries can be dispatched or viewed in app.",
147
- owners: [OwnersEnum.PlatformFinance],
148
- tags: ["summary", "ai", TagsEnum.Automation],
149
- stability: StabilityEnum.Beta
150
- },
151
- io: {
152
- input: FinancialSummaryInputModel,
153
- output: FinancialSummaryOutputModel
154
- },
155
- policy: {
156
- auth: "user"
157
- }
158
- });
159
- var SyncEmailThreadsInputModel = defineSchemaModel({
160
- name: "SyncEmailThreadsInput",
161
- fields: {
162
- labelIds: {
163
- type: ScalarTypeEnum.String_unsecure(),
164
- isOptional: false,
165
- isArray: true
166
- },
167
- maxThreads: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
168
- syncSinceMinutes: {
169
- type: ScalarTypeEnum.Int_unsecure(),
170
- isOptional: false
171
- }
172
- }
173
- });
174
- var SyncEmailThreadsOutputModel = defineSchemaModel({
175
- name: "SyncEmailThreadsOutput",
176
- fields: {
177
- syncedThreads: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
178
- lastMessageAt: { type: ScalarTypeEnum.Date(), isOptional: true }
179
- }
180
- });
181
- var syncEmailThreadsContract = defineCommand({
182
- meta: {
183
- key: "pfo.email.sync-threads",
184
- version: "1.0.0",
185
- description: "Triggers ingestion of Gmail threads into the operational knowledge space.",
186
- goal: "Keep knowledge base up to date with email communications.",
187
- context: "Syncs from Gmail integration. Only includes threads matching configured labels.",
188
- owners: [OwnersEnum.PlatformMessaging],
189
- tags: ["gmail", "knowledge", TagsEnum.Automation],
190
- stability: StabilityEnum.Beta
191
- },
192
- io: {
193
- input: SyncEmailThreadsInputModel,
194
- output: SyncEmailThreadsOutputModel
195
- },
196
- policy: {
197
- auth: "user"
198
- }
199
- });
200
- var SummaryDispatchInputModel = defineSchemaModel({
201
- name: "SummaryDispatchInput",
202
- fields: {
203
- summaryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
204
- recipientEmail: { type: ScalarTypeEnum.EmailAddress(), isOptional: false },
205
- recipientName: {
206
- type: ScalarTypeEnum.String_unsecure(),
207
- isOptional: true
208
- },
209
- includeVoice: { type: ScalarTypeEnum.Boolean(), isOptional: false },
210
- voiceRecipient: {
211
- type: ScalarTypeEnum.String_unsecure(),
212
- isOptional: true
213
- }
214
- }
215
- });
216
- var SummaryDispatchOutputModel = defineSchemaModel({
217
- name: "SummaryDispatchOutput",
218
- fields: {
219
- dispatchId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
220
- emailSent: { type: ScalarTypeEnum.Boolean(), isOptional: false },
221
- voiceUrl: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
222
- }
223
- });
224
- var dispatchFinancialSummaryContract = defineCommand({
225
- meta: {
226
- key: "pfo.summary.dispatch",
227
- version: "1.0.0",
228
- description: "Delivers the generated summary via email and optionally synthesises a voice note.",
229
- goal: "Deliver financial insights to users proactively.",
230
- context: "Dispatches summaries generated by pfo.summary.generate via email or voice.",
231
- owners: [OwnersEnum.PlatformMessaging],
232
- tags: ["summary", "communications", TagsEnum.Automation],
233
- stability: StabilityEnum.Experimental
234
- },
235
- io: {
236
- input: SummaryDispatchInputModel,
237
- output: SummaryDispatchOutputModel
238
- },
239
- policy: {
240
- auth: "user"
241
- }
242
- });
243
- var OpenBankingOverviewInputModel = defineSchemaModel({
244
- name: "OpenBankingOverviewInput",
245
- fields: {
246
- tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
247
- accountIds: {
248
- type: ScalarTypeEnum.String_unsecure(),
249
- isOptional: true,
250
- isArray: true
251
- },
252
- period: { type: ObPeriodEnum, isOptional: false },
253
- asOf: { type: ScalarTypeEnum.Date(), isOptional: true },
254
- includeCategories: { type: ScalarTypeEnum.Boolean(), isOptional: false },
255
- includeCashflowTrend: { type: ScalarTypeEnum.Boolean(), isOptional: false }
256
- }
257
- });
258
- var OpenBankingOverviewOutputModel = defineSchemaModel({
259
- name: "OpenBankingOverviewOutput",
260
- fields: {
261
- knowledgeEntryId: {
262
- type: ScalarTypeEnum.String_unsecure(),
263
- isOptional: false
264
- },
265
- periodStart: { type: ScalarTypeEnum.Date(), isOptional: false },
266
- periodEnd: { type: ScalarTypeEnum.Date(), isOptional: false },
267
- generatedAt: { type: ScalarTypeEnum.Date(), isOptional: false },
268
- summaryPath: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
269
- }
270
- });
271
- var generateOpenBankingOverviewContract = defineCommand({
272
- meta: {
273
- key: "pfo.openbanking.generate-overview",
274
- version: "1.0.0",
275
- description: "Aggregates balances and transactions into a derived financial overview stored in the knowledge layer.",
276
- goal: "Create a periodic financial snapshot.",
277
- context: "Aggregates data from open banking integration into a document.",
278
- owners: [OwnersEnum.PlatformFinance],
279
- tags: ["open-banking", "summary", TagsEnum.Automation],
280
- stability: StabilityEnum.Experimental
281
- },
282
- io: {
283
- input: OpenBankingOverviewInputModel,
284
- output: OpenBankingOverviewOutputModel
285
- },
286
- policy: {
287
- auth: "user"
288
- },
289
- telemetry: {
290
- success: {
291
- event: {
292
- key: OPENBANKING_TELEMETRY_EVENTS.overviewGenerated,
293
- version: "1.0.0"
294
- }
295
- }
296
- }
297
- });
298
- var pocketFamilyOfficeContracts = {
299
- "pfo.documents.upload": uploadDocumentContract,
300
- "pfo.reminders.schedule-payment": schedulePaymentReminderContract,
301
- "pfo.summary.generate": generateFinancialSummaryContract,
302
- "pfo.summary.dispatch": dispatchFinancialSummaryContract,
303
- "pfo.email.sync-threads": syncEmailThreadsContract,
304
- "pfo.openbanking.generate-overview": generateOpenBankingOverviewContract
305
- };
306
- export {
307
- uploadDocumentContract,
308
- syncEmailThreadsContract,
309
- schedulePaymentReminderContract,
310
- pocketFamilyOfficeContracts,
311
- generateOpenBankingOverviewContract,
312
- generateFinancialSummaryContract,
313
- dispatchFinancialSummaryContract
314
- };
1
+ import{OPENBANKING_TELEMETRY_EVENTS as H}from"@contractspec/lib.contracts-integrations";import{defineCommand as z,defineQuery as J}from"@contractspec/lib.contracts-spec";import{OwnersEnum as j,StabilityEnum as q,TagsEnum as x}from"@contractspec/lib.contracts-spec/ownership";import{defineEnum as D,defineSchemaModel as f,ScalarTypeEnum as b}from"@contractspec/lib.schema";var Q=D("Source",["upload","email","sync"]),U=D("Channel",["email","sms","both"]),W=D("Period",["P7d","P30d","P90d"]),X=D("ObPeriod",["Pweek","Pmonth","Pquarter"]),Z=f({name:"UploadDocumentInput",fields:{bucket:{type:b.NonEmptyString(),isOptional:!1},objectKey:{type:b.NonEmptyString(),isOptional:!1},mimeType:{type:b.NonEmptyString(),isOptional:!1},bytes:{type:b.Int_unsecure(),isOptional:!1},tags:{type:b.String_unsecure(),isOptional:!1,isArray:!0},uploadedAt:{type:b.Date(),isOptional:!1},source:{type:Q,isOptional:!1}}}),$=f({name:"UploadDocumentOutput",fields:{documentId:{type:b.String_unsecure(),isOptional:!1},ingestionJobId:{type:b.String_unsecure(),isOptional:!1}}}),k=z({meta:{key:"pfo.documents.upload",version:"1.0.0",description:"Stores an object in tenant storage and schedules ingestion into the knowledge base.",goal:"Allow users to ingest financial documents for processing.",context:"Part of the finance domain. Documents are uploaded to object storage and then processed by the ingestion pipeline.",owners:[j.PlatformFinance],tags:["documents","ingestion",x.Guide],stability:q.Experimental},io:{input:Z,output:$},policy:{auth:"user",rateLimit:{rpm:30,key:"user"}}}),A=f({name:"PaymentReminderInput",fields:{billId:{type:b.String_unsecure(),isOptional:!1},recipientEmail:{type:b.EmailAddress(),isOptional:!1},recipientPhone:{type:b.String_unsecure(),isOptional:!0},dueDate:{type:b.Date(),isOptional:!1},amountCents:{type:b.Int_unsecure(),isOptional:!1},currency:{type:b.Currency(),isOptional:!1},channel:{type:U,isOptional:!1},memo:{type:b.String_unsecure(),isOptional:!0}}}),F=f({name:"PaymentReminderOutput",fields:{reminderId:{type:b.String_unsecure(),isOptional:!1},scheduledAt:{type:b.Date(),isOptional:!1}}}),G=z({meta:{key:"pfo.reminders.schedule-payment",version:"1.0.0",description:"Queues outbound email/SMS reminders for upcoming bills and adds an optional calendar hold.",goal:"Ensure bills are paid on time by notifying users.",context:"Finance automation. Reminders are sent via configured channels (email, SMS).",owners:[j.PlatformFinance],tags:["payments","reminders",x.Automation],stability:q.Beta},io:{input:A,output:F},policy:{auth:"user"}}),K=f({name:"FinancialSummaryInput",fields:{period:{type:W,isOptional:!1},includeVoiceSummary:{type:b.Boolean(),isOptional:!1}}}),L=f({name:"SummaryHighlight",fields:{label:{type:b.String_unsecure(),isOptional:!1},value:{type:b.String_unsecure(),isOptional:!1}}}),V=f({name:"FinancialSummaryOutput",fields:{summaryId:{type:b.String_unsecure(),isOptional:!1},generatedAt:{type:b.Date(),isOptional:!1},markdown:{type:b.String_unsecure(),isOptional:!1},highlights:{type:L,isOptional:!1,isArray:!0},cashflowDelta:{type:b.Float_unsecure(),isOptional:!1}}}),Y=J({meta:{key:"pfo.summary.generate",version:"1.0.0",description:"Runs RAG over financial documents and email threads to provide a natural-language summary with key metrics.",goal:"Provide a quick overview of financial status and recent activity.",context:"Uses RAG over ingested knowledge. Summaries can be dispatched or viewed in app.",owners:[j.PlatformFinance],tags:["summary","ai",x.Automation],stability:q.Beta},io:{input:K,output:V},policy:{auth:"user"}}),g=f({name:"SyncEmailThreadsInput",fields:{labelIds:{type:b.String_unsecure(),isOptional:!1,isArray:!0},maxThreads:{type:b.Int_unsecure(),isOptional:!1},syncSinceMinutes:{type:b.Int_unsecure(),isOptional:!1}}}),v=f({name:"SyncEmailThreadsOutput",fields:{syncedThreads:{type:b.Int_unsecure(),isOptional:!1},lastMessageAt:{type:b.Date(),isOptional:!0}}}),B=z({meta:{key:"pfo.email.sync-threads",version:"1.0.0",description:"Triggers ingestion of Gmail threads into the operational knowledge space.",goal:"Keep knowledge base up to date with email communications.",context:"Syncs from Gmail integration. Only includes threads matching configured labels.",owners:[j.PlatformMessaging],tags:["gmail","knowledge",x.Automation],stability:q.Beta},io:{input:g,output:v},policy:{auth:"user"}}),P=f({name:"SummaryDispatchInput",fields:{summaryId:{type:b.String_unsecure(),isOptional:!1},recipientEmail:{type:b.EmailAddress(),isOptional:!1},recipientName:{type:b.String_unsecure(),isOptional:!0},includeVoice:{type:b.Boolean(),isOptional:!1},voiceRecipient:{type:b.String_unsecure(),isOptional:!0}}}),R=f({name:"SummaryDispatchOutput",fields:{dispatchId:{type:b.String_unsecure(),isOptional:!1},emailSent:{type:b.Boolean(),isOptional:!1},voiceUrl:{type:b.String_unsecure(),isOptional:!0}}}),_=z({meta:{key:"pfo.summary.dispatch",version:"1.0.0",description:"Delivers the generated summary via email and optionally synthesises a voice note.",goal:"Deliver financial insights to users proactively.",context:"Dispatches summaries generated by pfo.summary.generate via email or voice.",owners:[j.PlatformMessaging],tags:["summary","communications",x.Automation],stability:q.Experimental},io:{input:P,output:R},policy:{auth:"user"}}),C=f({name:"OpenBankingOverviewInput",fields:{tenantId:{type:b.String_unsecure(),isOptional:!1},accountIds:{type:b.String_unsecure(),isOptional:!0,isArray:!0},period:{type:X,isOptional:!1},asOf:{type:b.Date(),isOptional:!0},includeCategories:{type:b.Boolean(),isOptional:!1},includeCashflowTrend:{type:b.Boolean(),isOptional:!1}}}),h=f({name:"OpenBankingOverviewOutput",fields:{knowledgeEntryId:{type:b.String_unsecure(),isOptional:!1},periodStart:{type:b.Date(),isOptional:!1},periodEnd:{type:b.Date(),isOptional:!1},generatedAt:{type:b.Date(),isOptional:!1},summaryPath:{type:b.String_unsecure(),isOptional:!0}}}),I=z({meta:{key:"pfo.openbanking.generate-overview",version:"1.0.0",description:"Aggregates balances and transactions into a derived financial overview stored in the knowledge layer.",goal:"Create a periodic financial snapshot.",context:"Aggregates data from open banking integration into a document.",owners:[j.PlatformFinance],tags:["open-banking","summary",x.Automation],stability:q.Experimental},io:{input:C,output:h},policy:{auth:"user"},telemetry:{success:{event:{key:H.overviewGenerated,version:"1.0.0"}}}}),M={"pfo.documents.upload":k,"pfo.reminders.schedule-payment":G,"pfo.summary.generate":Y,"pfo.summary.dispatch":_,"pfo.email.sync-threads":B,"pfo.openbanking.generate-overview":I};export{k as uploadDocumentContract,B as syncEmailThreadsContract,G as schedulePaymentReminderContract,M as pocketFamilyOfficeContracts,I as generateOpenBankingOverviewContract,Y as generateFinancialSummaryContract,_ as dispatchFinancialSummaryContract};
@@ -1,19 +1 @@
1
- // src/pocket-family-office.capability.ts
2
- import {
3
- defineCapability,
4
- StabilityEnum
5
- } from "@contractspec/lib.contracts-spec";
6
- var PocketFamilyOfficeCapability = defineCapability({
7
- meta: {
8
- key: "pocket-family-office",
9
- version: "1.0.0",
10
- kind: "ui",
11
- stability: StabilityEnum.Experimental,
12
- description: "Personal family office management",
13
- owners: ["@platform.finance"],
14
- tags: ["family-office", "wealth", "personal"]
15
- }
16
- });
17
- export {
18
- PocketFamilyOfficeCapability
19
- };
1
+ import{defineCapability as g,StabilityEnum as h}from"@contractspec/lib.contracts-spec";var k=g({meta:{key:"pocket-family-office",version:"1.0.0",kind:"ui",stability:h.Experimental,description:"Personal family office management",owners:["@platform.finance"],tags:["family-office","wealth","personal"]}});export{k as PocketFamilyOfficeCapability};
@@ -1,82 +1,4 @@
1
- // src/pocket-family-office.feature.ts
2
- import { defineFeature } from "@contractspec/lib.contracts-spec";
3
- var PocketFamilyOfficeFeature = defineFeature({
4
- meta: {
5
- key: "pocket-family-office",
6
- version: "1.0.0",
7
- title: "Pocket Family Office",
8
- description: "Personal finance automation with document ingestion, open banking, and AI summaries",
9
- domain: "finance",
10
- owners: ["@platform.finance"],
11
- tags: [
12
- "finance",
13
- "open-banking",
14
- "documents",
15
- "automation",
16
- "family-office"
17
- ],
18
- stability: "experimental"
19
- },
20
- operations: [
21
- { key: "pfo.documents.upload", version: "1.0.0" },
22
- { key: "pfo.reminders.schedule-payment", version: "1.0.0" },
23
- { key: "pfo.summary.generate", version: "1.0.0" },
24
- { key: "pfo.email.sync-threads", version: "1.0.0" },
25
- { key: "pfo.summary.dispatch", version: "1.0.0" },
26
- { key: "pfo.openbanking.generate-overview", version: "1.0.0" }
27
- ],
28
- events: [],
29
- presentations: [],
30
- opToPresentation: [],
31
- presentationsTargets: [],
32
- capabilities: {
33
- provides: [{ key: "pocket-family-office", version: "1.0.0" }],
34
- requires: [
35
- { key: "identity", version: "1.0.0" },
36
- { key: "openbanking", version: "1.0.0" }
37
- ]
38
- },
39
- workflows: [
40
- { key: "pfo.workflow.sync-openbanking-accounts", version: "1.0.0" },
41
- { key: "pfo.workflow.sync-openbanking-transactions", version: "1.0.0" },
42
- { key: "pfo.workflow.refresh-openbanking-balances", version: "1.0.0" },
43
- { key: "pfo.workflow.generate-openbanking-overview", version: "1.0.0" },
44
- { key: "pfo.workflow.process-uploaded-document", version: "1.0.0" },
45
- { key: "pfo.workflow.upcoming-payments-reminder", version: "1.0.0" },
46
- { key: "pfo.workflow.generate-financial-summary", version: "1.0.0" },
47
- { key: "pfo.workflow.ingest-email-threads", version: "1.0.0" }
48
- ],
49
- knowledge: [
50
- { key: "knowledge.financial-docs", version: "1.0.0" },
51
- { key: "knowledge.email-threads", version: "1.0.0" },
52
- { key: "knowledge.financial-overview", version: "1.0.0" }
53
- ],
54
- telemetry: [{ key: "pfo.telemetry", version: "1.0.0" }],
55
- policies: [{ key: "pfo.policy.tenancy", version: "1.0.0" }],
56
- integrations: [
57
- { key: "pfo.integration.openbanking", version: "1.0.0" },
58
- { key: "pfo.integration.llm", version: "1.0.0" }
59
- ],
60
- jobs: [
61
- { key: "pfo.job.doc-processing", version: "1.0.0" },
62
- { key: "pfo.job.reminder-dispatch", version: "1.0.0" }
63
- ],
64
- docs: [
65
- "docs.examples.pocket-family-office.goal",
66
- "docs.examples.pocket-family-office.usage",
67
- "docs.examples.pocket-family-office.reference"
68
- ]
69
- });
70
- var tech_contracts_vertical_pocket_family_office_DocBlocks = [
71
- {
72
- id: "docs.tech.contracts.vertical-pocket-family-office",
73
- title: "Pocket Family Office Vertical",
74
- summary: "Pocket Family Office is a ContractSpec reference vertical that",
75
- kind: "reference",
76
- visibility: "public",
77
- route: "/docs/tech/contracts/vertical-pocket-family-office",
78
- tags: ["tech", "contracts", "vertical-pocket-family-office"],
79
- body: `# Pocket Family Office Vertical
1
+ import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"pocket-family-office",version:"1.0.0",title:"Pocket Family Office",description:"Personal finance automation with document ingestion, open banking, and AI summaries",domain:"finance",owners:["@platform.finance"],tags:["finance","open-banking","documents","automation","family-office"],stability:"experimental"},operations:[{key:"pfo.documents.upload",version:"1.0.0"},{key:"pfo.reminders.schedule-payment",version:"1.0.0"},{key:"pfo.summary.generate",version:"1.0.0"},{key:"pfo.email.sync-threads",version:"1.0.0"},{key:"pfo.summary.dispatch",version:"1.0.0"},{key:"pfo.openbanking.generate-overview",version:"1.0.0"}],events:[],presentations:[],opToPresentation:[],presentationsTargets:[],capabilities:{provides:[{key:"pocket-family-office",version:"1.0.0"}],requires:[{key:"identity",version:"1.0.0"},{key:"openbanking",version:"1.0.0"}]},workflows:[{key:"pfo.workflow.sync-openbanking-accounts",version:"1.0.0"},{key:"pfo.workflow.sync-openbanking-transactions",version:"1.0.0"},{key:"pfo.workflow.refresh-openbanking-balances",version:"1.0.0"},{key:"pfo.workflow.generate-openbanking-overview",version:"1.0.0"},{key:"pfo.workflow.process-uploaded-document",version:"1.0.0"},{key:"pfo.workflow.upcoming-payments-reminder",version:"1.0.0"},{key:"pfo.workflow.generate-financial-summary",version:"1.0.0"},{key:"pfo.workflow.ingest-email-threads",version:"1.0.0"}],knowledge:[{key:"knowledge.financial-docs",version:"1.0.0"},{key:"knowledge.email-threads",version:"1.0.0"},{key:"knowledge.financial-overview",version:"1.0.0"}],telemetry:[{key:"pfo.telemetry",version:"1.0.0"}],policies:[{key:"pfo.policy.tenancy",version:"1.0.0"}],integrations:[{key:"pfo.integration.openbanking",version:"1.0.0"},{key:"pfo.integration.llm",version:"1.0.0"}],jobs:[{key:"pfo.job.doc-processing",version:"1.0.0"},{key:"pfo.job.reminder-dispatch",version:"1.0.0"}],docs:["docs.examples.pocket-family-office.goal","docs.examples.pocket-family-office.usage","docs.examples.pocket-family-office.reference"]}),k=[{id:"docs.tech.contracts.vertical-pocket-family-office",title:"Pocket Family Office Vertical",summary:"Pocket Family Office is a ContractSpec reference vertical that",kind:"reference",visibility:"public",route:"/docs/tech/contracts/vertical-pocket-family-office",tags:["tech","contracts","vertical-pocket-family-office"],body:`# Pocket Family Office Vertical
80
2
 
81
3
  Pocket Family Office is a ContractSpec reference vertical that
82
4
  demonstrates finance automation atop the integration and knowledge
@@ -181,10 +103,4 @@ tenant-specific IDs/secret references before deploying.
181
103
 
182
104
 
183
105
 
184
- `
185
- }
186
- ];
187
- export {
188
- tech_contracts_vertical_pocket_family_office_DocBlocks,
189
- PocketFamilyOfficeFeature
190
- };
106
+ `}];export{k as tech_contracts_vertical_pocket_family_office_DocBlocks,j as PocketFamilyOfficeFeature};