@rudderhq/shared 0.6.1 → 0.6.2-canary.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/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +23 -0
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/agent.d.ts +0 -8
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/chat.d.ts +5 -0
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/cost.d.ts +4 -1
- package/dist/types/cost.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/mcp.d.ts +32 -1
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/organization-portability.d.ts +5 -1
- package/dist/types/organization-portability.d.ts.map +1 -1
- package/dist/validators/agent.d.ts +0 -9
- package/dist/validators/agent.d.ts.map +1 -1
- package/dist/validators/agent.js +0 -1
- package/dist/validators/agent.js.map +1 -1
- package/dist/validators/chat.d.ts +54 -0
- package/dist/validators/chat.d.ts.map +1 -1
- package/dist/validators/chat.js +9 -0
- package/dist/validators/chat.js.map +1 -1
- package/dist/validators/chat.test.js +21 -1
- package/dist/validators/chat.test.js.map +1 -1
- package/dist/validators/cost.d.ts +4 -4
- package/dist/validators/index.d.ts +1 -1
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +1 -1
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/mcp.d.ts +169 -0
- package/dist/validators/mcp.d.ts.map +1 -1
- package/dist/validators/mcp.js +93 -1
- package/dist/validators/mcp.js.map +1 -1
- package/dist/validators/mcp.test.js +114 -0
- package/dist/validators/mcp.test.js.map +1 -1
- package/dist/validators/organization-portability.d.ts +5 -5
- package/dist/validators/organization-portability.js +1 -1
- package/dist/validators/organization-portability.js.map +1 -1
- package/dist/validators/organization-portability.test.js +28 -1
- package/dist/validators/organization-portability.test.js.map +1 -1
- package/dist/validators/organization.d.ts +2 -2
- package/dist/validators/plugin.d.ts +4 -4
- package/dist/validators/work-product.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { portabilityTargetSchema } from "./organization-portability.js";
|
|
2
|
+
import { portabilityAgentManifestEntrySchema, portabilityTargetSchema, } from "./organization-portability.js";
|
|
3
3
|
describe("portabilityTargetSchema", () => {
|
|
4
4
|
it("normalizes an explicit new-organization Issue Key", () => {
|
|
5
5
|
expect(portabilityTargetSchema.parse({
|
|
@@ -15,4 +15,31 @@ describe("portabilityTargetSchema", () => {
|
|
|
15
15
|
})).toThrow(/Issue key must start with a letter/);
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
+
const baseAgent = {
|
|
19
|
+
slug: "builder",
|
|
20
|
+
name: "Builder",
|
|
21
|
+
path: "agents/builder/AGENTS.md",
|
|
22
|
+
skills: [],
|
|
23
|
+
role: "engineer",
|
|
24
|
+
title: null,
|
|
25
|
+
icon: null,
|
|
26
|
+
capabilities: null,
|
|
27
|
+
agentRuntimeType: "process",
|
|
28
|
+
agentRuntimeConfig: {},
|
|
29
|
+
runtimeConfig: {},
|
|
30
|
+
permissions: {},
|
|
31
|
+
budgetMonthlyCents: 0,
|
|
32
|
+
metadata: null,
|
|
33
|
+
};
|
|
34
|
+
describe("organization portability agent compatibility", () => {
|
|
35
|
+
it("continues accepting historical v4 reporting metadata", () => {
|
|
36
|
+
expect(portabilityAgentManifestEntrySchema.parse({
|
|
37
|
+
...baseAgent,
|
|
38
|
+
reportsToSlug: "lead",
|
|
39
|
+
}).reportsToSlug).toBe("lead");
|
|
40
|
+
});
|
|
41
|
+
it("normalizes a missing reporting field to the deprecated v4 null shape", () => {
|
|
42
|
+
expect(portabilityAgentManifestEntrySchema.parse(baseAgent).reportsToSlug).toBeNull();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
18
45
|
//# sourceMappingURL=organization-portability.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-portability.test.js","sourceRoot":"","sources":["../../src/validators/organization-portability.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"organization-portability.test.js","sourceRoot":"","sources":["../../src/validators/organization-portability.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,mCAAmC,EACnC,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AAEvC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,CAAC,uBAAuB,CAAC,KAAK,CAAC;YACnC,IAAI,EAAE,kBAAkB;YACxB,mBAAmB,EAAE,iBAAiB;YACtC,uBAAuB,EAAE,OAAO;SACjC,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC;YACzC,IAAI,EAAE,kBAAkB;YACxB,uBAAuB,EAAE,KAAK;SAC/B,CAAC,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,SAAS;IAC3B,kBAAkB,EAAE,EAAE;IACtB,aAAa,EAAE,EAAE;IACjB,WAAW,EAAE,EAAE;IACf,kBAAkB,EAAE,CAAC;IACrB,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,QAAQ,CAAC,8CAA8C,EAAE,GAAG,EAAE;IAC5D,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,CAAC,mCAAmC,CAAC,KAAK,CAAC;YAC/C,GAAG,SAAS;YACZ,aAAa,EAAE,MAAM;SACtB,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,CAAC,mCAAmC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -107,11 +107,11 @@ export declare const createOrganizationWorkspaceWebPreviewSessionSchema: z.ZodOb
|
|
|
107
107
|
htmlContent: z.ZodOptional<z.ZodString>;
|
|
108
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
109
|
entryPath: string;
|
|
110
|
-
networkMode: "
|
|
110
|
+
networkMode: "connected" | "offline";
|
|
111
111
|
htmlContent?: string | undefined;
|
|
112
112
|
}, {
|
|
113
113
|
entryPath: string;
|
|
114
|
-
networkMode: "
|
|
114
|
+
networkMode: "connected" | "offline";
|
|
115
115
|
htmlContent?: string | undefined;
|
|
116
116
|
}>;
|
|
117
117
|
export type CreateOrganizationWorkspaceWebPreviewSession = z.infer<typeof createOrganizationWorkspaceWebPreviewSessionSchema>;
|
|
@@ -719,7 +719,7 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
719
719
|
capabilities: ("organizations.read" | "projects.read" | "project.workspaces.read" | "issues.read" | "issue.comments.read" | "agents.read" | "goals.read" | "goals.create" | "goals.update" | "activity.read" | "costs.read" | "issues.create" | "issues.update" | "issue.comments.create" | "agents.pause" | "agents.resume" | "agents.invoke" | "agent.sessions.create" | "agent.sessions.list" | "agent.sessions.send" | "agent.sessions.close" | "activity.log.write" | "metrics.write" | "plugin.state.read" | "plugin.state.write" | "events.subscribe" | "events.emit" | "jobs.schedule" | "webhooks.receive" | "http.outbound" | "secrets.read-ref" | "agent.tools.register" | "instance.settings.register" | "ui.sidebar.register" | "ui.page.register" | "ui.detailTab.register" | "ui.dashboardWidget.register" | "ui.commentAnnotation.register" | "ui.action.register")[];
|
|
720
720
|
apiVersion: 1;
|
|
721
721
|
author: string;
|
|
722
|
-
categories: ("automation" | "
|
|
722
|
+
categories: ("automation" | "workspace" | "connector" | "ui")[];
|
|
723
723
|
entrypoints: {
|
|
724
724
|
worker: string;
|
|
725
725
|
ui?: string | undefined;
|
|
@@ -799,7 +799,7 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
799
799
|
capabilities: ("organizations.read" | "projects.read" | "project.workspaces.read" | "issues.read" | "issue.comments.read" | "agents.read" | "goals.read" | "goals.create" | "goals.update" | "activity.read" | "costs.read" | "issues.create" | "issues.update" | "issue.comments.create" | "agents.pause" | "agents.resume" | "agents.invoke" | "agent.sessions.create" | "agent.sessions.list" | "agent.sessions.send" | "agent.sessions.close" | "activity.log.write" | "metrics.write" | "plugin.state.read" | "plugin.state.write" | "events.subscribe" | "events.emit" | "jobs.schedule" | "webhooks.receive" | "http.outbound" | "secrets.read-ref" | "agent.tools.register" | "instance.settings.register" | "ui.sidebar.register" | "ui.page.register" | "ui.detailTab.register" | "ui.dashboardWidget.register" | "ui.commentAnnotation.register" | "ui.action.register")[];
|
|
800
800
|
apiVersion: 1;
|
|
801
801
|
author: string;
|
|
802
|
-
categories: ("automation" | "
|
|
802
|
+
categories: ("automation" | "workspace" | "connector" | "ui")[];
|
|
803
803
|
entrypoints: {
|
|
804
804
|
worker: string;
|
|
805
805
|
ui?: string | undefined;
|
|
@@ -879,7 +879,7 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
879
879
|
capabilities: ("organizations.read" | "projects.read" | "project.workspaces.read" | "issues.read" | "issue.comments.read" | "agents.read" | "goals.read" | "goals.create" | "goals.update" | "activity.read" | "costs.read" | "issues.create" | "issues.update" | "issue.comments.create" | "agents.pause" | "agents.resume" | "agents.invoke" | "agent.sessions.create" | "agent.sessions.list" | "agent.sessions.send" | "agent.sessions.close" | "activity.log.write" | "metrics.write" | "plugin.state.read" | "plugin.state.write" | "events.subscribe" | "events.emit" | "jobs.schedule" | "webhooks.receive" | "http.outbound" | "secrets.read-ref" | "agent.tools.register" | "instance.settings.register" | "ui.sidebar.register" | "ui.page.register" | "ui.detailTab.register" | "ui.dashboardWidget.register" | "ui.commentAnnotation.register" | "ui.action.register")[];
|
|
880
880
|
apiVersion: 1;
|
|
881
881
|
author: string;
|
|
882
|
-
categories: ("automation" | "
|
|
882
|
+
categories: ("automation" | "workspace" | "connector" | "ui")[];
|
|
883
883
|
entrypoints: {
|
|
884
884
|
worker: string;
|
|
885
885
|
ui?: string | undefined;
|
|
@@ -959,7 +959,7 @@ export declare const pluginManifestV1Schema: z.ZodEffects<z.ZodObject<{
|
|
|
959
959
|
capabilities: ("organizations.read" | "projects.read" | "project.workspaces.read" | "issues.read" | "issue.comments.read" | "agents.read" | "goals.read" | "goals.create" | "goals.update" | "activity.read" | "costs.read" | "issues.create" | "issues.update" | "issue.comments.create" | "agents.pause" | "agents.resume" | "agents.invoke" | "agent.sessions.create" | "agent.sessions.list" | "agent.sessions.send" | "agent.sessions.close" | "activity.log.write" | "metrics.write" | "plugin.state.read" | "plugin.state.write" | "events.subscribe" | "events.emit" | "jobs.schedule" | "webhooks.receive" | "http.outbound" | "secrets.read-ref" | "agent.tools.register" | "instance.settings.register" | "ui.sidebar.register" | "ui.page.register" | "ui.detailTab.register" | "ui.dashboardWidget.register" | "ui.commentAnnotation.register" | "ui.action.register")[];
|
|
960
960
|
apiVersion: 1;
|
|
961
961
|
author: string;
|
|
962
|
-
categories: ("automation" | "
|
|
962
|
+
categories: ("automation" | "workspace" | "connector" | "ui")[];
|
|
963
963
|
entrypoints: {
|
|
964
964
|
worker: string;
|
|
965
965
|
ui?: string | undefined;
|
|
@@ -26,7 +26,7 @@ export declare const createIssueWorkProductSchema: z.ZodObject<{
|
|
|
26
26
|
type: "preview_url" | "runtime_service" | "pull_request" | "branch" | "commit" | "artifact" | "document";
|
|
27
27
|
provider: string;
|
|
28
28
|
isPrimary: boolean;
|
|
29
|
-
reviewState: "
|
|
29
|
+
reviewState: "none" | "approved" | "changes_requested" | "needs_board_review";
|
|
30
30
|
healthStatus: "unknown" | "healthy" | "unhealthy";
|
|
31
31
|
projectId?: string | null | undefined;
|
|
32
32
|
url?: string | null | undefined;
|
|
@@ -51,7 +51,7 @@ export declare const createIssueWorkProductSchema: z.ZodObject<{
|
|
|
51
51
|
isPrimary?: boolean | undefined;
|
|
52
52
|
runtimeServiceId?: string | null | undefined;
|
|
53
53
|
externalId?: string | null | undefined;
|
|
54
|
-
reviewState?: "
|
|
54
|
+
reviewState?: "none" | "approved" | "changes_requested" | "needs_board_review" | undefined;
|
|
55
55
|
healthStatus?: "unknown" | "healthy" | "unhealthy" | undefined;
|
|
56
56
|
createdByRunId?: string | null | undefined;
|
|
57
57
|
}>;
|
|
@@ -87,7 +87,7 @@ export declare const updateIssueWorkProductSchema: z.ZodObject<{
|
|
|
87
87
|
isPrimary?: boolean | undefined;
|
|
88
88
|
runtimeServiceId?: string | null | undefined;
|
|
89
89
|
externalId?: string | null | undefined;
|
|
90
|
-
reviewState?: "
|
|
90
|
+
reviewState?: "none" | "approved" | "changes_requested" | "needs_board_review" | undefined;
|
|
91
91
|
healthStatus?: "unknown" | "healthy" | "unhealthy" | undefined;
|
|
92
92
|
createdByRunId?: string | null | undefined;
|
|
93
93
|
}, {
|
|
@@ -104,7 +104,7 @@ export declare const updateIssueWorkProductSchema: z.ZodObject<{
|
|
|
104
104
|
isPrimary?: boolean | undefined;
|
|
105
105
|
runtimeServiceId?: string | null | undefined;
|
|
106
106
|
externalId?: string | null | undefined;
|
|
107
|
-
reviewState?: "
|
|
107
|
+
reviewState?: "none" | "approved" | "changes_requested" | "needs_board_review" | undefined;
|
|
108
108
|
healthStatus?: "unknown" | "healthy" | "unhealthy" | undefined;
|
|
109
109
|
createdByRunId?: string | null | undefined;
|
|
110
110
|
}>;
|