@opentag/core 0.1.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 ADDED
@@ -0,0 +1,48 @@
1
+ # @opentag/core
2
+
3
+ Core protocol types and validation for OpenTag.
4
+
5
+ Use this package when you need to create, validate, parse, or document OpenTag protocol objects without depending on any provider SDK or runtime service.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add @opentag/core
11
+ ```
12
+
13
+ ## Exports
14
+
15
+ - `OpenTagEventSchema`, `OpenTagRunSchema`, `OpenTagRunResultSchema`: Zod schemas for protocol objects.
16
+ - `OpenTagEvent`, `OpenTagRun`, `OpenTagRunResult`: TypeScript types inferred from the schemas.
17
+ - `parseOpenTagMention`: extracts an `@opentag` command from workspace text.
18
+ - `commandFromRawText`: maps raw command text to a normalized intent.
19
+ - `OpenTagJsonSchemas`: JSON Schema definitions for systems that do not use TypeScript or Zod.
20
+
21
+ ## Example
22
+
23
+ ```ts
24
+ import { OpenTagEventSchema, parseOpenTagMention } from "@opentag/core";
25
+
26
+ const command = parseOpenTagMention("@opentag fix this flaky test");
27
+ if (!command.matched) {
28
+ throw new Error("No OpenTag command found");
29
+ }
30
+
31
+ const event = OpenTagEventSchema.parse({
32
+ id: "evt_1",
33
+ source: "github",
34
+ sourceEventId: "comment_1",
35
+ receivedAt: new Date().toISOString(),
36
+ actor: { provider: "github", providerUserId: "42", handle: "octocat" },
37
+ target: { mention: "@opentag", agentId: "opentag" },
38
+ command: { rawText: command.rawText, intent: command.intent, args: command.args },
39
+ context: [],
40
+ permissions: [{ scope: "issue:comment", reason: "reply to source thread" }],
41
+ callback: { provider: "github", uri: "https://api.github.com/repos/acme/demo/issues/1/comments" },
42
+ metadata: { owner: "acme", repo: "demo" }
43
+ });
44
+ ```
45
+
46
+ ## Stability
47
+
48
+ This package is the most stable OpenTag surface. Protocol changes should be additive whenever possible and follow the repository versioning policy.
@@ -0,0 +1,4 @@
1
+ export * from "./json-schema.js";
2
+ export * from "./mention.js";
3
+ export * from "./schema.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,146 @@
1
+ // src/json-schema.ts
2
+ import { zodToJsonSchema } from "zod-to-json-schema";
3
+
4
+ // src/schema.ts
5
+ import { z } from "zod";
6
+ var SourceSchema = z.enum(["github", "slack", "lark", "cli", "webhook"]);
7
+ var ProviderSchema = z.enum(["github", "slack", "lark"]);
8
+ var ActorIdentitySchema = z.object({
9
+ provider: ProviderSchema,
10
+ providerUserId: z.string().min(1),
11
+ handle: z.string().min(1).optional(),
12
+ displayName: z.string().min(1).optional(),
13
+ organizationId: z.string().min(1).optional()
14
+ });
15
+ var AgentTargetSchema = z.object({
16
+ mention: z.string().min(1),
17
+ agentId: z.string().min(1),
18
+ executorHint: z.enum(["claude-code", "codex", "hermes", "openclaw", "custom"]).optional(),
19
+ workspaceHint: z.string().min(1).optional()
20
+ });
21
+ var OpenTagCommandSchema = z.object({
22
+ rawText: z.string(),
23
+ intent: z.enum(["fix", "review", "investigate", "explain", "run", "unknown"]),
24
+ args: z.record(z.union([z.string(), z.boolean(), z.number()]))
25
+ });
26
+ var ContextPointerSchema = z.object({
27
+ kind: z.enum([
28
+ "github.repo",
29
+ "github.issue",
30
+ "github.pull_request",
31
+ "github.comment",
32
+ "github.commit",
33
+ "file",
34
+ "url",
35
+ "text"
36
+ ]),
37
+ uri: z.string().min(1),
38
+ title: z.string().min(1).optional(),
39
+ visibility: z.enum(["public", "private", "organization"])
40
+ });
41
+ var PermissionGrantSchema = z.object({
42
+ scope: z.enum([
43
+ "repo:read",
44
+ "repo:write",
45
+ "issue:comment",
46
+ "chat:postMessage",
47
+ "pr:create",
48
+ "pr:update",
49
+ "runner:local",
50
+ "network:restricted"
51
+ ]),
52
+ reason: z.string().min(1),
53
+ expiresAt: z.string().datetime().optional()
54
+ });
55
+ var CallbackRouteSchema = z.object({
56
+ provider: z.enum(["github", "slack", "lark", "webhook"]),
57
+ uri: z.string().min(1),
58
+ threadKey: z.string().min(1).optional()
59
+ });
60
+ var OpenTagEventSchema = z.object({
61
+ id: z.string().min(1),
62
+ source: SourceSchema,
63
+ sourceEventId: z.string().min(1),
64
+ receivedAt: z.string().datetime(),
65
+ actor: ActorIdentitySchema,
66
+ target: AgentTargetSchema,
67
+ command: OpenTagCommandSchema,
68
+ context: z.array(ContextPointerSchema),
69
+ permissions: z.array(PermissionGrantSchema),
70
+ callback: CallbackRouteSchema,
71
+ metadata: z.record(z.unknown())
72
+ });
73
+ var OpenTagRunResultSchema = z.object({
74
+ conclusion: z.enum(["success", "failure", "cancelled", "needs_human"]),
75
+ summary: z.string(),
76
+ changedFiles: z.array(z.string()).optional(),
77
+ createdPullRequestUrl: z.string().url().optional(),
78
+ artifacts: z.array(z.object({ title: z.string(), uri: z.string() })).optional(),
79
+ verification: z.array(
80
+ z.object({
81
+ command: z.string(),
82
+ outcome: z.enum(["passed", "failed", "not_run"]),
83
+ excerpt: z.string().optional()
84
+ })
85
+ ).optional(),
86
+ nextAction: z.string().optional()
87
+ });
88
+ var OpenTagRunSchema = z.object({
89
+ id: z.string().min(1),
90
+ eventId: z.string().min(1),
91
+ status: z.enum(["queued", "assigned", "running", "needs_approval", "succeeded", "failed", "cancelled"]),
92
+ assignedRunnerId: z.string().min(1).optional(),
93
+ executor: z.string().min(1).optional(),
94
+ createdAt: z.string().datetime(),
95
+ updatedAt: z.string().datetime(),
96
+ result: OpenTagRunResultSchema.optional()
97
+ });
98
+
99
+ // src/json-schema.ts
100
+ var OpenTagJsonSchemas = {
101
+ OpenTagEvent: zodToJsonSchema(OpenTagEventSchema, "OpenTagEvent"),
102
+ OpenTagRun: zodToJsonSchema(OpenTagRunSchema, "OpenTagRun"),
103
+ OpenTagRunResult: zodToJsonSchema(OpenTagRunResultSchema, "OpenTagRunResult")
104
+ };
105
+
106
+ // src/mention.ts
107
+ var INTENTS = ["fix", "review", "investigate", "explain", "run"];
108
+ function commandFromRawText(rawText) {
109
+ const firstWord = rawText.split(/\s+/, 1)[0]?.toLowerCase();
110
+ const intent = INTENTS.includes(firstWord) ? firstWord : "unknown";
111
+ return {
112
+ rawText,
113
+ intent,
114
+ args: {}
115
+ };
116
+ }
117
+ function parseOpenTagMention(body, mention = "@opentag") {
118
+ const escaped = mention.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
119
+ const pattern = new RegExp(`${escaped}\\s+([^\\n\\r]+)`, "i");
120
+ const match = body.match(pattern);
121
+ if (!match?.[1]) {
122
+ return { matched: false };
123
+ }
124
+ const rawText = match[1].trim();
125
+ return {
126
+ matched: true,
127
+ ...commandFromRawText(rawText)
128
+ };
129
+ }
130
+ export {
131
+ ActorIdentitySchema,
132
+ AgentTargetSchema,
133
+ CallbackRouteSchema,
134
+ ContextPointerSchema,
135
+ OpenTagCommandSchema,
136
+ OpenTagEventSchema,
137
+ OpenTagJsonSchemas,
138
+ OpenTagRunResultSchema,
139
+ OpenTagRunSchema,
140
+ PermissionGrantSchema,
141
+ ProviderSchema,
142
+ SourceSchema,
143
+ commandFromRawText,
144
+ parseOpenTagMention
145
+ };
146
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/json-schema.ts","../src/schema.ts","../src/mention.ts"],"sourcesContent":["import { zodToJsonSchema } from \"zod-to-json-schema\";\nimport { OpenTagEventSchema, OpenTagRunResultSchema, OpenTagRunSchema } from \"./schema.js\";\n\nexport const OpenTagJsonSchemas = {\n OpenTagEvent: zodToJsonSchema(OpenTagEventSchema, \"OpenTagEvent\"),\n OpenTagRun: zodToJsonSchema(OpenTagRunSchema, \"OpenTagRun\"),\n OpenTagRunResult: zodToJsonSchema(OpenTagRunResultSchema, \"OpenTagRunResult\")\n} as const;\n","import { z } from \"zod\";\n\nexport const SourceSchema = z.enum([\"github\", \"slack\", \"lark\", \"cli\", \"webhook\"]);\nexport const ProviderSchema = z.enum([\"github\", \"slack\", \"lark\"]);\n\nexport const ActorIdentitySchema = z.object({\n provider: ProviderSchema,\n providerUserId: z.string().min(1),\n handle: z.string().min(1).optional(),\n displayName: z.string().min(1).optional(),\n organizationId: z.string().min(1).optional()\n});\n\nexport const AgentTargetSchema = z.object({\n mention: z.string().min(1),\n agentId: z.string().min(1),\n executorHint: z.enum([\"claude-code\", \"codex\", \"hermes\", \"openclaw\", \"custom\"]).optional(),\n workspaceHint: z.string().min(1).optional()\n});\n\nexport const OpenTagCommandSchema = z.object({\n rawText: z.string(),\n intent: z.enum([\"fix\", \"review\", \"investigate\", \"explain\", \"run\", \"unknown\"]),\n args: z.record(z.union([z.string(), z.boolean(), z.number()]))\n});\n\nexport const ContextPointerSchema = z.object({\n kind: z.enum([\n \"github.repo\",\n \"github.issue\",\n \"github.pull_request\",\n \"github.comment\",\n \"github.commit\",\n \"file\",\n \"url\",\n \"text\"\n ]),\n uri: z.string().min(1),\n title: z.string().min(1).optional(),\n visibility: z.enum([\"public\", \"private\", \"organization\"])\n});\n\nexport const PermissionGrantSchema = z.object({\n scope: z.enum([\n \"repo:read\",\n \"repo:write\",\n \"issue:comment\",\n \"chat:postMessage\",\n \"pr:create\",\n \"pr:update\",\n \"runner:local\",\n \"network:restricted\"\n ]),\n reason: z.string().min(1),\n expiresAt: z.string().datetime().optional()\n});\n\nexport const CallbackRouteSchema = z.object({\n provider: z.enum([\"github\", \"slack\", \"lark\", \"webhook\"]),\n uri: z.string().min(1),\n threadKey: z.string().min(1).optional()\n});\n\nexport const OpenTagEventSchema = z.object({\n id: z.string().min(1),\n source: SourceSchema,\n sourceEventId: z.string().min(1),\n receivedAt: z.string().datetime(),\n actor: ActorIdentitySchema,\n target: AgentTargetSchema,\n command: OpenTagCommandSchema,\n context: z.array(ContextPointerSchema),\n permissions: z.array(PermissionGrantSchema),\n callback: CallbackRouteSchema,\n metadata: z.record(z.unknown())\n});\n\nexport const OpenTagRunResultSchema = z.object({\n conclusion: z.enum([\"success\", \"failure\", \"cancelled\", \"needs_human\"]),\n summary: z.string(),\n changedFiles: z.array(z.string()).optional(),\n createdPullRequestUrl: z.string().url().optional(),\n artifacts: z.array(z.object({ title: z.string(), uri: z.string() })).optional(),\n verification: z\n .array(\n z.object({\n command: z.string(),\n outcome: z.enum([\"passed\", \"failed\", \"not_run\"]),\n excerpt: z.string().optional()\n })\n )\n .optional(),\n nextAction: z.string().optional()\n});\n\nexport const OpenTagRunSchema = z.object({\n id: z.string().min(1),\n eventId: z.string().min(1),\n status: z.enum([\"queued\", \"assigned\", \"running\", \"needs_approval\", \"succeeded\", \"failed\", \"cancelled\"]),\n assignedRunnerId: z.string().min(1).optional(),\n executor: z.string().min(1).optional(),\n createdAt: z.string().datetime(),\n updatedAt: z.string().datetime(),\n result: OpenTagRunResultSchema.optional()\n});\n\nexport type ActorIdentity = z.infer<typeof ActorIdentitySchema>;\nexport type AgentTarget = z.infer<typeof AgentTargetSchema>;\nexport type OpenTagCommand = z.infer<typeof OpenTagCommandSchema>;\nexport type ContextPointer = z.infer<typeof ContextPointerSchema>;\nexport type PermissionGrant = z.infer<typeof PermissionGrantSchema>;\nexport type CallbackRoute = z.infer<typeof CallbackRouteSchema>;\nexport type OpenTagEvent = z.infer<typeof OpenTagEventSchema>;\nexport type OpenTagRun = z.infer<typeof OpenTagRunSchema>;\nexport type OpenTagRunResult = z.infer<typeof OpenTagRunResultSchema>;\n","import type { OpenTagCommand } from \"./schema.js\";\n\ntype MentionMatch = { matched: false } | ({ matched: true } & OpenTagCommand);\n\nconst INTENTS: OpenTagCommand[\"intent\"][] = [\"fix\", \"review\", \"investigate\", \"explain\", \"run\"];\n\nexport function commandFromRawText(rawText: string): OpenTagCommand {\n const firstWord = rawText.split(/\\s+/, 1)[0]?.toLowerCase();\n const intent = INTENTS.includes(firstWord as OpenTagCommand[\"intent\"])\n ? (firstWord as OpenTagCommand[\"intent\"])\n : \"unknown\";\n\n return {\n rawText,\n intent,\n args: {}\n };\n}\n\nexport function parseOpenTagMention(body: string, mention = \"@opentag\"): MentionMatch {\n const escaped = mention.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const pattern = new RegExp(`${escaped}\\\\s+([^\\\\n\\\\r]+)`, \"i\");\n const match = body.match(pattern);\n\n if (!match?.[1]) {\n return { matched: false };\n }\n\n const rawText = match[1].trim();\n return {\n matched: true,\n ...commandFromRawText(rawText)\n };\n}\n"],"mappings":";AAAA,SAAS,uBAAuB;;;ACAhC,SAAS,SAAS;AAEX,IAAM,eAAe,EAAE,KAAK,CAAC,UAAU,SAAS,QAAQ,OAAO,SAAS,CAAC;AACzE,IAAM,iBAAiB,EAAE,KAAK,CAAC,UAAU,SAAS,MAAM,CAAC;AAEzD,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC1C,UAAU;AAAA,EACV,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAChC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EACnC,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EACxC,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAC7C,CAAC;AAEM,IAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACzB,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACzB,cAAc,EAAE,KAAK,CAAC,eAAe,SAAS,UAAU,YAAY,QAAQ,CAAC,EAAE,SAAS;AAAA,EACxF,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAC5C,CAAC;AAEM,IAAM,uBAAuB,EAAE,OAAO;AAAA,EAC3C,SAAS,EAAE,OAAO;AAAA,EAClB,QAAQ,EAAE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AA,EAC/B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,QAAQ,uBAAuB,SAAS;AAC1C,CAAC;;;ADrGM,IAAM,qBAAqB;AAAA,EAChC,cAAc,gBAAgB,oBAAoB,cAAc;AAAA,EAChE,YAAY,gBAAgB,kBAAkB,YAAY;AAAA,EAC1D,kBAAkB,gBAAgB,wBAAwB,kBAAkB;AAC9E;;;AEHA,IAAM,UAAsC,CAAC,OAAO,UAAU,eAAe,WAAW,KAAK;AAEtF,SAAS,mBAAmB,SAAiC;AAClE,QAAM,YAAY,QAAQ,MAAM,OAAO,CAAC,EAAE,CAAC,GAAG,YAAY;AAC1D,QAAM,SAAS,QAAQ,SAAS,SAAqC,IAChE,YACD;AAEJ,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,MAAM,CAAC;AAAA,EACT;AACF;AAEO,SAAS,oBAAoB,MAAc,UAAU,YAA0B;AACpF,QAAM,UAAU,QAAQ,QAAQ,uBAAuB,MAAM;AAC7D,QAAM,UAAU,IAAI,OAAO,GAAG,OAAO,oBAAoB,GAAG;AAC5D,QAAM,QAAQ,KAAK,MAAM,OAAO;AAEhC,MAAI,CAAC,QAAQ,CAAC,GAAG;AACf,WAAO,EAAE,SAAS,MAAM;AAAA,EAC1B;AAEA,QAAM,UAAU,MAAM,CAAC,EAAE,KAAK;AAC9B,SAAO;AAAA,IACL,SAAS;AAAA,IACT,GAAG,mBAAmB,OAAO;AAAA,EAC/B;AACF;","names":[]}
@@ -0,0 +1,21 @@
1
+ export declare const OpenTagJsonSchemas: {
2
+ readonly OpenTagEvent: import("zod-to-json-schema").JsonSchema7Type & {
3
+ $schema?: string | undefined;
4
+ definitions?: {
5
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
6
+ } | undefined;
7
+ };
8
+ readonly OpenTagRun: import("zod-to-json-schema").JsonSchema7Type & {
9
+ $schema?: string | undefined;
10
+ definitions?: {
11
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
12
+ } | undefined;
13
+ };
14
+ readonly OpenTagRunResult: import("zod-to-json-schema").JsonSchema7Type & {
15
+ $schema?: string | undefined;
16
+ definitions?: {
17
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
18
+ } | undefined;
19
+ };
20
+ };
21
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;CAIrB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { OpenTagCommand } from "./schema.js";
2
+ type MentionMatch = {
3
+ matched: false;
4
+ } | ({
5
+ matched: true;
6
+ } & OpenTagCommand);
7
+ export declare function commandFromRawText(rawText: string): OpenTagCommand;
8
+ export declare function parseOpenTagMention(body: string, mention?: string): MentionMatch;
9
+ export {};
10
+ //# sourceMappingURL=mention.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../src/mention.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,KAAK,YAAY,GAAG;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,GAAG,CAAC;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG,cAAc,CAAC,CAAC;AAI9E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAWlE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAa,GAAG,YAAY,CAcpF"}
@@ -0,0 +1,457 @@
1
+ import { z } from "zod";
2
+ export declare const SourceSchema: z.ZodEnum<["github", "slack", "lark", "cli", "webhook"]>;
3
+ export declare const ProviderSchema: z.ZodEnum<["github", "slack", "lark"]>;
4
+ export declare const ActorIdentitySchema: z.ZodObject<{
5
+ provider: z.ZodEnum<["github", "slack", "lark"]>;
6
+ providerUserId: z.ZodString;
7
+ handle: z.ZodOptional<z.ZodString>;
8
+ displayName: z.ZodOptional<z.ZodString>;
9
+ organizationId: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ provider: "github" | "slack" | "lark";
12
+ providerUserId: string;
13
+ handle?: string | undefined;
14
+ displayName?: string | undefined;
15
+ organizationId?: string | undefined;
16
+ }, {
17
+ provider: "github" | "slack" | "lark";
18
+ providerUserId: string;
19
+ handle?: string | undefined;
20
+ displayName?: string | undefined;
21
+ organizationId?: string | undefined;
22
+ }>;
23
+ export declare const AgentTargetSchema: z.ZodObject<{
24
+ mention: z.ZodString;
25
+ agentId: z.ZodString;
26
+ executorHint: z.ZodOptional<z.ZodEnum<["claude-code", "codex", "hermes", "openclaw", "custom"]>>;
27
+ workspaceHint: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ mention: string;
30
+ agentId: string;
31
+ executorHint?: "claude-code" | "codex" | "hermes" | "openclaw" | "custom" | undefined;
32
+ workspaceHint?: string | undefined;
33
+ }, {
34
+ mention: string;
35
+ agentId: string;
36
+ executorHint?: "claude-code" | "codex" | "hermes" | "openclaw" | "custom" | undefined;
37
+ workspaceHint?: string | undefined;
38
+ }>;
39
+ export declare const OpenTagCommandSchema: z.ZodObject<{
40
+ rawText: z.ZodString;
41
+ intent: z.ZodEnum<["fix", "review", "investigate", "explain", "run", "unknown"]>;
42
+ args: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ rawText: string;
45
+ intent: "unknown" | "fix" | "review" | "investigate" | "explain" | "run";
46
+ args: Record<string, string | number | boolean>;
47
+ }, {
48
+ rawText: string;
49
+ intent: "unknown" | "fix" | "review" | "investigate" | "explain" | "run";
50
+ args: Record<string, string | number | boolean>;
51
+ }>;
52
+ export declare const ContextPointerSchema: z.ZodObject<{
53
+ kind: z.ZodEnum<["github.repo", "github.issue", "github.pull_request", "github.comment", "github.commit", "file", "url", "text"]>;
54
+ uri: z.ZodString;
55
+ title: z.ZodOptional<z.ZodString>;
56
+ visibility: z.ZodEnum<["public", "private", "organization"]>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ kind: "github.repo" | "github.issue" | "github.pull_request" | "github.comment" | "github.commit" | "file" | "url" | "text";
59
+ uri: string;
60
+ visibility: "public" | "private" | "organization";
61
+ title?: string | undefined;
62
+ }, {
63
+ kind: "github.repo" | "github.issue" | "github.pull_request" | "github.comment" | "github.commit" | "file" | "url" | "text";
64
+ uri: string;
65
+ visibility: "public" | "private" | "organization";
66
+ title?: string | undefined;
67
+ }>;
68
+ export declare const PermissionGrantSchema: z.ZodObject<{
69
+ scope: z.ZodEnum<["repo:read", "repo:write", "issue:comment", "chat:postMessage", "pr:create", "pr:update", "runner:local", "network:restricted"]>;
70
+ reason: z.ZodString;
71
+ expiresAt: z.ZodOptional<z.ZodString>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ scope: "repo:read" | "repo:write" | "issue:comment" | "chat:postMessage" | "pr:create" | "pr:update" | "runner:local" | "network:restricted";
74
+ reason: string;
75
+ expiresAt?: string | undefined;
76
+ }, {
77
+ scope: "repo:read" | "repo:write" | "issue:comment" | "chat:postMessage" | "pr:create" | "pr:update" | "runner:local" | "network:restricted";
78
+ reason: string;
79
+ expiresAt?: string | undefined;
80
+ }>;
81
+ export declare const CallbackRouteSchema: z.ZodObject<{
82
+ provider: z.ZodEnum<["github", "slack", "lark", "webhook"]>;
83
+ uri: z.ZodString;
84
+ threadKey: z.ZodOptional<z.ZodString>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ provider: "github" | "slack" | "lark" | "webhook";
87
+ uri: string;
88
+ threadKey?: string | undefined;
89
+ }, {
90
+ provider: "github" | "slack" | "lark" | "webhook";
91
+ uri: string;
92
+ threadKey?: string | undefined;
93
+ }>;
94
+ export declare const OpenTagEventSchema: z.ZodObject<{
95
+ id: z.ZodString;
96
+ source: z.ZodEnum<["github", "slack", "lark", "cli", "webhook"]>;
97
+ sourceEventId: z.ZodString;
98
+ receivedAt: z.ZodString;
99
+ actor: z.ZodObject<{
100
+ provider: z.ZodEnum<["github", "slack", "lark"]>;
101
+ providerUserId: z.ZodString;
102
+ handle: z.ZodOptional<z.ZodString>;
103
+ displayName: z.ZodOptional<z.ZodString>;
104
+ organizationId: z.ZodOptional<z.ZodString>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ provider: "github" | "slack" | "lark";
107
+ providerUserId: string;
108
+ handle?: string | undefined;
109
+ displayName?: string | undefined;
110
+ organizationId?: string | undefined;
111
+ }, {
112
+ provider: "github" | "slack" | "lark";
113
+ providerUserId: string;
114
+ handle?: string | undefined;
115
+ displayName?: string | undefined;
116
+ organizationId?: string | undefined;
117
+ }>;
118
+ target: z.ZodObject<{
119
+ mention: z.ZodString;
120
+ agentId: z.ZodString;
121
+ executorHint: z.ZodOptional<z.ZodEnum<["claude-code", "codex", "hermes", "openclaw", "custom"]>>;
122
+ workspaceHint: z.ZodOptional<z.ZodString>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ mention: string;
125
+ agentId: string;
126
+ executorHint?: "claude-code" | "codex" | "hermes" | "openclaw" | "custom" | undefined;
127
+ workspaceHint?: string | undefined;
128
+ }, {
129
+ mention: string;
130
+ agentId: string;
131
+ executorHint?: "claude-code" | "codex" | "hermes" | "openclaw" | "custom" | undefined;
132
+ workspaceHint?: string | undefined;
133
+ }>;
134
+ command: z.ZodObject<{
135
+ rawText: z.ZodString;
136
+ intent: z.ZodEnum<["fix", "review", "investigate", "explain", "run", "unknown"]>;
137
+ args: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNumber]>>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ rawText: string;
140
+ intent: "unknown" | "fix" | "review" | "investigate" | "explain" | "run";
141
+ args: Record<string, string | number | boolean>;
142
+ }, {
143
+ rawText: string;
144
+ intent: "unknown" | "fix" | "review" | "investigate" | "explain" | "run";
145
+ args: Record<string, string | number | boolean>;
146
+ }>;
147
+ context: z.ZodArray<z.ZodObject<{
148
+ kind: z.ZodEnum<["github.repo", "github.issue", "github.pull_request", "github.comment", "github.commit", "file", "url", "text"]>;
149
+ uri: z.ZodString;
150
+ title: z.ZodOptional<z.ZodString>;
151
+ visibility: z.ZodEnum<["public", "private", "organization"]>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ kind: "github.repo" | "github.issue" | "github.pull_request" | "github.comment" | "github.commit" | "file" | "url" | "text";
154
+ uri: string;
155
+ visibility: "public" | "private" | "organization";
156
+ title?: string | undefined;
157
+ }, {
158
+ kind: "github.repo" | "github.issue" | "github.pull_request" | "github.comment" | "github.commit" | "file" | "url" | "text";
159
+ uri: string;
160
+ visibility: "public" | "private" | "organization";
161
+ title?: string | undefined;
162
+ }>, "many">;
163
+ permissions: z.ZodArray<z.ZodObject<{
164
+ scope: z.ZodEnum<["repo:read", "repo:write", "issue:comment", "chat:postMessage", "pr:create", "pr:update", "runner:local", "network:restricted"]>;
165
+ reason: z.ZodString;
166
+ expiresAt: z.ZodOptional<z.ZodString>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ scope: "repo:read" | "repo:write" | "issue:comment" | "chat:postMessage" | "pr:create" | "pr:update" | "runner:local" | "network:restricted";
169
+ reason: string;
170
+ expiresAt?: string | undefined;
171
+ }, {
172
+ scope: "repo:read" | "repo:write" | "issue:comment" | "chat:postMessage" | "pr:create" | "pr:update" | "runner:local" | "network:restricted";
173
+ reason: string;
174
+ expiresAt?: string | undefined;
175
+ }>, "many">;
176
+ callback: z.ZodObject<{
177
+ provider: z.ZodEnum<["github", "slack", "lark", "webhook"]>;
178
+ uri: z.ZodString;
179
+ threadKey: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ provider: "github" | "slack" | "lark" | "webhook";
182
+ uri: string;
183
+ threadKey?: string | undefined;
184
+ }, {
185
+ provider: "github" | "slack" | "lark" | "webhook";
186
+ uri: string;
187
+ threadKey?: string | undefined;
188
+ }>;
189
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
190
+ }, "strip", z.ZodTypeAny, {
191
+ id: string;
192
+ source: "github" | "slack" | "lark" | "cli" | "webhook";
193
+ sourceEventId: string;
194
+ receivedAt: string;
195
+ actor: {
196
+ provider: "github" | "slack" | "lark";
197
+ providerUserId: string;
198
+ handle?: string | undefined;
199
+ displayName?: string | undefined;
200
+ organizationId?: string | undefined;
201
+ };
202
+ target: {
203
+ mention: string;
204
+ agentId: string;
205
+ executorHint?: "claude-code" | "codex" | "hermes" | "openclaw" | "custom" | undefined;
206
+ workspaceHint?: string | undefined;
207
+ };
208
+ command: {
209
+ rawText: string;
210
+ intent: "unknown" | "fix" | "review" | "investigate" | "explain" | "run";
211
+ args: Record<string, string | number | boolean>;
212
+ };
213
+ context: {
214
+ kind: "github.repo" | "github.issue" | "github.pull_request" | "github.comment" | "github.commit" | "file" | "url" | "text";
215
+ uri: string;
216
+ visibility: "public" | "private" | "organization";
217
+ title?: string | undefined;
218
+ }[];
219
+ permissions: {
220
+ scope: "repo:read" | "repo:write" | "issue:comment" | "chat:postMessage" | "pr:create" | "pr:update" | "runner:local" | "network:restricted";
221
+ reason: string;
222
+ expiresAt?: string | undefined;
223
+ }[];
224
+ callback: {
225
+ provider: "github" | "slack" | "lark" | "webhook";
226
+ uri: string;
227
+ threadKey?: string | undefined;
228
+ };
229
+ metadata: Record<string, unknown>;
230
+ }, {
231
+ id: string;
232
+ source: "github" | "slack" | "lark" | "cli" | "webhook";
233
+ sourceEventId: string;
234
+ receivedAt: string;
235
+ actor: {
236
+ provider: "github" | "slack" | "lark";
237
+ providerUserId: string;
238
+ handle?: string | undefined;
239
+ displayName?: string | undefined;
240
+ organizationId?: string | undefined;
241
+ };
242
+ target: {
243
+ mention: string;
244
+ agentId: string;
245
+ executorHint?: "claude-code" | "codex" | "hermes" | "openclaw" | "custom" | undefined;
246
+ workspaceHint?: string | undefined;
247
+ };
248
+ command: {
249
+ rawText: string;
250
+ intent: "unknown" | "fix" | "review" | "investigate" | "explain" | "run";
251
+ args: Record<string, string | number | boolean>;
252
+ };
253
+ context: {
254
+ kind: "github.repo" | "github.issue" | "github.pull_request" | "github.comment" | "github.commit" | "file" | "url" | "text";
255
+ uri: string;
256
+ visibility: "public" | "private" | "organization";
257
+ title?: string | undefined;
258
+ }[];
259
+ permissions: {
260
+ scope: "repo:read" | "repo:write" | "issue:comment" | "chat:postMessage" | "pr:create" | "pr:update" | "runner:local" | "network:restricted";
261
+ reason: string;
262
+ expiresAt?: string | undefined;
263
+ }[];
264
+ callback: {
265
+ provider: "github" | "slack" | "lark" | "webhook";
266
+ uri: string;
267
+ threadKey?: string | undefined;
268
+ };
269
+ metadata: Record<string, unknown>;
270
+ }>;
271
+ export declare const OpenTagRunResultSchema: z.ZodObject<{
272
+ conclusion: z.ZodEnum<["success", "failure", "cancelled", "needs_human"]>;
273
+ summary: z.ZodString;
274
+ changedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
275
+ createdPullRequestUrl: z.ZodOptional<z.ZodString>;
276
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
+ title: z.ZodString;
278
+ uri: z.ZodString;
279
+ }, "strip", z.ZodTypeAny, {
280
+ uri: string;
281
+ title: string;
282
+ }, {
283
+ uri: string;
284
+ title: string;
285
+ }>, "many">>;
286
+ verification: z.ZodOptional<z.ZodArray<z.ZodObject<{
287
+ command: z.ZodString;
288
+ outcome: z.ZodEnum<["passed", "failed", "not_run"]>;
289
+ excerpt: z.ZodOptional<z.ZodString>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ command: string;
292
+ outcome: "passed" | "failed" | "not_run";
293
+ excerpt?: string | undefined;
294
+ }, {
295
+ command: string;
296
+ outcome: "passed" | "failed" | "not_run";
297
+ excerpt?: string | undefined;
298
+ }>, "many">>;
299
+ nextAction: z.ZodOptional<z.ZodString>;
300
+ }, "strip", z.ZodTypeAny, {
301
+ conclusion: "success" | "failure" | "cancelled" | "needs_human";
302
+ summary: string;
303
+ changedFiles?: string[] | undefined;
304
+ createdPullRequestUrl?: string | undefined;
305
+ artifacts?: {
306
+ uri: string;
307
+ title: string;
308
+ }[] | undefined;
309
+ verification?: {
310
+ command: string;
311
+ outcome: "passed" | "failed" | "not_run";
312
+ excerpt?: string | undefined;
313
+ }[] | undefined;
314
+ nextAction?: string | undefined;
315
+ }, {
316
+ conclusion: "success" | "failure" | "cancelled" | "needs_human";
317
+ summary: string;
318
+ changedFiles?: string[] | undefined;
319
+ createdPullRequestUrl?: string | undefined;
320
+ artifacts?: {
321
+ uri: string;
322
+ title: string;
323
+ }[] | undefined;
324
+ verification?: {
325
+ command: string;
326
+ outcome: "passed" | "failed" | "not_run";
327
+ excerpt?: string | undefined;
328
+ }[] | undefined;
329
+ nextAction?: string | undefined;
330
+ }>;
331
+ export declare const OpenTagRunSchema: z.ZodObject<{
332
+ id: z.ZodString;
333
+ eventId: z.ZodString;
334
+ status: z.ZodEnum<["queued", "assigned", "running", "needs_approval", "succeeded", "failed", "cancelled"]>;
335
+ assignedRunnerId: z.ZodOptional<z.ZodString>;
336
+ executor: z.ZodOptional<z.ZodString>;
337
+ createdAt: z.ZodString;
338
+ updatedAt: z.ZodString;
339
+ result: z.ZodOptional<z.ZodObject<{
340
+ conclusion: z.ZodEnum<["success", "failure", "cancelled", "needs_human"]>;
341
+ summary: z.ZodString;
342
+ changedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
343
+ createdPullRequestUrl: z.ZodOptional<z.ZodString>;
344
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
345
+ title: z.ZodString;
346
+ uri: z.ZodString;
347
+ }, "strip", z.ZodTypeAny, {
348
+ uri: string;
349
+ title: string;
350
+ }, {
351
+ uri: string;
352
+ title: string;
353
+ }>, "many">>;
354
+ verification: z.ZodOptional<z.ZodArray<z.ZodObject<{
355
+ command: z.ZodString;
356
+ outcome: z.ZodEnum<["passed", "failed", "not_run"]>;
357
+ excerpt: z.ZodOptional<z.ZodString>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ command: string;
360
+ outcome: "passed" | "failed" | "not_run";
361
+ excerpt?: string | undefined;
362
+ }, {
363
+ command: string;
364
+ outcome: "passed" | "failed" | "not_run";
365
+ excerpt?: string | undefined;
366
+ }>, "many">>;
367
+ nextAction: z.ZodOptional<z.ZodString>;
368
+ }, "strip", z.ZodTypeAny, {
369
+ conclusion: "success" | "failure" | "cancelled" | "needs_human";
370
+ summary: string;
371
+ changedFiles?: string[] | undefined;
372
+ createdPullRequestUrl?: string | undefined;
373
+ artifacts?: {
374
+ uri: string;
375
+ title: string;
376
+ }[] | undefined;
377
+ verification?: {
378
+ command: string;
379
+ outcome: "passed" | "failed" | "not_run";
380
+ excerpt?: string | undefined;
381
+ }[] | undefined;
382
+ nextAction?: string | undefined;
383
+ }, {
384
+ conclusion: "success" | "failure" | "cancelled" | "needs_human";
385
+ summary: string;
386
+ changedFiles?: string[] | undefined;
387
+ createdPullRequestUrl?: string | undefined;
388
+ artifacts?: {
389
+ uri: string;
390
+ title: string;
391
+ }[] | undefined;
392
+ verification?: {
393
+ command: string;
394
+ outcome: "passed" | "failed" | "not_run";
395
+ excerpt?: string | undefined;
396
+ }[] | undefined;
397
+ nextAction?: string | undefined;
398
+ }>>;
399
+ }, "strip", z.ZodTypeAny, {
400
+ status: "cancelled" | "failed" | "queued" | "assigned" | "running" | "needs_approval" | "succeeded";
401
+ id: string;
402
+ eventId: string;
403
+ createdAt: string;
404
+ updatedAt: string;
405
+ assignedRunnerId?: string | undefined;
406
+ executor?: string | undefined;
407
+ result?: {
408
+ conclusion: "success" | "failure" | "cancelled" | "needs_human";
409
+ summary: string;
410
+ changedFiles?: string[] | undefined;
411
+ createdPullRequestUrl?: string | undefined;
412
+ artifacts?: {
413
+ uri: string;
414
+ title: string;
415
+ }[] | undefined;
416
+ verification?: {
417
+ command: string;
418
+ outcome: "passed" | "failed" | "not_run";
419
+ excerpt?: string | undefined;
420
+ }[] | undefined;
421
+ nextAction?: string | undefined;
422
+ } | undefined;
423
+ }, {
424
+ status: "cancelled" | "failed" | "queued" | "assigned" | "running" | "needs_approval" | "succeeded";
425
+ id: string;
426
+ eventId: string;
427
+ createdAt: string;
428
+ updatedAt: string;
429
+ assignedRunnerId?: string | undefined;
430
+ executor?: string | undefined;
431
+ result?: {
432
+ conclusion: "success" | "failure" | "cancelled" | "needs_human";
433
+ summary: string;
434
+ changedFiles?: string[] | undefined;
435
+ createdPullRequestUrl?: string | undefined;
436
+ artifacts?: {
437
+ uri: string;
438
+ title: string;
439
+ }[] | undefined;
440
+ verification?: {
441
+ command: string;
442
+ outcome: "passed" | "failed" | "not_run";
443
+ excerpt?: string | undefined;
444
+ }[] | undefined;
445
+ nextAction?: string | undefined;
446
+ } | undefined;
447
+ }>;
448
+ export type ActorIdentity = z.infer<typeof ActorIdentitySchema>;
449
+ export type AgentTarget = z.infer<typeof AgentTargetSchema>;
450
+ export type OpenTagCommand = z.infer<typeof OpenTagCommandSchema>;
451
+ export type ContextPointer = z.infer<typeof ContextPointerSchema>;
452
+ export type PermissionGrant = z.infer<typeof PermissionGrantSchema>;
453
+ export type CallbackRoute = z.infer<typeof CallbackRouteSchema>;
454
+ export type OpenTagEvent = z.infer<typeof OpenTagEventSchema>;
455
+ export type OpenTagRun = z.infer<typeof OpenTagRunSchema>;
456
+ export type OpenTagRunResult = z.infer<typeof OpenTagRunResultSchema>;
457
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,YAAY,0DAAwD,CAAC;AAClF,eAAO,MAAM,cAAc,wCAAsC,CAAC;AAElE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;E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MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@opentag/core",
3
+ "version": "0.1.0",
4
+ "description": "Core OpenTag protocol schemas, types, JSON Schema, and mention parsing.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "development": "./src/index.ts",
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "keywords": [
23
+ "opentag",
24
+ "protocol",
25
+ "schemas",
26
+ "agents",
27
+ "mentions"
28
+ ],
29
+ "license": "Apache-2.0",
30
+ "dependencies": {
31
+ "zod-to-json-schema": "^3.25.2",
32
+ "zod": "^3.24.1"
33
+ },
34
+ "devDependencies": {
35
+ "tsup": "^8.3.5",
36
+ "typescript": "^5.7.2"
37
+ },
38
+ "scripts": {
39
+ "build": "tsup && tsc -b tsconfig.json --emitDeclarationOnly --force",
40
+ "lint": "tsc --noEmit"
41
+ }
42
+ }