@contractspec/lib.contracts-integrations 2.0.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.
- package/README.md +3 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +3676 -0
- package/dist/integrations/binding.d.ts +14 -0
- package/dist/integrations/binding.js +1 -0
- package/dist/integrations/connection.d.ts +47 -0
- package/dist/integrations/connection.js +1 -0
- package/dist/integrations/docs/integrations.docblock.d.ts +2 -0
- package/dist/integrations/docs/integrations.docblock.js +110 -0
- package/dist/integrations/health.d.ts +17 -0
- package/dist/integrations/health.js +73 -0
- package/dist/integrations/health.test.d.ts +1 -0
- package/dist/integrations/index.d.ts +11 -0
- package/dist/integrations/index.js +3264 -0
- package/dist/integrations/integrations.capability.d.ts +1 -0
- package/dist/integrations/integrations.capability.js +18 -0
- package/dist/integrations/integrations.feature.d.ts +5 -0
- package/dist/integrations/integrations.feature.js +33 -0
- package/dist/integrations/meeting-recorder/contracts/index.d.ts +7 -0
- package/dist/integrations/meeting-recorder/contracts/index.js +474 -0
- package/dist/integrations/meeting-recorder/contracts/meetings.d.ts +451 -0
- package/dist/integrations/meeting-recorder/contracts/meetings.js +219 -0
- package/dist/integrations/meeting-recorder/contracts/transcripts.d.ts +166 -0
- package/dist/integrations/meeting-recorder/contracts/transcripts.js +287 -0
- package/dist/integrations/meeting-recorder/contracts/webhooks.d.ts +85 -0
- package/dist/integrations/meeting-recorder/contracts/webhooks.js +172 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.capability.d.ts +1 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.capability.js +18 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.feature.d.ts +5 -0
- package/dist/integrations/meeting-recorder/meeting-recorder.feature.js +33 -0
- package/dist/integrations/meeting-recorder/models.d.ts +402 -0
- package/dist/integrations/meeting-recorder/models.js +122 -0
- package/dist/integrations/meeting-recorder/telemetry.d.ts +13 -0
- package/dist/integrations/meeting-recorder/telemetry.js +54 -0
- package/dist/integrations/openbanking/contracts/accounts.d.ts +282 -0
- package/dist/integrations/openbanking/contracts/accounts.js +328 -0
- package/dist/integrations/openbanking/contracts/balances.d.ts +158 -0
- package/dist/integrations/openbanking/contracts/balances.js +292 -0
- package/dist/integrations/openbanking/contracts/index.d.ts +7 -0
- package/dist/integrations/openbanking/contracts/index.js +644 -0
- package/dist/integrations/openbanking/contracts/transactions.d.ts +206 -0
- package/dist/integrations/openbanking/contracts/transactions.js +298 -0
- package/dist/integrations/openbanking/guards.d.ts +8 -0
- package/dist/integrations/openbanking/guards.js +42 -0
- package/dist/integrations/openbanking/guards.test.d.ts +1 -0
- package/dist/integrations/openbanking/models.d.ts +223 -0
- package/dist/integrations/openbanking/models.js +110 -0
- package/dist/integrations/openbanking/openbanking.capability.d.ts +1 -0
- package/dist/integrations/openbanking/openbanking.capability.js +18 -0
- package/dist/integrations/openbanking/openbanking.feature.d.ts +5 -0
- package/dist/integrations/openbanking/openbanking.feature.js +35 -0
- package/dist/integrations/openbanking/telemetry.d.ts +12 -0
- package/dist/integrations/openbanking/telemetry.js +51 -0
- package/dist/integrations/operations.d.ts +430 -0
- package/dist/integrations/operations.js +297 -0
- package/dist/integrations/operations.test.d.ts +1 -0
- package/dist/integrations/providers/analytics-reader.d.ts +103 -0
- package/dist/integrations/providers/analytics-reader.js +1 -0
- package/dist/integrations/providers/analytics-writer.d.ts +6 -0
- package/dist/integrations/providers/analytics-writer.js +1 -0
- package/dist/integrations/providers/analytics.d.ts +47 -0
- package/dist/integrations/providers/analytics.js +1 -0
- package/dist/integrations/providers/calendar.d.ts +75 -0
- package/dist/integrations/providers/calendar.js +1 -0
- package/dist/integrations/providers/database.d.ts +12 -0
- package/dist/integrations/providers/database.js +1 -0
- package/dist/integrations/providers/elevenlabs.d.ts +3 -0
- package/dist/integrations/providers/elevenlabs.js +86 -0
- package/dist/integrations/providers/email.d.ts +83 -0
- package/dist/integrations/providers/email.js +1 -0
- package/dist/integrations/providers/embedding.d.ts +21 -0
- package/dist/integrations/providers/embedding.js +1 -0
- package/dist/integrations/providers/fal.d.ts +3 -0
- package/dist/integrations/providers/fal.js +112 -0
- package/dist/integrations/providers/fathom.d.ts +3 -0
- package/dist/integrations/providers/fathom.js +126 -0
- package/dist/integrations/providers/fireflies.d.ts +3 -0
- package/dist/integrations/providers/fireflies.js +106 -0
- package/dist/integrations/providers/gcs-storage.d.ts +3 -0
- package/dist/integrations/providers/gcs-storage.js +97 -0
- package/dist/integrations/providers/gmail.d.ts +3 -0
- package/dist/integrations/providers/gmail.js +109 -0
- package/dist/integrations/providers/google-calendar.d.ts +3 -0
- package/dist/integrations/providers/google-calendar.js +92 -0
- package/dist/integrations/providers/gradium.d.ts +3 -0
- package/dist/integrations/providers/gradium.js +110 -0
- package/dist/integrations/providers/granola.d.ts +3 -0
- package/dist/integrations/providers/granola.js +107 -0
- package/dist/integrations/providers/index.d.ts +38 -0
- package/dist/integrations/providers/index.js +2094 -0
- package/dist/integrations/providers/jira.d.ts +3 -0
- package/dist/integrations/providers/jira.js +108 -0
- package/dist/integrations/providers/linear.d.ts +3 -0
- package/dist/integrations/providers/linear.js +107 -0
- package/dist/integrations/providers/llm.d.ts +79 -0
- package/dist/integrations/providers/llm.js +1 -0
- package/dist/integrations/providers/meeting-recorder.d.ts +129 -0
- package/dist/integrations/providers/meeting-recorder.js +1 -0
- package/dist/integrations/providers/mistral.d.ts +3 -0
- package/dist/integrations/providers/mistral.js +94 -0
- package/dist/integrations/providers/notion.d.ts +3 -0
- package/dist/integrations/providers/notion.js +113 -0
- package/dist/integrations/providers/openbanking.d.ts +125 -0
- package/dist/integrations/providers/openbanking.js +1 -0
- package/dist/integrations/providers/payments.d.ts +106 -0
- package/dist/integrations/providers/payments.js +1 -0
- package/dist/integrations/providers/posthog-llm-telemetry.d.ts +51 -0
- package/dist/integrations/providers/posthog-llm-telemetry.js +176 -0
- package/dist/integrations/providers/posthog.d.ts +3 -0
- package/dist/integrations/providers/posthog.js +106 -0
- package/dist/integrations/providers/postmark.d.ts +3 -0
- package/dist/integrations/providers/postmark.js +98 -0
- package/dist/integrations/providers/powens.d.ts +3 -0
- package/dist/integrations/providers/powens.js +124 -0
- package/dist/integrations/providers/project-management.d.ts +32 -0
- package/dist/integrations/providers/project-management.js +1 -0
- package/dist/integrations/providers/providers.test.d.ts +1 -0
- package/dist/integrations/providers/qdrant.d.ts +3 -0
- package/dist/integrations/providers/qdrant.js +101 -0
- package/dist/integrations/providers/registry.d.ts +6 -0
- package/dist/integrations/providers/registry.js +1878 -0
- package/dist/integrations/providers/sms.d.ts +31 -0
- package/dist/integrations/providers/sms.js +1 -0
- package/dist/integrations/providers/storage.d.ts +57 -0
- package/dist/integrations/providers/storage.js +1 -0
- package/dist/integrations/providers/stripe.d.ts +3 -0
- package/dist/integrations/providers/stripe.js +105 -0
- package/dist/integrations/providers/supabase-postgres.d.ts +3 -0
- package/dist/integrations/providers/supabase-postgres.js +87 -0
- package/dist/integrations/providers/supabase-vector.d.ts +3 -0
- package/dist/integrations/providers/supabase-vector.js +107 -0
- package/dist/integrations/providers/tldv.d.ts +3 -0
- package/dist/integrations/providers/tldv.js +106 -0
- package/dist/integrations/providers/twilio-sms.d.ts +3 -0
- package/dist/integrations/providers/twilio-sms.js +91 -0
- package/dist/integrations/providers/vector-store.d.ts +39 -0
- package/dist/integrations/providers/vector-store.js +1 -0
- package/dist/integrations/providers/voice.d.ts +31 -0
- package/dist/integrations/providers/voice.js +1 -0
- package/dist/integrations/runtime.d.ts +95 -0
- package/dist/integrations/runtime.js +209 -0
- package/dist/integrations/runtime.test.d.ts +1 -0
- package/dist/integrations/secrets/aws-secret-manager.d.ts +28 -0
- package/dist/integrations/secrets/aws-secret-manager.js +346 -0
- package/dist/integrations/secrets/env-secret-provider.d.ts +28 -0
- package/dist/integrations/secrets/env-secret-provider.js +159 -0
- package/dist/integrations/secrets/gcp-secret-manager.d.ts +29 -0
- package/dist/integrations/secrets/gcp-secret-manager.js +347 -0
- package/dist/integrations/secrets/index.d.ts +6 -0
- package/dist/integrations/secrets/index.js +1129 -0
- package/dist/integrations/secrets/manager.d.ts +44 -0
- package/dist/integrations/secrets/manager.js +183 -0
- package/dist/integrations/secrets/provider.d.ts +49 -0
- package/dist/integrations/secrets/provider.js +74 -0
- package/dist/integrations/secrets/provider.test.d.ts +1 -0
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts +35 -0
- package/dist/integrations/secrets/scaleway-secret-manager.js +375 -0
- package/dist/integrations/secrets-types.d.ts +14 -0
- package/dist/integrations/secrets-types.js +1 -0
- package/dist/integrations/spec.d.ts +72 -0
- package/dist/integrations/spec.js +22 -0
- package/dist/integrations/spec.test.d.ts +1 -0
- package/dist/node/index.js +3675 -0
- package/dist/node/integrations/binding.js +0 -0
- package/dist/node/integrations/connection.js +0 -0
- package/dist/node/integrations/docs/integrations.docblock.js +109 -0
- package/dist/node/integrations/health.js +72 -0
- package/dist/node/integrations/index.js +3263 -0
- package/dist/node/integrations/integrations.capability.js +17 -0
- package/dist/node/integrations/integrations.feature.js +32 -0
- package/dist/node/integrations/meeting-recorder/contracts/index.js +473 -0
- package/dist/node/integrations/meeting-recorder/contracts/meetings.js +218 -0
- package/dist/node/integrations/meeting-recorder/contracts/transcripts.js +286 -0
- package/dist/node/integrations/meeting-recorder/contracts/webhooks.js +171 -0
- package/dist/node/integrations/meeting-recorder/meeting-recorder.capability.js +17 -0
- package/dist/node/integrations/meeting-recorder/meeting-recorder.feature.js +32 -0
- package/dist/node/integrations/meeting-recorder/models.js +121 -0
- package/dist/node/integrations/meeting-recorder/telemetry.js +53 -0
- package/dist/node/integrations/openbanking/contracts/accounts.js +327 -0
- package/dist/node/integrations/openbanking/contracts/balances.js +291 -0
- package/dist/node/integrations/openbanking/contracts/index.js +643 -0
- package/dist/node/integrations/openbanking/contracts/transactions.js +297 -0
- package/dist/node/integrations/openbanking/guards.js +41 -0
- package/dist/node/integrations/openbanking/models.js +109 -0
- package/dist/node/integrations/openbanking/openbanking.capability.js +17 -0
- package/dist/node/integrations/openbanking/openbanking.feature.js +34 -0
- package/dist/node/integrations/openbanking/telemetry.js +50 -0
- package/dist/node/integrations/operations.js +296 -0
- package/dist/node/integrations/providers/analytics-reader.js +0 -0
- package/dist/node/integrations/providers/analytics-writer.js +0 -0
- package/dist/node/integrations/providers/analytics.js +0 -0
- package/dist/node/integrations/providers/calendar.js +0 -0
- package/dist/node/integrations/providers/database.js +0 -0
- package/dist/node/integrations/providers/elevenlabs.js +85 -0
- package/dist/node/integrations/providers/email.js +0 -0
- package/dist/node/integrations/providers/embedding.js +0 -0
- package/dist/node/integrations/providers/fal.js +111 -0
- package/dist/node/integrations/providers/fathom.js +125 -0
- package/dist/node/integrations/providers/fireflies.js +105 -0
- package/dist/node/integrations/providers/gcs-storage.js +96 -0
- package/dist/node/integrations/providers/gmail.js +108 -0
- package/dist/node/integrations/providers/google-calendar.js +91 -0
- package/dist/node/integrations/providers/gradium.js +109 -0
- package/dist/node/integrations/providers/granola.js +106 -0
- package/dist/node/integrations/providers/index.js +2093 -0
- package/dist/node/integrations/providers/jira.js +107 -0
- package/dist/node/integrations/providers/linear.js +106 -0
- package/dist/node/integrations/providers/llm.js +0 -0
- package/dist/node/integrations/providers/meeting-recorder.js +0 -0
- package/dist/node/integrations/providers/mistral.js +93 -0
- package/dist/node/integrations/providers/notion.js +112 -0
- package/dist/node/integrations/providers/openbanking.js +0 -0
- package/dist/node/integrations/providers/payments.js +0 -0
- package/dist/node/integrations/providers/posthog-llm-telemetry.js +175 -0
- package/dist/node/integrations/providers/posthog.js +105 -0
- package/dist/node/integrations/providers/postmark.js +97 -0
- package/dist/node/integrations/providers/powens.js +123 -0
- package/dist/node/integrations/providers/project-management.js +0 -0
- package/dist/node/integrations/providers/qdrant.js +100 -0
- package/dist/node/integrations/providers/registry.js +1877 -0
- package/dist/node/integrations/providers/sms.js +0 -0
- package/dist/node/integrations/providers/storage.js +0 -0
- package/dist/node/integrations/providers/stripe.js +104 -0
- package/dist/node/integrations/providers/supabase-postgres.js +86 -0
- package/dist/node/integrations/providers/supabase-vector.js +106 -0
- package/dist/node/integrations/providers/tldv.js +105 -0
- package/dist/node/integrations/providers/twilio-sms.js +90 -0
- package/dist/node/integrations/providers/vector-store.js +0 -0
- package/dist/node/integrations/providers/voice.js +0 -0
- package/dist/node/integrations/runtime.js +208 -0
- package/dist/node/integrations/secrets/aws-secret-manager.js +345 -0
- package/dist/node/integrations/secrets/env-secret-provider.js +158 -0
- package/dist/node/integrations/secrets/gcp-secret-manager.js +346 -0
- package/dist/node/integrations/secrets/index.js +1128 -0
- package/dist/node/integrations/secrets/manager.js +182 -0
- package/dist/node/integrations/secrets/provider.js +73 -0
- package/dist/node/integrations/secrets/scaleway-secret-manager.js +374 -0
- package/dist/node/integrations/secrets-types.js +0 -0
- package/dist/node/integrations/spec.js +21 -0
- package/package.json +1029 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integrations/spec.ts
|
|
3
|
+
import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
|
|
4
|
+
var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
|
|
5
|
+
|
|
6
|
+
class IntegrationSpecRegistry extends SpecContractRegistry {
|
|
7
|
+
constructor(items) {
|
|
8
|
+
super("integration", items);
|
|
9
|
+
}
|
|
10
|
+
getByCategory(category) {
|
|
11
|
+
return this.list().filter((spec) => spec.meta.category === category);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function makeIntegrationSpecKey(meta) {
|
|
15
|
+
return integrationKey(meta);
|
|
16
|
+
}
|
|
17
|
+
var defineIntegration = (spec) => spec;
|
|
18
|
+
|
|
19
|
+
// src/integrations/providers/jira.ts
|
|
20
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
21
|
+
var jiraIntegrationSpec = defineIntegration({
|
|
22
|
+
meta: {
|
|
23
|
+
key: "project-management.jira",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
category: "project-management",
|
|
26
|
+
title: "Jira Cloud",
|
|
27
|
+
description: "Jira Cloud integration for creating and tracking work items.",
|
|
28
|
+
domain: "productivity",
|
|
29
|
+
owners: ["@platform.integrations"],
|
|
30
|
+
tags: ["project-management", "jira"],
|
|
31
|
+
stability: StabilityEnum.Beta
|
|
32
|
+
},
|
|
33
|
+
supportedModes: ["managed", "byok"],
|
|
34
|
+
capabilities: {
|
|
35
|
+
provides: [{ key: "project-management.work-items", version: "1.0.0" }]
|
|
36
|
+
},
|
|
37
|
+
configSchema: {
|
|
38
|
+
schema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
required: ["siteUrl"],
|
|
41
|
+
properties: {
|
|
42
|
+
siteUrl: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Jira Cloud site URL (e.g., https://acme.atlassian.net)."
|
|
45
|
+
},
|
|
46
|
+
projectKey: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Default Jira project key for new issues."
|
|
49
|
+
},
|
|
50
|
+
issueType: {
|
|
51
|
+
type: "string",
|
|
52
|
+
description: "Default Jira issue type (e.g., Task, Story)."
|
|
53
|
+
},
|
|
54
|
+
defaultLabels: {
|
|
55
|
+
type: "array",
|
|
56
|
+
items: { type: "string" },
|
|
57
|
+
description: "Labels applied to each issue by default."
|
|
58
|
+
},
|
|
59
|
+
issueTypeMap: {
|
|
60
|
+
type: "object",
|
|
61
|
+
additionalProperties: { type: "string" },
|
|
62
|
+
description: "Optional mapping from work item types to Jira issue types."
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
example: {
|
|
67
|
+
siteUrl: "https://acme.atlassian.net",
|
|
68
|
+
projectKey: "PM",
|
|
69
|
+
issueType: "Task"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
secretSchema: {
|
|
73
|
+
schema: {
|
|
74
|
+
type: "object",
|
|
75
|
+
required: ["email", "apiToken"],
|
|
76
|
+
properties: {
|
|
77
|
+
email: {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "Jira account email used for API token auth."
|
|
80
|
+
},
|
|
81
|
+
apiToken: {
|
|
82
|
+
type: "string",
|
|
83
|
+
description: "Jira Cloud API token for the account."
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
example: {
|
|
88
|
+
email: "user@acme.com",
|
|
89
|
+
apiToken: "jira_api_token"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
healthCheck: {
|
|
93
|
+
method: "custom",
|
|
94
|
+
timeoutMs: 4000
|
|
95
|
+
},
|
|
96
|
+
docsUrl: "https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/",
|
|
97
|
+
constraints: {},
|
|
98
|
+
byokSetup: {
|
|
99
|
+
setupInstructions: "Create a Jira API token and store it with the associated account email."
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
function registerJiraIntegration(registry) {
|
|
103
|
+
return registry.register(jiraIntegrationSpec);
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
registerJiraIntegration,
|
|
107
|
+
jiraIntegrationSpec
|
|
108
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integrations/spec.ts
|
|
3
|
+
import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
|
|
4
|
+
var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
|
|
5
|
+
|
|
6
|
+
class IntegrationSpecRegistry extends SpecContractRegistry {
|
|
7
|
+
constructor(items) {
|
|
8
|
+
super("integration", items);
|
|
9
|
+
}
|
|
10
|
+
getByCategory(category) {
|
|
11
|
+
return this.list().filter((spec) => spec.meta.category === category);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function makeIntegrationSpecKey(meta) {
|
|
15
|
+
return integrationKey(meta);
|
|
16
|
+
}
|
|
17
|
+
var defineIntegration = (spec) => spec;
|
|
18
|
+
|
|
19
|
+
// src/integrations/providers/linear.ts
|
|
20
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
21
|
+
var linearIntegrationSpec = defineIntegration({
|
|
22
|
+
meta: {
|
|
23
|
+
key: "project-management.linear",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
category: "project-management",
|
|
26
|
+
title: "Linear",
|
|
27
|
+
description: "Linear integration for issue tracking and project management workflows.",
|
|
28
|
+
domain: "productivity",
|
|
29
|
+
owners: ["@platform.integrations"],
|
|
30
|
+
tags: ["project-management", "linear"],
|
|
31
|
+
stability: StabilityEnum.Beta
|
|
32
|
+
},
|
|
33
|
+
supportedModes: ["managed", "byok"],
|
|
34
|
+
capabilities: {
|
|
35
|
+
provides: [{ key: "project-management.work-items", version: "1.0.0" }]
|
|
36
|
+
},
|
|
37
|
+
configSchema: {
|
|
38
|
+
schema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
required: ["teamId"],
|
|
41
|
+
properties: {
|
|
42
|
+
teamId: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Linear team ID that owns created issues."
|
|
45
|
+
},
|
|
46
|
+
projectId: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Optional default project ID for new issues."
|
|
49
|
+
},
|
|
50
|
+
stateId: {
|
|
51
|
+
type: "string",
|
|
52
|
+
description: "Optional default workflow state ID."
|
|
53
|
+
},
|
|
54
|
+
assigneeId: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "Optional default assignee ID."
|
|
57
|
+
},
|
|
58
|
+
labelIds: {
|
|
59
|
+
type: "array",
|
|
60
|
+
items: { type: "string" },
|
|
61
|
+
description: "Optional label IDs applied to each issue."
|
|
62
|
+
},
|
|
63
|
+
tagLabelMap: {
|
|
64
|
+
type: "object",
|
|
65
|
+
additionalProperties: { type: "string" },
|
|
66
|
+
description: "Optional mapping of tags to Linear label IDs (tag -> labelId)."
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
example: {
|
|
71
|
+
teamId: "team_123",
|
|
72
|
+
projectId: "proj_456",
|
|
73
|
+
labelIds: ["label_1", "label_2"]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
secretSchema: {
|
|
77
|
+
schema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
required: ["apiKey"],
|
|
80
|
+
properties: {
|
|
81
|
+
apiKey: {
|
|
82
|
+
type: "string",
|
|
83
|
+
description: "Linear API key (personal or service token)."
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
example: {
|
|
88
|
+
apiKey: "lin_api_key"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
healthCheck: {
|
|
92
|
+
method: "custom",
|
|
93
|
+
timeoutMs: 4000
|
|
94
|
+
},
|
|
95
|
+
docsUrl: "https://developers.linear.app",
|
|
96
|
+
constraints: {},
|
|
97
|
+
byokSetup: {
|
|
98
|
+
setupInstructions: "Create a Linear API key with issue:write permission and store it as a secret."
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
function registerLinearIntegration(registry) {
|
|
102
|
+
return registry.register(linearIntegrationSpec);
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
registerLinearIntegration,
|
|
106
|
+
linearIntegrationSpec
|
|
107
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export type LLMRole = 'system' | 'user' | 'assistant' | 'tool';
|
|
2
|
+
export interface LLMTextPart {
|
|
3
|
+
type: 'text';
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LLMToolCallPart {
|
|
7
|
+
type: 'tool-call';
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
arguments: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LLMToolResultPart {
|
|
13
|
+
type: 'tool-result';
|
|
14
|
+
toolCallId: string;
|
|
15
|
+
output: string;
|
|
16
|
+
}
|
|
17
|
+
export type LLMContentPart = LLMTextPart | LLMToolCallPart | LLMToolResultPart;
|
|
18
|
+
export interface LLMMessage {
|
|
19
|
+
role: LLMRole;
|
|
20
|
+
content: LLMContentPart[];
|
|
21
|
+
name?: string;
|
|
22
|
+
toolCallId?: string;
|
|
23
|
+
metadata?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
export interface LLMToolDefinition {
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
inputSchema: unknown;
|
|
29
|
+
}
|
|
30
|
+
export interface LLMTokenUsage {
|
|
31
|
+
promptTokens: number;
|
|
32
|
+
completionTokens: number;
|
|
33
|
+
totalTokens: number;
|
|
34
|
+
}
|
|
35
|
+
export interface LLMChatOptions {
|
|
36
|
+
model?: string;
|
|
37
|
+
temperature?: number;
|
|
38
|
+
topP?: number;
|
|
39
|
+
maxOutputTokens?: number;
|
|
40
|
+
stopSequences?: string[];
|
|
41
|
+
responseFormat?: 'text' | 'json';
|
|
42
|
+
tools?: LLMToolDefinition[];
|
|
43
|
+
userId?: string;
|
|
44
|
+
metadata?: Record<string, string>;
|
|
45
|
+
timeoutMs?: number;
|
|
46
|
+
signal?: AbortSignal;
|
|
47
|
+
}
|
|
48
|
+
export interface LLMResponse {
|
|
49
|
+
message: LLMMessage;
|
|
50
|
+
usage?: LLMTokenUsage;
|
|
51
|
+
finishReason?: 'stop' | 'length' | 'tool_call' | 'content_filter';
|
|
52
|
+
raw?: unknown;
|
|
53
|
+
}
|
|
54
|
+
export type LLMStreamChunk = {
|
|
55
|
+
type: 'message_delta';
|
|
56
|
+
delta: LLMContentPart;
|
|
57
|
+
index: number;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'tool_call';
|
|
60
|
+
call: LLMToolCallPart;
|
|
61
|
+
index: number;
|
|
62
|
+
} | {
|
|
63
|
+
type: 'usage';
|
|
64
|
+
usage: LLMTokenUsage;
|
|
65
|
+
} | {
|
|
66
|
+
type: 'error';
|
|
67
|
+
error: Error;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'end';
|
|
70
|
+
response: LLMResponse;
|
|
71
|
+
};
|
|
72
|
+
export interface TokenCountResult {
|
|
73
|
+
promptTokens: number;
|
|
74
|
+
}
|
|
75
|
+
export interface LLMProvider {
|
|
76
|
+
chat(messages: LLMMessage[], options?: LLMChatOptions): Promise<LLMResponse>;
|
|
77
|
+
stream(messages: LLMMessage[], options?: LLMChatOptions): AsyncIterable<LLMStreamChunk>;
|
|
78
|
+
countTokens(messages: LLMMessage[]): Promise<TokenCountResult>;
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export interface MeetingParticipant {
|
|
2
|
+
id?: string;
|
|
3
|
+
externalId?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
role?: string;
|
|
7
|
+
isExternal?: boolean;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export interface MeetingRecord {
|
|
11
|
+
id: string;
|
|
12
|
+
tenantId: string;
|
|
13
|
+
connectionId: string;
|
|
14
|
+
externalId: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
summary?: string;
|
|
17
|
+
organizer?: MeetingParticipant;
|
|
18
|
+
invitees?: MeetingParticipant[];
|
|
19
|
+
participants?: MeetingParticipant[];
|
|
20
|
+
scheduledStartAt?: string;
|
|
21
|
+
scheduledEndAt?: string;
|
|
22
|
+
recordingStartAt?: string;
|
|
23
|
+
recordingEndAt?: string;
|
|
24
|
+
durationSeconds?: number;
|
|
25
|
+
meetingUrl?: string;
|
|
26
|
+
recordingUrl?: string;
|
|
27
|
+
shareUrl?: string;
|
|
28
|
+
sourcePlatform?: string;
|
|
29
|
+
language?: string;
|
|
30
|
+
transcriptAvailable?: boolean;
|
|
31
|
+
createdAt?: string;
|
|
32
|
+
updatedAt?: string;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
export interface MeetingTranscriptSegment {
|
|
36
|
+
index?: number;
|
|
37
|
+
speakerId?: string;
|
|
38
|
+
speakerName?: string;
|
|
39
|
+
speakerEmail?: string;
|
|
40
|
+
text: string;
|
|
41
|
+
startTimeMs?: number;
|
|
42
|
+
endTimeMs?: number;
|
|
43
|
+
startTime?: string;
|
|
44
|
+
endTime?: string;
|
|
45
|
+
confidence?: number;
|
|
46
|
+
metadata?: Record<string, unknown>;
|
|
47
|
+
}
|
|
48
|
+
export interface MeetingTranscriptRecord {
|
|
49
|
+
id: string;
|
|
50
|
+
meetingId: string;
|
|
51
|
+
tenantId: string;
|
|
52
|
+
connectionId: string;
|
|
53
|
+
externalId?: string;
|
|
54
|
+
format?: string;
|
|
55
|
+
text?: string;
|
|
56
|
+
segments?: MeetingTranscriptSegment[];
|
|
57
|
+
language?: string;
|
|
58
|
+
sourceUrl?: string;
|
|
59
|
+
generatedAt?: string;
|
|
60
|
+
metadata?: Record<string, unknown>;
|
|
61
|
+
raw?: unknown;
|
|
62
|
+
}
|
|
63
|
+
export interface MeetingRecorderListMeetingsParams {
|
|
64
|
+
tenantId: string;
|
|
65
|
+
connectionId?: string;
|
|
66
|
+
from?: string;
|
|
67
|
+
to?: string;
|
|
68
|
+
cursor?: string;
|
|
69
|
+
pageSize?: number;
|
|
70
|
+
query?: string;
|
|
71
|
+
organizerEmail?: string;
|
|
72
|
+
participantEmail?: string;
|
|
73
|
+
includeTranscript?: boolean;
|
|
74
|
+
includeSummary?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface MeetingRecorderListMeetingsResult {
|
|
77
|
+
meetings: MeetingRecord[];
|
|
78
|
+
nextCursor?: string;
|
|
79
|
+
hasMore?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface MeetingRecorderGetMeetingParams {
|
|
82
|
+
tenantId: string;
|
|
83
|
+
meetingId: string;
|
|
84
|
+
connectionId?: string;
|
|
85
|
+
includeTranscript?: boolean;
|
|
86
|
+
includeSummary?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface MeetingRecorderGetTranscriptParams {
|
|
89
|
+
tenantId: string;
|
|
90
|
+
meetingId: string;
|
|
91
|
+
connectionId?: string;
|
|
92
|
+
includeSegments?: boolean;
|
|
93
|
+
format?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface MeetingRecorderWebhookRequest {
|
|
96
|
+
headers: Record<string, string | string[] | undefined>;
|
|
97
|
+
rawBody: string;
|
|
98
|
+
parsedBody?: unknown;
|
|
99
|
+
}
|
|
100
|
+
export interface MeetingRecorderWebhookEvent {
|
|
101
|
+
providerKey: string;
|
|
102
|
+
eventType?: string;
|
|
103
|
+
meetingId?: string;
|
|
104
|
+
transcriptId?: string;
|
|
105
|
+
recordingId?: string;
|
|
106
|
+
receivedAt?: string;
|
|
107
|
+
verified?: boolean;
|
|
108
|
+
payload?: unknown;
|
|
109
|
+
metadata?: Record<string, unknown>;
|
|
110
|
+
}
|
|
111
|
+
export interface MeetingRecorderWebhookRegistration {
|
|
112
|
+
url: string;
|
|
113
|
+
includeTranscript?: boolean;
|
|
114
|
+
includeSummary?: boolean;
|
|
115
|
+
includeActionItems?: boolean;
|
|
116
|
+
includeCrmMatches?: boolean;
|
|
117
|
+
triggeredFor?: string[];
|
|
118
|
+
}
|
|
119
|
+
export interface MeetingRecorderProvider {
|
|
120
|
+
listMeetings(params: MeetingRecorderListMeetingsParams): Promise<MeetingRecorderListMeetingsResult>;
|
|
121
|
+
getMeeting(params: MeetingRecorderGetMeetingParams): Promise<MeetingRecord>;
|
|
122
|
+
getTranscript(params: MeetingRecorderGetTranscriptParams): Promise<MeetingTranscriptRecord>;
|
|
123
|
+
parseWebhook?(request: MeetingRecorderWebhookRequest): Promise<MeetingRecorderWebhookEvent>;
|
|
124
|
+
verifyWebhook?(request: MeetingRecorderWebhookRequest): Promise<boolean>;
|
|
125
|
+
registerWebhook?(registration: MeetingRecorderWebhookRegistration): Promise<{
|
|
126
|
+
id: string;
|
|
127
|
+
secret?: string;
|
|
128
|
+
}>;
|
|
129
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integrations/spec.ts
|
|
3
|
+
import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
|
|
4
|
+
var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
|
|
5
|
+
|
|
6
|
+
class IntegrationSpecRegistry extends SpecContractRegistry {
|
|
7
|
+
constructor(items) {
|
|
8
|
+
super("integration", items);
|
|
9
|
+
}
|
|
10
|
+
getByCategory(category) {
|
|
11
|
+
return this.list().filter((spec) => spec.meta.category === category);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function makeIntegrationSpecKey(meta) {
|
|
15
|
+
return integrationKey(meta);
|
|
16
|
+
}
|
|
17
|
+
var defineIntegration = (spec) => spec;
|
|
18
|
+
|
|
19
|
+
// src/integrations/providers/mistral.ts
|
|
20
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
21
|
+
var mistralIntegrationSpec = defineIntegration({
|
|
22
|
+
meta: {
|
|
23
|
+
key: "ai-llm.mistral",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
category: "ai-llm",
|
|
26
|
+
title: "Mistral Large Language Model",
|
|
27
|
+
description: "Mistral integration providing chat completions and embedding generation.",
|
|
28
|
+
domain: "ai",
|
|
29
|
+
owners: ["platform.ai"],
|
|
30
|
+
tags: ["ai", "llm", "embeddings"],
|
|
31
|
+
stability: StabilityEnum.Experimental
|
|
32
|
+
},
|
|
33
|
+
supportedModes: ["managed", "byok"],
|
|
34
|
+
capabilities: {
|
|
35
|
+
provides: [
|
|
36
|
+
{ key: "ai.chat", version: "1.0.0" },
|
|
37
|
+
{ key: "ai.embeddings", version: "1.0.0" }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
configSchema: {
|
|
41
|
+
schema: {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
model: {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "Default chat completion model (e.g., mistral-large-latest)."
|
|
47
|
+
},
|
|
48
|
+
embeddingModel: {
|
|
49
|
+
type: "string",
|
|
50
|
+
description: "Embedding model identifier."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
example: {
|
|
55
|
+
model: "mistral-large-latest",
|
|
56
|
+
embeddingModel: "mistral-embed"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
secretSchema: {
|
|
60
|
+
schema: {
|
|
61
|
+
type: "object",
|
|
62
|
+
required: ["apiKey"],
|
|
63
|
+
properties: {
|
|
64
|
+
apiKey: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "Mistral API key with access to chat and embeddings endpoints."
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
example: {
|
|
71
|
+
apiKey: "mistral-***"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
healthCheck: {
|
|
75
|
+
method: "custom",
|
|
76
|
+
timeoutMs: 5000
|
|
77
|
+
},
|
|
78
|
+
docsUrl: "https://docs.mistral.ai/platform/endpoints",
|
|
79
|
+
constraints: {
|
|
80
|
+
rateLimit: {
|
|
81
|
+
rpm: 600
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
byokSetup: {
|
|
85
|
+
setupInstructions: "Generate an API key within the Mistral console and ensure the selected models are enabled for the account."
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
function registerMistralIntegration(registry) {
|
|
89
|
+
return registry.register(mistralIntegrationSpec);
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
registerMistralIntegration,
|
|
93
|
+
mistralIntegrationSpec
|
|
94
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integrations/spec.ts
|
|
3
|
+
import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
|
|
4
|
+
var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
|
|
5
|
+
|
|
6
|
+
class IntegrationSpecRegistry extends SpecContractRegistry {
|
|
7
|
+
constructor(items) {
|
|
8
|
+
super("integration", items);
|
|
9
|
+
}
|
|
10
|
+
getByCategory(category) {
|
|
11
|
+
return this.list().filter((spec) => spec.meta.category === category);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function makeIntegrationSpecKey(meta) {
|
|
15
|
+
return integrationKey(meta);
|
|
16
|
+
}
|
|
17
|
+
var defineIntegration = (spec) => spec;
|
|
18
|
+
|
|
19
|
+
// src/integrations/providers/notion.ts
|
|
20
|
+
import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
|
|
21
|
+
var notionIntegrationSpec = defineIntegration({
|
|
22
|
+
meta: {
|
|
23
|
+
key: "project-management.notion",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
category: "project-management",
|
|
26
|
+
title: "Notion",
|
|
27
|
+
description: "Notion integration for creating shared project summaries and task entries.",
|
|
28
|
+
domain: "productivity",
|
|
29
|
+
owners: ["@platform.integrations"],
|
|
30
|
+
tags: ["project-management", "notion"],
|
|
31
|
+
stability: StabilityEnum.Beta
|
|
32
|
+
},
|
|
33
|
+
supportedModes: ["managed", "byok"],
|
|
34
|
+
capabilities: {
|
|
35
|
+
provides: [{ key: "project-management.work-items", version: "1.0.0" }]
|
|
36
|
+
},
|
|
37
|
+
configSchema: {
|
|
38
|
+
schema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
databaseId: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Optional Notion database ID to store tasks."
|
|
44
|
+
},
|
|
45
|
+
summaryParentPageId: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "Optional parent page ID for summary pages."
|
|
48
|
+
},
|
|
49
|
+
titleProperty: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: 'Database title property name (defaults to "Name").'
|
|
52
|
+
},
|
|
53
|
+
statusProperty: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Database status/select property name."
|
|
56
|
+
},
|
|
57
|
+
priorityProperty: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Database priority/select property name."
|
|
60
|
+
},
|
|
61
|
+
tagsProperty: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Database multi-select tags property name."
|
|
64
|
+
},
|
|
65
|
+
dueDateProperty: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Database date property name for due dates."
|
|
68
|
+
},
|
|
69
|
+
descriptionProperty: {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "Database rich-text property for descriptions."
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
example: {
|
|
76
|
+
databaseId: "xxxxxxxxxxxxxxxx",
|
|
77
|
+
summaryParentPageId: "yyyyyyyyyyyyyyyy",
|
|
78
|
+
titleProperty: "Name",
|
|
79
|
+
statusProperty: "Status"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
secretSchema: {
|
|
83
|
+
schema: {
|
|
84
|
+
type: "object",
|
|
85
|
+
required: ["apiKey"],
|
|
86
|
+
properties: {
|
|
87
|
+
apiKey: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Notion integration secret token."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
example: {
|
|
94
|
+
apiKey: "secret_notion_token"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
healthCheck: {
|
|
98
|
+
method: "custom",
|
|
99
|
+
timeoutMs: 4000
|
|
100
|
+
},
|
|
101
|
+
docsUrl: "https://developers.notion.com",
|
|
102
|
+
constraints: {},
|
|
103
|
+
byokSetup: {
|
|
104
|
+
setupInstructions: "Create a Notion internal integration, share the target database/page with it, and store the secret token."
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
function registerNotionIntegration(registry) {
|
|
108
|
+
return registry.register(notionIntegrationSpec);
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
registerNotionIntegration,
|
|
112
|
+
notionIntegrationSpec
|
|
113
|
+
};
|