@vibesdotdev/integrations-pagerduty 0.0.0-stage → 1.0.0-rc.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.
Files changed (51) hide show
  1. package/LICENSE +126 -0
  2. package/README.md +30 -2
  3. package/dist/client/helper.d.ts +20 -0
  4. package/dist/client/helper.d.ts.map +1 -0
  5. package/dist/client/helper.js +21 -0
  6. package/dist/client/helper.js.map +1 -0
  7. package/dist/client/index.d.ts +3 -0
  8. package/dist/client/index.d.ts.map +1 -0
  9. package/dist/client/index.js +3 -0
  10. package/dist/client/index.js.map +1 -0
  11. package/dist/client/runtime-client.d.ts +29 -0
  12. package/dist/client/runtime-client.d.ts.map +1 -0
  13. package/dist/client/runtime-client.js +60 -0
  14. package/dist/client/runtime-client.js.map +1 -0
  15. package/dist/index.d.ts +18 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +23 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/integrations-pagerduty.plugin.d.ts +18 -0
  20. package/dist/integrations-pagerduty.plugin.d.ts.map +1 -0
  21. package/dist/integrations-pagerduty.plugin.js +42 -0
  22. package/dist/integrations-pagerduty.plugin.js.map +1 -0
  23. package/dist/pagerduty/configuration.d.ts +6 -0
  24. package/dist/pagerduty/configuration.d.ts.map +1 -0
  25. package/dist/pagerduty/configuration.js +16 -0
  26. package/dist/pagerduty/configuration.js.map +1 -0
  27. package/dist/pagerduty/index.d.ts +9 -0
  28. package/dist/pagerduty/index.d.ts.map +1 -0
  29. package/dist/pagerduty/index.js +8 -0
  30. package/dist/pagerduty/index.js.map +1 -0
  31. package/dist/pagerduty/pagerduty-connector.d.ts +16 -0
  32. package/dist/pagerduty/pagerduty-connector.d.ts.map +1 -0
  33. package/dist/pagerduty/pagerduty-connector.js +80 -0
  34. package/dist/pagerduty/pagerduty-connector.js.map +1 -0
  35. package/dist/pagerduty/pagerduty-implementation.d.ts +8 -0
  36. package/dist/pagerduty/pagerduty-implementation.d.ts.map +1 -0
  37. package/dist/pagerduty/pagerduty-implementation.js +25 -0
  38. package/dist/pagerduty/pagerduty-implementation.js.map +1 -0
  39. package/dist/pagerduty/runtime-context.d.ts +7 -0
  40. package/dist/pagerduty/runtime-context.d.ts.map +1 -0
  41. package/dist/pagerduty/runtime-context.js +34 -0
  42. package/dist/pagerduty/runtime-context.js.map +1 -0
  43. package/dist/pagerduty/system.integration.pagerduty.descriptor.d.ts +69 -0
  44. package/dist/pagerduty/system.integration.pagerduty.descriptor.d.ts.map +1 -0
  45. package/dist/pagerduty/system.integration.pagerduty.descriptor.js +53 -0
  46. package/dist/pagerduty/system.integration.pagerduty.descriptor.js.map +1 -0
  47. package/dist/schemas/pagerduty.d.ts +146 -0
  48. package/dist/schemas/pagerduty.d.ts.map +1 -0
  49. package/dist/schemas/pagerduty.js +58 -0
  50. package/dist/schemas/pagerduty.js.map +1 -0
  51. package/package.json +84 -4
package/LICENSE ADDED
@@ -0,0 +1,126 @@
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor: VIBES DEV LLC
6
+ Licensed Work: @vibesdotdev/integrations-pagerduty
7
+ The Licensed Work is (c) 2026 VIBES DEV LLC.
8
+ Additional Use Grant: In this grant, "Vibes Platform" means the hosted services VIBES DEV LLC
9
+ operates at vibes.dev and its subdomains.
10
+
11
+ You may make production use of the Licensed Work, including commercial
12
+ use, subject to the limits below. Permitted production use includes:
13
+ building, operating and selling your own applications, agents and services
14
+ on or with the Vibes Platform; self-hosting the Licensed Work for use inside
15
+ your own organization; and providing consulting, integration or development
16
+ services to clients who build on the Vibes Platform.
17
+
18
+ The production use permitted above does not include use that:
19
+
20
+ (a) offers third parties a hosted, managed or embedded service that
21
+ substitutes for the Vibes Platform or a material part of it (including
22
+ agent hosting; fleet, sandbox or container provisioning; package
23
+ registry; source hosting and continuous integration; and managed AI,
24
+ storage, secrets or messaging), where the Licensed Work provides a
25
+ material part of that service's value and that service earns more than
26
+ US$1,000,000 in gross revenue in any twelve-month period;
27
+ (b) sells, rents, sublicenses or white-labels the Licensed Work, or access
28
+ to Vibes Platform functionality, as a product in its own right;
29
+ (c) removes, disables or works around entitlement checks, usage metering,
30
+ quotas or plan limits, or reaches Vibes Platform features the user's
31
+ account is not entitled to;
32
+ (d) scrapes, bulk-exports or harvests data or content from the Vibes
33
+ Platform or its users other than through documented interfaces and
34
+ within their terms, or uses outputs or data obtained from the Vibes
35
+ Platform to train or improve a product that competes with it;
36
+ (e) violates applicable law, infringes anyone's rights, commits fraud or
37
+ deception, conducts unlawful surveillance or harassment, distributes
38
+ malware, or accesses systems without authorization; or
39
+ (f) violates applicable antitrust or competition law.
40
+
41
+ A written permission from the Licensor extends this grant.
42
+ Change Date: Four years from the date the Licensed Work is published.
43
+ Change License: MIT
44
+
45
+ For information about alternative licensing arrangements for the Licensed Work,
46
+ contact VIBES DEV LLC through https://vibes.dev.
47
+
48
+ Notice
49
+
50
+ The Business Source License (this document, or the "License") is not an Open
51
+ Source license. However, the Licensed Work will eventually be made available
52
+ under an Open Source License, as stated in this License.
53
+
54
+ -----------------------------------------------------------------------------
55
+
56
+ Business Source License 1.1
57
+
58
+ License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
59
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
60
+
61
+ Terms
62
+
63
+ The Licensor hereby grants you the right to copy, modify, create derivative
64
+ works, redistribute, and make non-production use of the Licensed Work. The
65
+ Licensor may make an Additional Use Grant, above, permitting limited
66
+ production use.
67
+
68
+ Effective on the Change Date, or the fourth anniversary of the first publicly
69
+ available distribution of a specific version of the Licensed Work under this
70
+ License, whichever comes first, the Licensor hereby grants you rights under
71
+ the terms of the Change License, and the rights granted in the paragraph
72
+ above terminate.
73
+
74
+ If your use of the Licensed Work does not comply with the requirements
75
+ currently in effect as described in this License, you must purchase a
76
+ commercial license from the Licensor, its affiliated entities, or authorized
77
+ resellers, or you must refrain from using the Licensed Work.
78
+
79
+ All copies of the original and modified Licensed Work, and derivative works
80
+ of the Licensed Work, are subject to this License. This License applies
81
+ separately for each version of the Licensed Work and the Change Date may vary
82
+ for each version of the Licensed Work released by Licensor.
83
+
84
+ You must conspicuously display this License on each original or modified copy
85
+ of the Licensed Work. If you receive the Licensed Work in original or
86
+ modified form from a third party, the terms and conditions set forth in this
87
+ License apply to your use of that work.
88
+
89
+ Any use of the Licensed Work in violation of this License will automatically
90
+ terminate your rights under this License for the current and all other
91
+ versions of the Licensed Work.
92
+
93
+ This License does not grant you any right in any trademark or logo of
94
+ Licensor or its affiliates (provided that you may use a trademark or logo of
95
+ Licensor as expressly required by this License).
96
+
97
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
98
+ AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
99
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
100
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
101
+ TITLE.
102
+
103
+ MariaDB hereby grants you permission to use this License’s text to license
104
+ your works, and to refer to it using the trademark “Business Source License”,
105
+ as long as you comply with the Covenants of Licensor below.
106
+
107
+ Covenants of Licensor
108
+
109
+ In consideration of the right to use this License’s text and the “Business
110
+ Source License” name and trademark, Licensor covenants to MariaDB, and to all
111
+ other recipients of the licensed work to be provided by Licensor:
112
+
113
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
114
+ or a license that is compatible with GPL Version 2.0 or a later version,
115
+ where “compatible” means that software provided under the Change License can
116
+ be included in a program with software provided under GPL Version 2.0 or a
117
+ later version. Licensor may specify additional Change Licenses without
118
+ limitation.
119
+
120
+ 2. To either: (a) specify an additional grant of rights to use that does not
121
+ impose any additional restriction on the right granted in this License, as
122
+ the Additional Use Grant; or (b) insert the text “None”.
123
+
124
+ 3. To specify a Change Date.
125
+
126
+ 4. Not to modify this License in any other way.
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
- # Temporary Holding Version
1
+ # PagerDuty integration
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Compose `@vibesdotdev/integrations-pagerduty/plugin` into the runtime, then
4
+ resolve the semantic client:
5
+
6
+ ```ts
7
+ import { getVibesPagerDutyClient } from '@vibesdotdev/integrations-pagerduty/client';
8
+
9
+ const pagerduty = await getVibesPagerDutyClient(runtime);
10
+ const incident = await pagerduty.incidents.trigger({
11
+ summary: 'Checkout unavailable',
12
+ source: 'checkout-service',
13
+ severity: 'critical'
14
+ });
15
+ await pagerduty.incidents.acknowledge(incident.dedupKey);
16
+ await pagerduty.incidents.resolve(incident.dedupKey);
17
+ ```
18
+
19
+ Consumer hosts supply authenticated user context and compose the Platform
20
+ internal API's service origin and credential. Provider hosts compose the
21
+ Integrations kind, Logging, Storage and `system/settings-reader`; routing
22
+ credentials resolve through the inherited integration owner, using an
23
+ organization credential or the `PAGERDUTY_ROUTING_KEY` secret reference.
24
+
25
+ The root exports schemas and public clients/helpers; concrete provider access
26
+ is through `./pagerduty`. Inputs and responses are schema validated. Failures
27
+ use value-free `CapabilityError` codes and reasons. Missing optional vendor
28
+ response strings normalize to empty strings.
29
+
30
+ See [SPEC.md](./SPEC.md) for exports, composition, refusal reasons and proof.
31
+ Run `bun run check`, `bun run test` and `bun run build` from this directory.
@@ -0,0 +1,20 @@
1
+ import type { VibesRuntime } from '@vibesdotdev/kernel';
2
+ import type { PagerDutyClient } from './runtime-client.ts';
3
+ /**
4
+ * Resolve the canonical `PagerDutyClient`.
5
+ *
6
+ * Equivalent to `runtime.query('runtime/client').withId('pagerduty').resolve()`.
7
+ * Requires the integrations-pagerduty plugin to be composed into the runtime.
8
+ *
9
+ * ```ts
10
+ * import { getVibesPagerDutyClient } from '@vibesdotdev/integrations-pagerduty/client';
11
+ * const pagerduty = await getVibesPagerDutyClient(runtime);
12
+ * const { dedupKey } = await pagerduty.incidents.trigger({
13
+ * summary: 'Checkout latency p99 > 2s',
14
+ * source: 'checkout-service',
15
+ * severity: 'error'
16
+ * });
17
+ * ```
18
+ */
19
+ export declare function getVibesPagerDutyClient(runtime: VibesRuntime): Promise<PagerDutyClient>;
20
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../src/client/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAE7F"}
@@ -0,0 +1,21 @@
1
+ import { getVibesClient } from '@vibesdotdev/kernel/client';
2
+ /**
3
+ * Resolve the canonical `PagerDutyClient`.
4
+ *
5
+ * Equivalent to `runtime.query('runtime/client').withId('pagerduty').resolve()`.
6
+ * Requires the integrations-pagerduty plugin to be composed into the runtime.
7
+ *
8
+ * ```ts
9
+ * import { getVibesPagerDutyClient } from '@vibesdotdev/integrations-pagerduty/client';
10
+ * const pagerduty = await getVibesPagerDutyClient(runtime);
11
+ * const { dedupKey } = await pagerduty.incidents.trigger({
12
+ * summary: 'Checkout latency p99 > 2s',
13
+ * source: 'checkout-service',
14
+ * severity: 'error'
15
+ * });
16
+ * ```
17
+ */
18
+ export async function getVibesPagerDutyClient(runtime) {
19
+ return getVibesClient('pagerduty', runtime);
20
+ }
21
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/client/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,OAAqB;IAClE,OAAO,cAAc,CAAkB,WAAW,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { PagerDutyClient } from './runtime-client.ts';
2
+ export { getVibesPagerDutyClient } from './helper.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { PagerDutyClient } from "./runtime-client.js";
2
+ export { getVibesPagerDutyClient } from "./helper.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { type KindContext, type VibesRuntime } from '@vibesdotdev/kernel';
2
+ import { BaseRuntimeClient, type RuntimeClientDescriptor } from '@vibesdotdev/kernel/client';
3
+ import { type PagerDutyClientContext, type TriggerIncidentOptions, type PagerDutyEnqueueResult } from '../schemas/pagerduty.ts';
4
+ export type { PagerDutyClientContext } from '../schemas/pagerduty.ts';
5
+ /** Runtime-owned semantic client over the Platform internal integrations API. */
6
+ export declare class PagerDutyClient extends BaseRuntimeClient {
7
+ readonly incidents: {
8
+ trigger: (options: TriggerIncidentOptions) => Promise<{
9
+ status: string;
10
+ message: string;
11
+ dedupKey: string;
12
+ }>;
13
+ acknowledge: (dedupKey: string) => Promise<{
14
+ status: string;
15
+ message: string;
16
+ dedupKey: string;
17
+ }>;
18
+ resolve: (dedupKey: string) => Promise<{
19
+ status: string;
20
+ message: string;
21
+ dedupKey: string;
22
+ }>;
23
+ };
24
+ private readonly contextOverride;
25
+ constructor(descriptor?: RuntimeClientDescriptor, context?: PagerDutyClientContext | KindContext, runtime?: VibesRuntime);
26
+ get integrationId(): string;
27
+ invoke(operationId: string, args?: unknown): Promise<PagerDutyEnqueueResult>;
28
+ }
29
+ //# sourceMappingURL=runtime-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-client.d.ts","sourceRoot":"","sources":["../../src/client/runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,OAAO,EAGN,KAAK,sBAAsB,EAAE,KAAK,sBAAsB,EAAE,KAAK,sBAAsB,EACrF,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,iFAAiF;AACjF,qBAAa,eAAgB,SAAQ,iBAAiB;IACrD,QAAQ,CAAC,SAAS;2BAWG,sBAAsB;;;;;gCACjB,MAAM;;;;;4BACV,MAAM;;;;;MAbT;IACnB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgC;gBAG/D,UAAU,GAAE,uBAAqE,EACjF,OAAO,CAAC,EAAE,sBAAsB,GAAG,WAAW,EAC9C,OAAO,CAAC,EAAE,YAAY;IAWvB,IAAI,aAAa,IAAI,MAAM,CAAoC;IAEzD,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAwClF"}
@@ -0,0 +1,60 @@
1
+ import { CapabilityError, settle } from '@vibesdotdev/kernel';
2
+ import { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
3
+ import { getVibesPlatformInternalClient } from '@vibesdotdev/platform/internal-api';
4
+ import { admitPagerDutyInput, PagerDutyClientContextSchema, PagerDutyUserIdSchema, PagerDutyOrgIdSchema, PagerDutyOperationSchema, TriggerIncidentOptionsSchema, DedupKeyOptionsSchema, PagerDutyEnqueueResultSchema } from "../schemas/pagerduty.js";
5
+ /** Runtime-owned semantic client over the Platform internal integrations API. */
6
+ export class PagerDutyClient extends BaseRuntimeClient {
7
+ incidents;
8
+ contextOverride;
9
+ constructor(descriptor = { id: 'pagerduty', kind: 'runtime/client' }, context, runtime) {
10
+ super(descriptor, context && 'runtime' in context ? context : undefined, runtime);
11
+ this.contextOverride = context && 'runtime' in context ? null : admitPagerDutyInput(PagerDutyClientContextSchema, context ?? {});
12
+ this.incidents = {
13
+ trigger: (options) => this.invoke('triggerIncident', options),
14
+ acknowledge: (dedupKey) => this.invoke('acknowledgeIncident', { dedupKey }),
15
+ resolve: (dedupKey) => this.invoke('resolveIncident', { dedupKey })
16
+ };
17
+ }
18
+ get integrationId() { return 'integration.pagerduty'; }
19
+ async invoke(operationId, args) {
20
+ const operation = admitPagerDutyInput(PagerDutyOperationSchema, operationId);
21
+ const schema = operation === 'triggerIncident' ? TriggerIncidentOptionsSchema : DedupKeyOptionsSchema;
22
+ const parsedInput = schema.safeParse(args);
23
+ if (!parsedInput.success) {
24
+ throw new CapabilityError('Invalid PagerDuty input.', 'INVALID_INPUT', { reason: 'pagerduty-input-invalid' });
25
+ }
26
+ const input = parsedInput.data;
27
+ const user = await settle(async () => this.contextOverride?.userId ?? await this.runtime.context('userId'));
28
+ const userId = PagerDutyUserIdSchema.safeParse(user.ok ? user.value : undefined);
29
+ if (!userId.success) {
30
+ throw new CapabilityError('PagerDuty requires a user context.', 'UNAVAILABLE', { reason: 'pagerduty-context-missing' });
31
+ }
32
+ const org = await settle(async () => this.contextOverride?.organizationId ?? this.contextOverride?.orgId ?? await this.runtime.context('orgId'));
33
+ if (!org.ok && !(org.cause instanceof Error && CapabilityError.isAbsenceOf(org.cause, 'context', 'orgId'))) {
34
+ throw new CapabilityError('PagerDuty organization context is unavailable.', 'UNAVAILABLE', { reason: 'pagerduty-context-missing' });
35
+ }
36
+ const organizationId = admitPagerDutyInput(PagerDutyOrgIdSchema, org.ok ? org.value : undefined);
37
+ const invoked = await settle(async () => {
38
+ const client = await getVibesPlatformInternalClient(this.runtime);
39
+ return client.integrations.invoke({
40
+ userId: userId.data, organizationId, integrationId: this.integrationId, operationId: operation, args: input
41
+ });
42
+ });
43
+ if (!invoked.ok) {
44
+ throw new CapabilityError('PagerDuty platform request failed.', 'UNAVAILABLE', { reason: 'pagerduty-platform-failed' });
45
+ }
46
+ const result = invoked.value;
47
+ if (!result.ok) {
48
+ throw new CapabilityError('PagerDuty operation refused.', 'UNAVAILABLE', { reason: 'pagerduty-operation-failed' });
49
+ }
50
+ if (result.data === null || result.data === undefined) {
51
+ throw new CapabilityError('PagerDuty result is missing.', 'UNAVAILABLE', { reason: 'pagerduty-result-missing' });
52
+ }
53
+ const parsed = PagerDutyEnqueueResultSchema.safeParse(result.data);
54
+ if (!parsed.success) {
55
+ throw new CapabilityError('Invalid PagerDuty platform result.', 'UNAVAILABLE', { reason: 'pagerduty-platform-failed' });
56
+ }
57
+ return parsed.data;
58
+ }
59
+ }
60
+ //# sourceMappingURL=runtime-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-client.js","sourceRoot":"","sources":["../../src/client/runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAuC,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAgC,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACN,mBAAmB,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,oBAAoB,EAC9F,wBAAwB,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,4BAA4B,EAE3G,MAAM,yBAAyB,CAAC;AAIjC,iFAAiF;AACjF,MAAM,OAAO,eAAgB,SAAQ,iBAAiB;IAC5C,SAAS,CAAC;IACF,eAAe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0 +1,18 @@
1
+ /**
2
+ * @vibesdotdev/integrations-pagerduty
3
+ *
4
+ * PagerDuty integration provider for the Vibes platform.
5
+ * Provides a PagerDuty runtime client for incident-alerting workflows
6
+ * (trigger, acknowledge, resolve alerts via the Events API v2).
7
+ *
8
+ * @module @vibesdotdev/integrations-pagerduty
9
+ */
10
+ export { default as integrationsPagerDutyPlugin } from './integrations-pagerduty.plugin.ts';
11
+ export { default } from './integrations-pagerduty.plugin.ts';
12
+ export { PagerDutyClient, getVibesPagerDutyClient } from './client/index.ts';
13
+ export { default as pagerdutyDescriptor } from './pagerduty/system.integration.pagerduty.descriptor.ts';
14
+ export * from './schemas/pagerduty.ts';
15
+ export { PagerDutyEventsConnector, PAGERDUTY_DEFAULT_BASE_URL } from './pagerduty/pagerduty-connector.ts';
16
+ export type { PagerDutyEnqueueResult, PagerDutySeverity, TriggerIncidentOptions } from './pagerduty/pagerduty-connector.ts';
17
+ export { PAGERDUTY_INTEGRATION_ID, resolvePagerDutyIntegration, resolvePagerDutyConnector } from './pagerduty/runtime-context.ts';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAG7E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAGxG,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACX,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EACN,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,gCAAgC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @vibesdotdev/integrations-pagerduty
3
+ *
4
+ * PagerDuty integration provider for the Vibes platform.
5
+ * Provides a PagerDuty runtime client for incident-alerting workflows
6
+ * (trigger, acknowledge, resolve alerts via the Events API v2).
7
+ *
8
+ * @module @vibesdotdev/integrations-pagerduty
9
+ */
10
+ // Plugin export
11
+ export { default as integrationsPagerDutyPlugin } from "./integrations-pagerduty.plugin.js";
12
+ export { default } from "./integrations-pagerduty.plugin.js";
13
+ // Canonical runtime client (consumer-facing entrypoint)
14
+ export { PagerDutyClient, getVibesPagerDutyClient } from "./client/index.js";
15
+ // PagerDuty descriptor export
16
+ export { default as pagerdutyDescriptor } from "./pagerduty/system.integration.pagerduty.descriptor.js";
17
+ // Provider implementation
18
+ export * from "./schemas/pagerduty.js";
19
+ // Inlined connector + response types
20
+ export { PagerDutyEventsConnector, PAGERDUTY_DEFAULT_BASE_URL } from "./pagerduty/pagerduty-connector.js";
21
+ // Runtime-context helpers (external callers / jobs)
22
+ export { PAGERDUTY_INTEGRATION_ID, resolvePagerDutyIntegration, resolvePagerDutyConnector } from "./pagerduty/runtime-context.js";
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gBAAgB;AAChB,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE7D,wDAAwD;AACxD,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,8BAA8B;AAC9B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAExG,0BAA0B;AAC1B,cAAc,wBAAwB,CAAC;AAEvC,qCAAqC;AACrC,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,oCAAoC,CAAC;AAO5C,oDAAoD;AACpD,OAAO,EACN,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Integrations PagerDuty Plugin
3
+ *
4
+ * Registers two things with the runtime:
5
+ *
6
+ * 1. The `integration/provider` descriptor (id `integration.pagerduty`) +
7
+ * `PagerDutyIntegrationProvider` implementation, which inherits credential
8
+ * resolution from `BaseIntegrationProvider` and dispatches the declared
9
+ * incident-alerting ops to the inlined `PagerDutyEventsConnector`.
10
+ *
11
+ * 2. The canonical `runtime/client` descriptor (id `pagerduty`) +
12
+ * `PagerDutyClient` implementation, which is the consumer-facing typed
13
+ * surface (`pagerduty.incidents.*`). Apps resolve it via
14
+ * `getVibesPagerDutyClient(runtime)` and never reach for the Events API directly.
15
+ */
16
+ export declare const integrationsPagerDutyPlugin: import("@vibesdotdev/kernel").RuntimePlugin;
17
+ export default integrationsPagerDutyPlugin;
18
+ //# sourceMappingURL=integrations-pagerduty.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations-pagerduty.plugin.d.ts","sourceRoot":"","sources":["../src/integrations-pagerduty.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,eAAO,MAAM,2BAA2B,6CAyBtC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Integrations PagerDuty Plugin
3
+ *
4
+ * Registers two things with the runtime:
5
+ *
6
+ * 1. The `integration/provider` descriptor (id `integration.pagerduty`) +
7
+ * `PagerDutyIntegrationProvider` implementation, which inherits credential
8
+ * resolution from `BaseIntegrationProvider` and dispatches the declared
9
+ * incident-alerting ops to the inlined `PagerDutyEventsConnector`.
10
+ *
11
+ * 2. The canonical `runtime/client` descriptor (id `pagerduty`) +
12
+ * `PagerDutyClient` implementation, which is the consumer-facing typed
13
+ * surface (`pagerduty.incidents.*`). Apps resolve it via
14
+ * `getVibesPagerDutyClient(runtime)` and never reach for the Events API directly.
15
+ */
16
+ import { createRuntimePlugin, loader } from '@vibesdotdev/kernel/factory';
17
+ import pagerdutyDescriptor from "./pagerduty/system.integration.pagerduty.descriptor.js";
18
+ export const integrationsPagerDutyPlugin = createRuntimePlugin({
19
+ id: 'integrations-pagerduty',
20
+ name: 'Integrations PagerDuty Plugin',
21
+ description: 'PagerDuty integration provider + canonical runtime client',
22
+ descriptors: [
23
+ pagerdutyDescriptor,
24
+ {
25
+ id: 'pagerduty',
26
+ kind: 'runtime/client',
27
+ description: 'Canonical PagerDuty client — incidents namespace over declared operations'
28
+ }
29
+ ],
30
+ loaders: [
31
+ loader(pagerdutyDescriptor.id, { kind: 'integration/provider' }, async () => {
32
+ const { PagerDutyIntegrationProvider } = await import("./pagerduty/pagerduty-implementation.js");
33
+ return { default: PagerDutyIntegrationProvider };
34
+ }),
35
+ loader('pagerduty', { kind: 'runtime/client' }, async () => {
36
+ const { PagerDutyClient } = await import("./client/runtime-client.js");
37
+ return { impl: PagerDutyClient };
38
+ })
39
+ ]
40
+ });
41
+ export default integrationsPagerDutyPlugin;
42
+ //# sourceMappingURL=integrations-pagerduty.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations-pagerduty.plugin.js","sourceRoot":"","sources":["../src/integrations-pagerduty.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,mBAAmB,MAAM,wDAAwD,CAAC;AAEzF,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;IAC9D,EAAE,EAAE,wBAAwB;IAC5B,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,2DAA2D;IACxE,WAAW,EAAE;QACZ,mBAAmB;QACnB;YACC,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,gBAAgB;YACtB,WAAW,EACV,2EAA2E;SAC5E;KACD;IACD,OAAO,EAAE;QACR,MAAM,CAAC,mBAAmB,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,EAAE,KAAK,IAAI,EAAE;YAC3E,MAAM,EAAE,4BAA4B,EAAE,GAAG,MAAM,MAAM,CACpD,yCAAyC,CACzC,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;QAClD,CAAC,CAAC;QACF,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,KAAK,IAAI,EAAE;YAC1D,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;YACvE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;QAClC,CAAC,CAAC;KACF;CACD,CAAC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type RuntimeRef } from '@vibesdotdev/kernel';
2
+ import type { IntegrationProviderResolvedConfiguration } from '@vibesdotdev/integrations/schemas/integration-descriptor';
3
+ import { PagerDutyEventsConnector } from './pagerduty-connector.ts';
4
+ /** Interpret inherited configuration identically for the provider and public helper. */
5
+ export declare function connectorFromConfiguration(runtime: RuntimeRef, resolved: IntegrationProviderResolvedConfiguration): PagerDutyEventsConnector;
6
+ //# sourceMappingURL=configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/pagerduty/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,0DAA0D,CAAC;AAEzH,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,wFAAwF;AACxF,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,wCAAwC,GAAG,wBAAwB,CAU5I"}
@@ -0,0 +1,16 @@
1
+ import { CapabilityError } from '@vibesdotdev/kernel';
2
+ import { PagerDutyConfigSchema, PagerDutyCredentialsSchema } from "../schemas/pagerduty.js";
3
+ import { PagerDutyEventsConnector } from "./pagerduty-connector.js";
4
+ /** Interpret inherited configuration identically for the provider and public helper. */
5
+ export function connectorFromConfiguration(runtime, resolved) {
6
+ const config = PagerDutyConfigSchema.safeParse(resolved.config);
7
+ if (!config.success) {
8
+ throw new CapabilityError('Invalid PagerDuty configuration.', 'INVALID_INPUT', { reason: 'pagerduty-config-invalid' });
9
+ }
10
+ const credentials = PagerDutyCredentialsSchema.safeParse({ routingKey: resolved.credentialReferences.routingKey ?? [] });
11
+ if (!credentials.success) {
12
+ throw new CapabilityError('PagerDuty routing credential is unavailable.', 'UNAVAILABLE', { reason: 'pagerduty-credential-missing' });
13
+ }
14
+ return new PagerDutyEventsConnector(runtime, { baseUrl: config.data.baseUrl, credentialReferences: credentials.data.routingKey });
15
+ }
16
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/pagerduty/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,wFAAwF;AACxF,MAAM,UAAU,0BAA0B,CAAC,OAAmB,EAAE,QAAkD;IACjH,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,IAAI,eAAe,CAAC,kCAAkC,EAAE,eAAe,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE,CAAC,CAAC;IACxH,CAAC;IACD,MAAM,WAAW,GAAG,0BAA0B,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC,CAAC;IACzH,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAC1B,MAAM,IAAI,eAAe,CAAC,8CAA8C,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,8BAA8B,EAAE,CAAC,CAAC;IACtI,CAAC;IACD,OAAO,IAAI,wBAAwB,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAoB,EAAE,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AACnI,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * PagerDuty integration module
3
+ */
4
+ export { default as pagerdutyDescriptor } from './system.integration.pagerduty.descriptor.ts';
5
+ export { PagerDutyIntegrationProvider } from './pagerduty-implementation.ts';
6
+ export { PagerDutyEventsConnector, PAGERDUTY_DEFAULT_BASE_URL } from './pagerduty-connector.ts';
7
+ export type { PagerDutyEnqueueResult, PagerDutySeverity, TriggerIncidentOptions } from './pagerduty-connector.ts';
8
+ export { PAGERDUTY_INTEGRATION_ID, resolvePagerDutyIntegration, resolvePagerDutyConnector } from './runtime-context.ts';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pagerduty/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAE9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACX,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * PagerDuty integration module
3
+ */
4
+ export { default as pagerdutyDescriptor } from "./system.integration.pagerduty.descriptor.js";
5
+ export { PagerDutyIntegrationProvider } from "./pagerduty-implementation.js";
6
+ export { PagerDutyEventsConnector, PAGERDUTY_DEFAULT_BASE_URL } from "./pagerduty-connector.js";
7
+ export { PAGERDUTY_INTEGRATION_ID, resolvePagerDutyIntegration, resolvePagerDutyConnector } from "./runtime-context.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pagerduty/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAE9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EACN,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type RuntimeRef } from '@vibesdotdev/kernel';
2
+ import { type PagerDutyConnectorOptions, type PagerDutyEnqueueResult, type TriggerIncidentOptions } from '../schemas/pagerduty.ts';
3
+ export { PAGERDUTY_DEFAULT_BASE_URL } from '../schemas/pagerduty.ts';
4
+ export type { PagerDutyEnqueueResult, PagerDutySeverity, TriggerIncidentOptions } from '../schemas/pagerduty.ts';
5
+ /** Events API v2 transport. Public inputs and vendor responses are schema owned. */
6
+ export declare class PagerDutyEventsConnector {
7
+ private readonly runtime;
8
+ private readonly credentialReferences;
9
+ private readonly baseUrl;
10
+ constructor(runtime: RuntimeRef, options: PagerDutyConnectorOptions);
11
+ private enqueue;
12
+ triggerIncident(options: TriggerIncidentOptions): Promise<PagerDutyEnqueueResult>;
13
+ acknowledgeIncident(dedupKey: string): Promise<PagerDutyEnqueueResult>;
14
+ resolveIncident(dedupKey: string): Promise<PagerDutyEnqueueResult>;
15
+ }
16
+ //# sourceMappingURL=pagerduty-connector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagerduty-connector.d.ts","sourceRoot":"","sources":["../../src/pagerduty/pagerduty-connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAGN,KAAK,yBAAyB,EAAuB,KAAK,sBAAsB,EAChF,KAAK,sBAAsB,EAC3B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjH,oFAAoF;AACpF,qBAAa,wBAAwB;IAIxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAoD;IACzF,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAEJ,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,yBAAyB;YAStE,OAAO;IAsCf,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAWjF,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAKtE,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAIxE"}
@@ -0,0 +1,80 @@
1
+ import { CapabilityError, settle } from '@vibesdotdev/kernel';
2
+ import { sendIntegrationAuthenticatedRequest } from '@vibesdotdev/integrations/server/secrets';
3
+ import { admitPagerDutyInput, DedupKeyOptionsSchema, PagerDutyConnectorOptionsSchema, PagerDutyVendorResponseSchema, TriggerIncidentOptionsSchema } from "../schemas/pagerduty.js";
4
+ export { PAGERDUTY_DEFAULT_BASE_URL } from "../schemas/pagerduty.js";
5
+ /** Events API v2 transport. Public inputs and vendor responses are schema owned. */
6
+ export class PagerDutyEventsConnector {
7
+ runtime;
8
+ credentialReferences;
9
+ baseUrl;
10
+ constructor(runtime, options) {
11
+ this.runtime = runtime;
12
+ const parsed = admitPagerDutyInput(PagerDutyConnectorOptionsSchema, options);
13
+ this.credentialReferences = parsed.credentialReferences;
14
+ this.baseUrl = parsed.baseUrl;
15
+ if (this.credentialReferences.length === 0) {
16
+ throw new CapabilityError('PagerDuty routing credential is unavailable.', 'UNAVAILABLE', { reason: 'pagerduty-credential-missing' });
17
+ }
18
+ }
19
+ async enqueue(body) {
20
+ let response;
21
+ try {
22
+ response = await sendIntegrationAuthenticatedRequest(this.runtime, {
23
+ url: `${this.baseUrl.replace(/\/$/, '')}/enqueue`,
24
+ options: {
25
+ method: 'POST',
26
+ headers: { 'Content-Type': 'application/json' },
27
+ body: JSON.stringify(body),
28
+ credentialBindings: [{ kind: 'json-field', candidates: this.credentialReferences, path: ['routing_key'] }]
29
+ }
30
+ });
31
+ }
32
+ catch (cause) {
33
+ if (cause instanceof CapabilityError && cause.code === 'NOT_FOUND' && cause.reason === 'credential-not-set') {
34
+ throw new CapabilityError('PagerDuty routing credential is unavailable.', 'UNAVAILABLE', { reason: 'pagerduty-credential-missing' });
35
+ }
36
+ if (cause instanceof CapabilityError)
37
+ throw cause;
38
+ throw new CapabilityError('PagerDuty request failed.', 'UNAVAILABLE', { reason: 'pagerduty-request-failed', cause });
39
+ }
40
+ if (!response.ok) {
41
+ const released = await settle(() => response.body?.cancel());
42
+ throw new CapabilityError('PagerDuty refused the event.', 'UNAVAILABLE', {
43
+ reason: 'pagerduty-upstream-failed', details: { status: response.status },
44
+ cause: released.ok ? undefined : released.cause
45
+ });
46
+ }
47
+ const json = await settle(() => response.json());
48
+ if (!json.ok) {
49
+ if (json.cause instanceof CapabilityError)
50
+ throw json.cause;
51
+ throw new CapabilityError('Invalid PagerDuty response.', 'UNAVAILABLE', { reason: 'pagerduty-response-invalid' });
52
+ }
53
+ const parsed = PagerDutyVendorResponseSchema.safeParse(json.value);
54
+ if (!parsed.success) {
55
+ throw new CapabilityError('Invalid PagerDuty response.', 'UNAVAILABLE', { reason: 'pagerduty-response-invalid' });
56
+ }
57
+ return { status: parsed.data.status ?? '', message: parsed.data.message ?? '', dedupKey: parsed.data.dedup_key ?? '' };
58
+ }
59
+ async triggerIncident(options) {
60
+ const input = admitPagerDutyInput(TriggerIncidentOptionsSchema, options);
61
+ const body = {
62
+ event_action: 'trigger',
63
+ payload: { summary: input.summary, source: input.source, severity: input.severity }
64
+ };
65
+ if (input.dedupKey !== undefined)
66
+ body.dedup_key = input.dedupKey;
67
+ if (input.customDetails !== undefined && body.payload)
68
+ body.payload.custom_details = input.customDetails;
69
+ return this.enqueue(body);
70
+ }
71
+ async acknowledgeIncident(dedupKey) {
72
+ const input = admitPagerDutyInput(DedupKeyOptionsSchema, { dedupKey });
73
+ return this.enqueue({ event_action: 'acknowledge', dedup_key: input.dedupKey });
74
+ }
75
+ async resolveIncident(dedupKey) {
76
+ const input = admitPagerDutyInput(DedupKeyOptionsSchema, { dedupKey });
77
+ return this.enqueue({ event_action: 'resolve', dedup_key: input.dedupKey });
78
+ }
79
+ }
80
+ //# sourceMappingURL=pagerduty-connector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagerduty-connector.js","sourceRoot":"","sources":["../../src/pagerduty/pagerduty-connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAmB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EACN,mBAA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AAa,EAAE,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,QAAgB;QACrC,MAAM,KAAK,GAAG,mBAAmB,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7E,CAAC;CACD"}
@@ -0,0 +1,8 @@
1
+ import { BaseIntegrationProvider } from '@vibesdotdev/integrations/kinds/integration';
2
+ import type { IntegrationOperationResult } from '@vibesdotdev/integrations/schemas/integration-descriptor';
3
+ import { type PagerDutyOperationArgs } from '../schemas/pagerduty.ts';
4
+ export declare class PagerDutyIntegrationProvider extends BaseIntegrationProvider {
5
+ invokeOperation<T = unknown>(opId: string, args?: PagerDutyOperationArgs): Promise<IntegrationOperationResult<T>>;
6
+ }
7
+ export type { PagerDutyEnqueueResult, PagerDutySeverity } from '../schemas/pagerduty.ts';
8
+ //# sourceMappingURL=pagerduty-implementation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagerduty-implementation.d.ts","sourceRoot":"","sources":["../../src/pagerduty/pagerduty-implementation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAC3G,OAAO,EAA6B,KAAK,sBAAsB,EAA+B,MAAM,yBAAyB,CAAC;AAG9H,qBAAa,4BAA6B,SAAQ,uBAAuB;IAElE,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;CAkBvH;AACD,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { CapabilityError } from '@vibesdotdev/kernel';
2
+ import { BaseIntegrationProvider } from '@vibesdotdev/integrations/kinds/integration';
3
+ import { PagerDutyInvocationSchema } from "../schemas/pagerduty.js";
4
+ import { connectorFromConfiguration } from "./configuration.js";
5
+ export class PagerDutyIntegrationProvider extends BaseIntegrationProvider {
6
+ async invokeOperation(opId, args) {
7
+ const invocation = PagerDutyInvocationSchema.safeParse({ operationId: opId, args });
8
+ if (!invocation.success) {
9
+ throw new CapabilityError('Invalid PagerDuty input.', 'INVALID_INPUT', { reason: 'pagerduty-input-invalid' });
10
+ }
11
+ const runtime = this.context.runtime;
12
+ if (!runtime)
13
+ throw new CapabilityError('PagerDuty requires a runtime.', 'UNAVAILABLE', { reason: 'pagerduty-runtime-unavailable' });
14
+ const connector = connectorFromConfiguration(runtime, await this.getCredentialUseConfiguration());
15
+ switch (invocation.data.operationId) {
16
+ case 'triggerIncident':
17
+ return { ok: true, data: await connector.triggerIncident(invocation.data.args) };
18
+ case 'acknowledgeIncident':
19
+ return { ok: true, data: await connector.acknowledgeIncident(invocation.data.args.dedupKey) };
20
+ case 'resolveIncident':
21
+ return { ok: true, data: await connector.resolveIncident(invocation.data.args.dedupKey) };
22
+ }
23
+ }
24
+ }
25
+ //# sourceMappingURL=pagerduty-implementation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagerduty-implementation.js","sourceRoot":"","sources":["../../src/pagerduty/pagerduty-implementation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAEtF,OAAO,EAAE,yBAAyB,EAA4D,MAAM,yBAAyB,CAAC;AAC9H,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,OAAO,4BAA6B,SAAQ,uBAAuB;IAGxE,KAAK,CAAC,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plementation } from '@vibesdotdev/integrations/schemas/integration-descriptor';
3
+ import type { PagerDutyEventsConnector } from './pagerduty-connector.ts';
4
+ export declare const PAGERDUTY_INTEGRATION_ID = "integration.pagerduty";
5
+ export declare function resolvePagerDutyIntegration(runtime: VibesRuntime): Promise<IntegrationProviderImplementation>;
6
+ export declare function resolvePagerDutyConnector(runtime: VibesRuntime): Promise<PagerDutyEventsConnector>;
7
+ //# sourceMappingURL=runtime-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../../src/pagerduty/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIzE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,0DAA0D,CAAC;AAElH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,eAAO,MAAM,wBAAwB,0BAA0B,CAAC;AAEhE,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAGnH;AACD,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAoBxG"}
@@ -0,0 +1,34 @@
1
+ import { CapabilityError } from '@vibesdotdev/kernel';
2
+ import { getVibesSecretsClient } from '@vibesdotdev/secrets/client';
3
+ import { PagerDutyCredentialsSchema } from "../schemas/pagerduty.js";
4
+ import { connectorFromConfiguration } from "./configuration.js";
5
+ export const PAGERDUTY_INTEGRATION_ID = 'integration.pagerduty';
6
+ export async function resolvePagerDutyIntegration(runtime) {
7
+ return runtime.query('integration/provider')
8
+ .withId(PAGERDUTY_INTEGRATION_ID).resolve();
9
+ }
10
+ export async function resolvePagerDutyConnector(runtime) {
11
+ const integration = await resolvePagerDutyIntegration(runtime);
12
+ const getConfiguration = integration.getCredentialUseConfiguration;
13
+ if (!getConfiguration)
14
+ throw new CapabilityError('PagerDuty credential use is unavailable.', 'UNAVAILABLE', { reason: 'pagerduty-credential-use-unavailable' });
15
+ const configuration = await getConfiguration.call(integration);
16
+ const connector = connectorFromConfiguration(runtime, configuration);
17
+ const credentials = PagerDutyCredentialsSchema.parse({ routingKey: configuration.credentialReferences.routingKey ?? [] });
18
+ const secrets = await getVibesSecretsClient(runtime);
19
+ for (const { source: _source, ...reference } of credentials.routingKey) {
20
+ try {
21
+ await secrets.checkCredentialPresence(reference);
22
+ return connector;
23
+ }
24
+ catch (failure) {
25
+ if (failure instanceof CapabilityError && failure.code === 'NOT_FOUND' && failure.reason === 'credential-not-set')
26
+ continue;
27
+ throw failure;
28
+ }
29
+ }
30
+ throw new CapabilityError('PagerDuty routing credential is unavailable.', 'UNAVAILABLE', {
31
+ reason: 'pagerduty-credential-missing', retryable: false
32
+ });
33
+ }
34
+ //# sourceMappingURL=runtime-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-context.js","sourceRoot":"","sources":["../../src/pagerduty/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAqB,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAGrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGhE,MAAM,CAAC,MAAM,wBAAwB,GAAG,uBAAuB,CAAC;AAEhE,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,OAAqB;IACtE,OAAO,OAAO,CAAC,KAAK,CAAuD,sBAAsB,CAAC;SAChG,MAAM,CAAC,wBAAwB,CAAC,CAAC,OAAO,EAAE,CAAC;AAC9C,CAAC;AACD,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,OAAqB;IACpE,MAAM,WAAW,GAAG,MAAM,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,gBAAgB,GAAG,WAAW,CAAC,6BAA6B,CAAC;IACnE,IAAI,CAAC,gBAAgB;QAAE,MAAM,IAAI,eAAe,CAAC,0CAA0C,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,sCAAsC,EAAE,CAAC,CAAC;IAChK,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,0BAA0B,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACrE,MAAM,WAAW,GAAG,0BAA0B,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC,CAAC;IAC1H,MAAM,OAAO,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACrD,KAAK,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,IAAI,WAAW,CAAC,UAAU,EAAE,CAAC;QACxE,IAAI,CAAC;YACJ,MAAM,OAAO,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;YACjD,OAAO,SAAS,CAAC;QAClB,CAAC;QAAC,OAAO,OAAO,EAAE,CAAC;YAClB,IAAI,OAAO,YAAY,eAAe,IAAI,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,CAAC,MAAM,KAAK,oBAAoB;gBAAE,SAAS;YAC5H,MAAM,OAAO,CAAC;QACf,CAAC;IACF,CAAC;IACD,MAAM,IAAI,eAAe,CAAC,8CAA8C,EAAE,aAAa,EAAE;QACxF,MAAM,EAAE,8BAA8B,EAAE,SAAS,EAAE,KAAK;KACxD,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,69 @@
1
+ declare const _default: {
2
+ id: string;
3
+ kind: "integration/provider";
4
+ name?: string | undefined;
5
+ description?: string | undefined;
6
+ tags?: string[] | undefined;
7
+ hardware?: string[] | undefined;
8
+ enabled?: boolean | undefined;
9
+ capabilityId?: string | undefined;
10
+ retention?: string | {
11
+ reason: string;
12
+ maxAgeDays?: number | undefined;
13
+ maxEntries?: number | undefined;
14
+ maxBytes?: number | undefined;
15
+ cascadeFrom?: string | undefined;
16
+ ageField?: string | undefined;
17
+ enforcedBy?: string | undefined;
18
+ } | undefined;
19
+ requiredContext?: string[] | undefined;
20
+ optionalContext?: string[] | undefined;
21
+ provider?: string | undefined;
22
+ category?: "webhook" | "accounting" | "vcs" | "issue-tracker" | "productivity" | "ocr" | "email" | "messaging" | "sms" | "push" | "storage" | "analytics" | "observability" | "crm" | "calendar" | "other" | undefined;
23
+ priority?: number | undefined;
24
+ baseUrl?: string | undefined;
25
+ config?: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue> | undefined;
26
+ protectedConfigKeys?: string[] | undefined;
27
+ configurationSource?: "account" | "host" | undefined;
28
+ configSettingKey?: string | undefined;
29
+ credentials?: {
30
+ key: string;
31
+ source: "secret" | "setting";
32
+ reference?: {
33
+ source: "secret";
34
+ key: string;
35
+ store?: string | undefined;
36
+ operation?: object | undefined;
37
+ } | undefined;
38
+ providerType?: string | undefined;
39
+ scope?: "user" | "platform" | "project" | "org" | undefined;
40
+ scopeId?: string | undefined;
41
+ settingKey?: string | undefined;
42
+ required?: boolean | undefined;
43
+ }[] | undefined;
44
+ oauth?: {
45
+ authorizationEndpoint: string;
46
+ tokenEndpoint: string;
47
+ scopes?: string[] | undefined;
48
+ authorizationParams?: Record<string, string> | undefined;
49
+ configFromCallback?: string[] | undefined;
50
+ clientAuthentication?: "form" | "basic" | undefined;
51
+ bodyEncoding?: "form" | "json" | undefined;
52
+ headers?: Record<string, string> | undefined;
53
+ scopeIdCallbackParam?: string | undefined;
54
+ } | undefined;
55
+ operations?: {
56
+ id: string;
57
+ name: string;
58
+ description?: string | undefined;
59
+ requiresOrg?: boolean | undefined;
60
+ }[] | undefined;
61
+ connection?: {
62
+ authMode?: "oauth" | "webhook" | "delegated" | "system-config" | undefined;
63
+ connectable?: boolean | undefined;
64
+ checkable?: boolean | undefined;
65
+ requiresProviderAdmin?: boolean | undefined;
66
+ } | undefined;
67
+ };
68
+ export default _default;
69
+ //# sourceMappingURL=system.integration.pagerduty.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.integration.pagerduty.descriptor.d.ts","sourceRoot":"","sources":["../../src/pagerduty/system.integration.pagerduty.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAqDG"}
@@ -0,0 +1,53 @@
1
+ import { PAGERDUTY_DEFAULT_BASE_URL } from "../schemas/pagerduty.js";
2
+ import { createRuntimeAsset } from '@vibesdotdev/kernel/factory';
3
+ export default createRuntimeAsset({
4
+ kind: 'integration/provider',
5
+ id: 'integration.pagerduty',
6
+ name: 'PagerDuty',
7
+ description: 'PagerDuty incident-alerting integration — trigger, acknowledge, and resolve alerts via the Events API v2.',
8
+ provider: 'pagerduty',
9
+ category: 'observability',
10
+ enabled: true,
11
+ priority: 100,
12
+ baseUrl: PAGERDUTY_DEFAULT_BASE_URL,
13
+ configSettingKey: 'integrations.pagerduty.config',
14
+ config: {
15
+ baseUrl: PAGERDUTY_DEFAULT_BASE_URL
16
+ },
17
+ credentials: [
18
+ {
19
+ key: 'routingKey',
20
+ source: 'secret',
21
+ providerType: 'pagerduty',
22
+ required: false
23
+ },
24
+ {
25
+ key: 'routingKey',
26
+ source: 'secret',
27
+ reference: { source: 'secret', key: 'PAGERDUTY_ROUTING_KEY' },
28
+ required: false
29
+ }
30
+ ],
31
+ operations: [
32
+ {
33
+ id: 'triggerIncident',
34
+ name: 'Trigger incident',
35
+ description: "Trigger a new alert via Events API v2 (event_action: 'trigger'). Args: `{ summary: string; source: string; severity: 'critical' | 'error' | 'warning' | 'info'; dedupKey?: string; customDetails?: object }`. Returns `{ status; message; dedupKey }`.",
36
+ requiresOrg: false
37
+ },
38
+ {
39
+ id: 'acknowledgeIncident',
40
+ name: 'Acknowledge incident',
41
+ description: "Acknowledge an open alert by its dedup key (event_action: 'acknowledge'). Args: `{ dedupKey: string }`.",
42
+ requiresOrg: false
43
+ },
44
+ {
45
+ id: 'resolveIncident',
46
+ name: 'Resolve incident',
47
+ description: "Resolve an open alert by its dedup key (event_action: 'resolve'). Args: `{ dedupKey: string }`.",
48
+ requiresOrg: false
49
+ }
50
+ ],
51
+ tags: ['system', 'integration', 'pagerduty', 'observability', 'incident-alerting']
52
+ });
53
+ //# sourceMappingURL=system.integration.pagerduty.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.integration.pagerduty.descriptor.js","sourceRoot":"","sources":["../../src/pagerduty/system.integration.pagerduty.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGjE,eAAe,kBAAkB,CAAqC;IACrE,IAAI,EAAE,sBAAsB;IAC5B,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,WAAW;IACjB,WAAW,EACV,2GAA2G;IAC5G,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,0BAA0B;IACnC,gBAAgB,EAAE,+BAA+B;IACjD,MAAM,EAAE;QACP,OAAO,EAAE,0BAA0B;KACnC;IACD,WAAW,EAAE;QACZ;YACC,GAAG,EAAE,YAAY;YACjB,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE,WAAW;YACzB,QAAQ,EAAE,KAAK;SACf;QACD;YACC,GAAG,EAAE,YAAY;YACjB,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,uBAAuB,EAAE;YAC7D,QAAQ,EAAE,KAAK;SACf;KACD;IACD,UAAU,EAAE;QACX;YACC,EAAE,EAAE,iBAAiB;YACrB,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACV,wPAAwP;YACzP,WAAW,EAAE,KAAK;SAClB;QACD;YACC,EAAE,EAAE,qBAAqB;YACzB,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACV,yGAAyG;YAC1G,WAAW,EAAE,KAAK;SAClB;QACD;YACC,EAAE,EAAE,iBAAiB;YACrB,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACV,iGAAiG;YAClG,WAAW,EAAE,KAAK;SAClB;KACD;IACD,IAAI,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,CAAC;CAClF,CAAC,CAAC"}
@@ -0,0 +1,146 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const PAGERDUTY_DEFAULT_BASE_URL = "https://events.pagerduty.com/v2";
3
+ export declare const PagerDutySeveritySchema: z.ZodEnum<{
4
+ critical: "critical";
5
+ error: "error";
6
+ warning: "warning";
7
+ info: "info";
8
+ }>;
9
+ export declare const PagerDutyCustomDetailsSchema: z.ZodType<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject>>;
10
+ export declare const TriggerIncidentOptionsSchema: z.ZodObject<{
11
+ summary: z.ZodString;
12
+ source: z.ZodString;
13
+ severity: z.ZodEnum<{
14
+ critical: "critical";
15
+ error: "error";
16
+ warning: "warning";
17
+ info: "info";
18
+ }>;
19
+ dedupKey: z.ZodOptional<z.ZodString>;
20
+ customDetails: z.ZodOptional<z.ZodType<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject>>>;
21
+ }, z.core.$strip>;
22
+ export declare const DedupKeyOptionsSchema: z.ZodObject<{
23
+ dedupKey: z.ZodString;
24
+ }, z.core.$strip>;
25
+ export declare const PagerDutyInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
26
+ operationId: z.ZodLiteral<"triggerIncident">;
27
+ args: z.ZodObject<{
28
+ summary: z.ZodString;
29
+ source: z.ZodString;
30
+ severity: z.ZodEnum<{
31
+ critical: "critical";
32
+ error: "error";
33
+ warning: "warning";
34
+ info: "info";
35
+ }>;
36
+ dedupKey: z.ZodOptional<z.ZodString>;
37
+ customDetails: z.ZodOptional<z.ZodType<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject>>>;
38
+ }, z.core.$strip>;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ operationId: z.ZodLiteral<"acknowledgeIncident">;
41
+ args: z.ZodObject<{
42
+ dedupKey: z.ZodString;
43
+ }, z.core.$strip>;
44
+ }, z.core.$strip>, z.ZodObject<{
45
+ operationId: z.ZodLiteral<"resolveIncident">;
46
+ args: z.ZodObject<{
47
+ dedupKey: z.ZodString;
48
+ }, z.core.$strip>;
49
+ }, z.core.$strip>], "operationId">;
50
+ export type PagerDutyOperationArgs = z.infer<typeof TriggerIncidentOptionsSchema> | z.infer<typeof DedupKeyOptionsSchema>;
51
+ export declare const PagerDutyOperationSchema: z.ZodEnum<{
52
+ triggerIncident: "triggerIncident";
53
+ acknowledgeIncident: "acknowledgeIncident";
54
+ resolveIncident: "resolveIncident";
55
+ }>;
56
+ export declare const PagerDutyConfigSchema: z.ZodObject<{
57
+ baseUrl: z.ZodURL;
58
+ }, z.core.$strip>;
59
+ export declare const PagerDutyConnectorInputSchema: z.ZodObject<{
60
+ baseUrl: z.ZodOptional<z.ZodURL>;
61
+ credentialReferences: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
62
+ source: z.ZodLiteral<"secret">;
63
+ key: z.ZodString;
64
+ store: z.ZodOptional<z.ZodString>;
65
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
66
+ }, z.core.$strict>], "source">>;
67
+ }, z.core.$strip>;
68
+ export declare const PagerDutyConnectorOptionsSchema: z.ZodPipe<z.ZodObject<{
69
+ baseUrl: z.ZodOptional<z.ZodURL>;
70
+ credentialReferences: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
71
+ source: z.ZodLiteral<"secret">;
72
+ key: z.ZodString;
73
+ store: z.ZodOptional<z.ZodString>;
74
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
75
+ }, z.core.$strict>], "source">>;
76
+ }, z.core.$strip>, z.ZodTransform<{
77
+ baseUrl: string;
78
+ credentialReferences: {
79
+ source: "secret";
80
+ key: string;
81
+ store?: string | undefined;
82
+ operation?: object | undefined;
83
+ }[];
84
+ }, {
85
+ credentialReferences: {
86
+ source: "secret";
87
+ key: string;
88
+ store?: string | undefined;
89
+ operation?: object | undefined;
90
+ }[];
91
+ baseUrl?: string | undefined;
92
+ }>>;
93
+ export declare const PagerDutyCredentialsSchema: z.ZodObject<{
94
+ routingKey: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
95
+ source: z.ZodLiteral<"secret">;
96
+ key: z.ZodString;
97
+ store: z.ZodOptional<z.ZodString>;
98
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
99
+ }, z.core.$strict>], "source">>;
100
+ }, z.core.$strip>;
101
+ export declare const PagerDutyClientContextSchema: z.ZodObject<{
102
+ userId: z.ZodOptional<z.ZodString>;
103
+ orgId: z.ZodOptional<z.ZodString>;
104
+ organizationId: z.ZodOptional<z.ZodString>;
105
+ }, z.core.$strip>;
106
+ export declare const PagerDutyUserIdSchema: z.ZodString;
107
+ export declare const PagerDutyOrgIdSchema: z.ZodOptional<z.ZodString>;
108
+ export declare const PagerDutyVendorResponseSchema: z.ZodObject<{
109
+ status: z.ZodOptional<z.ZodString>;
110
+ message: z.ZodOptional<z.ZodString>;
111
+ dedup_key: z.ZodOptional<z.ZodString>;
112
+ }, z.core.$strip>;
113
+ export declare const PagerDutyEnqueueResultSchema: z.ZodObject<{
114
+ status: z.ZodString;
115
+ message: z.ZodString;
116
+ dedupKey: z.ZodString;
117
+ }, z.core.$strip>;
118
+ export declare const PagerDutyEventSchema: z.ZodObject<{
119
+ routing_key: z.ZodString;
120
+ event_action: z.ZodEnum<{
121
+ trigger: "trigger";
122
+ acknowledge: "acknowledge";
123
+ resolve: "resolve";
124
+ }>;
125
+ dedup_key: z.ZodOptional<z.ZodString>;
126
+ payload: z.ZodOptional<z.ZodObject<{
127
+ summary: z.ZodString;
128
+ source: z.ZodString;
129
+ severity: z.ZodEnum<{
130
+ critical: "critical";
131
+ error: "error";
132
+ warning: "warning";
133
+ info: "info";
134
+ }>;
135
+ custom_details: z.ZodOptional<z.ZodType<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject>>>;
136
+ }, z.core.$strip>>;
137
+ }, z.core.$strip>;
138
+ export type PagerDutySeverity = z.infer<typeof PagerDutySeveritySchema>;
139
+ export type TriggerIncidentOptions = z.infer<typeof TriggerIncidentOptionsSchema>;
140
+ export type PagerDutyEnqueueResult = z.infer<typeof PagerDutyEnqueueResultSchema>;
141
+ export type PagerDutyClientContext = z.infer<typeof PagerDutyClientContextSchema>;
142
+ export type PagerDutyConnectorOptions = z.infer<typeof PagerDutyConnectorInputSchema>;
143
+ export type PagerDutyEvent = z.infer<typeof PagerDutyEventSchema>;
144
+ export type PagerDutyOperation = z.infer<typeof PagerDutyOperationSchema>;
145
+ export declare function admitPagerDutyInput<T>(schema: z.ZodType<T>, value: unknown): T;
146
+ //# sourceMappingURL=pagerduty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,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AAClF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACtF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAI9E"}
@@ -0,0 +1,58 @@
1
+ import * as z from 'zod/v4';
2
+ import { CapabilityError } from '@vibesdotdev/kernel';
3
+ import { JsonObjectSchema } from '@vibesdotdev/kernel/schemas/json';
4
+ import { CredentialReferenceSchema } from '@vibesdotdev/kernel/credentials';
5
+ export const PAGERDUTY_DEFAULT_BASE_URL = 'https://events.pagerduty.com/v2';
6
+ export const PagerDutySeveritySchema = z.enum(['critical', 'error', 'warning', 'info']);
7
+ export const PagerDutyCustomDetailsSchema = JsonObjectSchema;
8
+ export const TriggerIncidentOptionsSchema = z.object({
9
+ summary: z.string().min(1),
10
+ source: z.string().min(1),
11
+ severity: PagerDutySeveritySchema,
12
+ dedupKey: z.string().min(1).optional(),
13
+ customDetails: PagerDutyCustomDetailsSchema.optional()
14
+ });
15
+ export const DedupKeyOptionsSchema = z.object({ dedupKey: z.string().min(1) });
16
+ export const PagerDutyInvocationSchema = z.discriminatedUnion('operationId', [
17
+ z.object({ operationId: z.literal('triggerIncident'), args: TriggerIncidentOptionsSchema }),
18
+ z.object({ operationId: z.literal('acknowledgeIncident'), args: DedupKeyOptionsSchema }),
19
+ z.object({ operationId: z.literal('resolveIncident'), args: DedupKeyOptionsSchema })
20
+ ]);
21
+ export const PagerDutyOperationSchema = z.enum(['triggerIncident', 'acknowledgeIncident', 'resolveIncident']);
22
+ export const PagerDutyConfigSchema = z.object({ baseUrl: z.url({ protocol: /^https?$/ }) });
23
+ export const PagerDutyConnectorInputSchema = PagerDutyConfigSchema.partial().extend({ credentialReferences: z.array(CredentialReferenceSchema) });
24
+ export const PagerDutyConnectorOptionsSchema = PagerDutyConnectorInputSchema.transform(options => ({
25
+ ...options, baseUrl: options.baseUrl ?? PAGERDUTY_DEFAULT_BASE_URL
26
+ }));
27
+ export const PagerDutyCredentialsSchema = z.object({ routingKey: z.array(CredentialReferenceSchema) });
28
+ export const PagerDutyClientContextSchema = z.object({
29
+ userId: z.string().min(1).optional(),
30
+ orgId: z.string().min(1).optional(),
31
+ organizationId: z.string().min(1).optional()
32
+ });
33
+ export const PagerDutyUserIdSchema = z.string().min(1);
34
+ export const PagerDutyOrgIdSchema = z.string().min(1).optional();
35
+ export const PagerDutyVendorResponseSchema = z.object({
36
+ status: z.string().optional(),
37
+ message: z.string().optional(),
38
+ dedup_key: z.string().optional()
39
+ });
40
+ export const PagerDutyEnqueueResultSchema = z.object({
41
+ status: z.string(), message: z.string(), dedupKey: z.string()
42
+ });
43
+ export const PagerDutyEventSchema = z.object({
44
+ routing_key: z.string().min(1),
45
+ event_action: z.enum(['trigger', 'acknowledge', 'resolve']),
46
+ dedup_key: z.string().optional(),
47
+ payload: z.object({
48
+ summary: z.string(), source: z.string(), severity: PagerDutySeveritySchema,
49
+ custom_details: PagerDutyCustomDetailsSchema.optional()
50
+ }).optional()
51
+ });
52
+ export function admitPagerDutyInput(schema, value) {
53
+ const parsed = schema.safeParse(value);
54
+ if (parsed.success)
55
+ return parsed.data;
56
+ throw new CapabilityError('Invalid PagerDuty input.', 'INVALID_INPUT', { reason: 'pagerduty-input-invalid' });
57
+ }
58
+ //# sourceMappingURL=pagerduty.js.map
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CAAC;QACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,uBAAuB;QAC1E,cAAc,EAAE,4BAA4B,CAAC,QAAQ,EAAE;KACvD,CAAC,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AASH,MAAM,UAAU,mBAAmB,CAAI,MAAoB,EAAE,KAAc;IAC1E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC;IACvC,MAAM,IAAI,eAAe,CAAC,0BAA0B,EAAE,eAAe,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;AAC/G,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,86 @@
1
1
  {
2
2
  "name": "@vibesdotdev/integrations-pagerduty",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-rc.0",
4
+ "dependencies": {
5
+ "@vibesdotdev/secrets": "^1.0.0-rc.2",
6
+ "@vibesdotdev/integrations": "^1.0.0-rc.2",
7
+ "@vibesdotdev/platform": "^1.0.0-rc.0",
8
+ "@vibesdotdev/kernel": "^1.0.0-rc.5",
9
+ "zod": "^4.6.7"
10
+ },
11
+ "main": "./dist/index.js",
12
+ "exports": {
13
+ ".": {
14
+ "bun": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./plugin": {
20
+ "bun": "./dist/integrations-pagerduty.plugin.js",
21
+ "types": "./dist/integrations-pagerduty.plugin.d.ts",
22
+ "import": "./dist/integrations-pagerduty.plugin.js",
23
+ "default": "./dist/integrations-pagerduty.plugin.js"
24
+ },
25
+ "./client": {
26
+ "bun": "./dist/client/index.js",
27
+ "types": "./dist/client/index.d.ts",
28
+ "import": "./dist/client/index.js",
29
+ "default": "./dist/client/index.js"
30
+ },
31
+ "./pagerduty": {
32
+ "bun": "./dist/pagerduty/index.js",
33
+ "types": "./dist/pagerduty/index.d.ts",
34
+ "import": "./dist/pagerduty/index.js",
35
+ "default": "./dist/pagerduty/index.js"
36
+ },
37
+ "./pagerduty/descriptor": {
38
+ "bun": "./dist/pagerduty/system.integration.pagerduty.descriptor.js",
39
+ "types": "./dist/pagerduty/system.integration.pagerduty.descriptor.d.ts",
40
+ "import": "./dist/pagerduty/system.integration.pagerduty.descriptor.js",
41
+ "default": "./dist/pagerduty/system.integration.pagerduty.descriptor.js"
42
+ },
43
+ "./schemas": {
44
+ "bun": "./dist/schemas/pagerduty.js",
45
+ "types": "./dist/schemas/pagerduty.d.ts",
46
+ "import": "./dist/schemas/pagerduty.js",
47
+ "default": "./dist/schemas/pagerduty.js"
48
+ }
49
+ },
50
+ "scripts": {
51
+ "lint": "node ../../node_modules/@vibesdotdev/internal-oxlint-toolchain/ratchet.mjs .",
52
+ "test": "${BUN:-bun} test",
53
+ "check": "${BUN:-bun} --bun tsc -p tsconfig.json --noEmit",
54
+ "build": "tsc -p tsconfig.build.json"
55
+ },
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "ssh://git@git.vibes.dev/vibesdotdev/integrations.git",
59
+ "directory": "integrations/pagerduty"
60
+ },
61
+ "publishConfig": {
62
+ "registry": "https://packages.vibes.dev",
63
+ "access": "public"
64
+ },
65
+ "vibes": {
66
+ "visibility": "public",
67
+ "registry": {
68
+ "repositoryId": "70be51c9-5ab7-4d7e-9f47-801cb17720d8",
69
+ "directory": "integrations/pagerduty"
70
+ }
71
+ },
72
+ "type": "module",
73
+ "types": "./dist/index.d.ts",
74
+ "license": "BUSL-1.1",
75
+ "files": [
76
+ "dist",
77
+ "README.md",
78
+ "LICENSE"
79
+ ],
80
+ "gitHead": "494ddfcab4c073eef61acb182042223d7e4da2e5",
81
+ "_vibes_source": {
82
+ "repo": "ssh://git@git.vibes.dev/vibesdotdev/integrations.git",
83
+ "sha": "494ddfcab4c073eef61acb182042223d7e4da2e5",
84
+ "workspaceDigest": "sha256:ee51ef1951c054d17c2e8547dcf5bdaeec7f95d0ae5d32a84f1d7f36c3078c1f"
85
+ }
86
+ }