@portalshq/contracts 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -76,6 +76,6 @@ export interface CapabilityContext {
|
|
|
76
76
|
sessionId: string;
|
|
77
77
|
channelId: string;
|
|
78
78
|
worldId: string;
|
|
79
|
-
/** Resolves a
|
|
80
|
-
resolve: (
|
|
79
|
+
/** Resolves a PX address to a narrative/world resource. See @portalshq/resolver. */
|
|
80
|
+
resolve: (pxAddress: string) => Promise<unknown>;
|
|
81
81
|
}
|
|
@@ -23,7 +23,7 @@ export declare const CapabilityRefSchema: z.ZodObject<{
|
|
|
23
23
|
version?: string | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export declare const ChannelManifestSchema: z.ZodObject<{
|
|
26
|
-
apiVersion: z.ZodLiteral<"
|
|
26
|
+
apiVersion: z.ZodLiteral<"px/v1">;
|
|
27
27
|
kind: z.ZodLiteral<"Channel">;
|
|
28
28
|
metadata: z.ZodObject<{
|
|
29
29
|
name: z.ZodString;
|
|
@@ -75,7 +75,7 @@ export declare const ChannelManifestSchema: z.ZodObject<{
|
|
|
75
75
|
visibility?: "public" | "unlisted" | "private" | undefined;
|
|
76
76
|
}>;
|
|
77
77
|
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
apiVersion: "
|
|
78
|
+
apiVersion: "px/v1";
|
|
79
79
|
kind: "Channel";
|
|
80
80
|
metadata: {
|
|
81
81
|
name: string;
|
|
@@ -93,7 +93,7 @@ export declare const ChannelManifestSchema: z.ZodObject<{
|
|
|
93
93
|
narrativeRef?: string | undefined;
|
|
94
94
|
};
|
|
95
95
|
}, {
|
|
96
|
-
apiVersion: "
|
|
96
|
+
apiVersion: "px/v1";
|
|
97
97
|
kind: "Channel";
|
|
98
98
|
metadata: {
|
|
99
99
|
name: string;
|
|
@@ -15,7 +15,7 @@ export const CapabilityRefSchema = z.object({
|
|
|
15
15
|
config: z.record(z.unknown()).optional(),
|
|
16
16
|
});
|
|
17
17
|
export const ChannelManifestSchema = z.object({
|
|
18
|
-
apiVersion: z.literal("
|
|
18
|
+
apiVersion: z.literal("px/v1"),
|
|
19
19
|
kind: z.literal("Channel"),
|
|
20
20
|
metadata: z.object({
|
|
21
21
|
name: z.string(),
|
|
@@ -23,8 +23,8 @@ export const ChannelManifestSchema = z.object({
|
|
|
23
23
|
description: z.string().optional(),
|
|
24
24
|
}),
|
|
25
25
|
spec: z.object({
|
|
26
|
-
worldTemplate: z.string(), //
|
|
27
|
-
narrativeRef: z.string().optional(), //
|
|
26
|
+
worldTemplate: z.string(), // PX address of the world template
|
|
27
|
+
narrativeRef: z.string().optional(), // PX address, if this channel uses narrative state
|
|
28
28
|
capabilities: z.array(CapabilityRefSchema).min(1),
|
|
29
29
|
visibility: z.enum(["public", "unlisted", "private"]).default("public"),
|
|
30
30
|
}),
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portalshq/contracts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
|
-
"url": "git+https://github.com/portalshq/portals-cloud"
|
|
6
|
+
"url": "git+https://github.com/portalshq/portals-cloud.git",
|
|
7
|
+
"directory": "packages/contracts"
|
|
7
8
|
},
|
|
8
9
|
"description": "Capability contract types and channel manifest schema. The single source of truth every other package validates against.",
|
|
9
10
|
"type": "module",
|
|
@@ -22,5 +23,9 @@
|
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"typescript": "^5.5.0",
|
|
24
25
|
"@types/node": "^20.0.0"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"registry": "https://registry.npmjs.org/"
|
|
25
30
|
}
|
|
26
31
|
}
|