@mastra/factory 0.17.3-alpha.6 → 0.18.0-alpha.7
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/factory.d.ts.map +1 -1
- package/dist/factory.js +9 -1
- package/dist/factory.js.map +1 -1
- package/dist/integrations/github/default-rules.d.ts.map +1 -1
- package/dist/integrations/github/default-rules.js +2 -0
- package/dist/integrations/github/default-rules.js.map +1 -1
- package/dist/integrations/github/rules.d.ts.map +1 -1
- package/dist/integrations/github/rules.js +20 -1
- package/dist/integrations/github/rules.js.map +1 -1
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +5 -2
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/rules/review-source-tool.d.ts +103 -0
- package/dist/rules/review-source-tool.d.ts.map +1 -0
- package/dist/rules/review-source-tool.js +109 -0
- package/dist/rules/review-source-tool.js.map +1 -0
- package/dist/skills/service.d.ts.map +1 -1
- package/dist/skills/service.js +16 -6
- package/dist/skills/service.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +11 -0
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +16 -0
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/dist/supervisor/session-messaging.d.ts +4 -1
- package/dist/supervisor/session-messaging.d.ts.map +1 -1
- package/dist/supervisor/session-messaging.js +8 -2
- package/dist/supervisor/session-messaging.js.map +1 -1
- package/dist/supervisor/write-tools.d.ts +2 -1
- package/dist/supervisor/write-tools.d.ts.map +1 -1
- package/dist/supervisor/write-tools.js +9 -2
- package/dist/supervisor/write-tools.js.map +1 -1
- package/dist/workspace.d.ts +7 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +45 -7
- package/dist/workspace.js.map +1 -1
- package/factory-skills/factory-gitlab-rereview/SKILL.md +3 -2
- package/factory-skills/factory-gitlab-review/SKILL.md +17 -1
- package/factory-skills/factory-rereview/SKILL.md +25 -4
- package/factory-skills/factory-review/SKILL.md +25 -4
- package/package.json +7 -7
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
|
+
import type { IntegrationTools } from '../integrations/base.js';
|
|
3
|
+
import type { WorkItemsStorage } from '../storage/domains/work-items/base.js';
|
|
4
|
+
import type { FactorySessionSourceLookup } from './binding-context.js';
|
|
5
|
+
export interface ReviewSourceOutput {
|
|
6
|
+
/**
|
|
7
|
+
* Browser-facing deep-link back to the Factory session that produced this
|
|
8
|
+
* review — the only field a review body publishes. Everything else on this
|
|
9
|
+
* shape is an input to in-run cross-checks and the session handoff, never a
|
|
10
|
+
* published field, so the GitHub/GitLab audience never sees the upstream
|
|
11
|
+
* Linear/Jira slug through the review comment.
|
|
12
|
+
*/
|
|
13
|
+
sessionUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* PR/MR author recorded on the review card at intake — for GitHub this is
|
|
16
|
+
* `pullRequest.user.login`, for GitLab it is the GitLab username. The skill
|
|
17
|
+
* cross-checks it against `gh pr view --json author` (`.author.login`) or
|
|
18
|
+
* the equivalent MR fetch; a mismatch means the session is bound to a
|
|
19
|
+
* different PR/MR than the one being reviewed.
|
|
20
|
+
*/
|
|
21
|
+
triggeredBy: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* The externalSource recorded on the review card itself — the PR/MR the
|
|
24
|
+
* session was intake-bound to. The skill cross-checks the reviewed PR/MR
|
|
25
|
+
* against this shape so a review can never quietly land on the wrong target.
|
|
26
|
+
*/
|
|
27
|
+
reviewTarget: {
|
|
28
|
+
integrationId: string;
|
|
29
|
+
type: string;
|
|
30
|
+
externalId: string;
|
|
31
|
+
url: string | null;
|
|
32
|
+
} | null;
|
|
33
|
+
/**
|
|
34
|
+
* Repository identity stamped on the review card at intake — the
|
|
35
|
+
* binding-side value for the null-`url` cross-check fallback. The skill must
|
|
36
|
+
* compare this against an identity resolved independently of the card (e.g.
|
|
37
|
+
* `gh api repos/<owner>/<repo> --jq .id` — the numeric REST id — for the
|
|
38
|
+
* session checkout's repository);
|
|
39
|
+
* comparing two values derived from the same checkout proves nothing.
|
|
40
|
+
* `null` when intake recorded no repository identity — in that case there
|
|
41
|
+
* is no verifiable bound repository and the fallback must not publish.
|
|
42
|
+
*/
|
|
43
|
+
boundRepository: {
|
|
44
|
+
provider: 'github';
|
|
45
|
+
repositoryId: number;
|
|
46
|
+
} | {
|
|
47
|
+
provider: 'gitlab';
|
|
48
|
+
host: string | null;
|
|
49
|
+
projectId: number;
|
|
50
|
+
} | null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Normalize the operator-provided browser-facing UI origin (the
|
|
54
|
+
* `MASTRACODE_PUBLIC_URL` env var) into the `uiOrigin` the tool accepts.
|
|
55
|
+
*
|
|
56
|
+
* Blank counts as unset: `mastracode/web/.env.schema` ships
|
|
57
|
+
* `MASTRACODE_PUBLIC_URL=` as the operator-facing line, so an empty or
|
|
58
|
+
* whitespace-only value is the expected "not configured" state — it must map
|
|
59
|
+
* to `null` (tool omitted) rather than register the tool and publish a
|
|
60
|
+
* hostless `sessionUrl` into a public review body.
|
|
61
|
+
*/
|
|
62
|
+
export declare function resolveReviewSourceUiOrigin(raw: string | undefined): string | null;
|
|
63
|
+
/**
|
|
64
|
+
* `factory_review_source` — read the routing facts behind the current review
|
|
65
|
+
* session (session deep-link, PR/MR author, the review target) so the review
|
|
66
|
+
* agent can attribute its verdict to a concrete originating run and detect a
|
|
67
|
+
* mis-targeted review before it publishes.
|
|
68
|
+
*
|
|
69
|
+
* The tool exists to make cross-PR misattribution detectable both in-run and
|
|
70
|
+
* after the fact: a review lands on GitHub/GitLab with the Factory session URL
|
|
71
|
+
* that produced it, and the human who investigates a suspicious review can
|
|
72
|
+
* jump straight to the run.
|
|
73
|
+
*
|
|
74
|
+
* All fields are derived server-side from the bound work item — nothing enters
|
|
75
|
+
* from the agent's tool arguments — so the session URL always points at the
|
|
76
|
+
* caller's own session, never one it was asked to name.
|
|
77
|
+
*
|
|
78
|
+
* The tool is intentionally omitted (returns `{}`) whenever it cannot produce
|
|
79
|
+
* a complete, correct provenance shape: no resolvable session address, no
|
|
80
|
+
* active binding, a non-review-role binding, no bound work item, or no
|
|
81
|
+
* configured browser-facing UI origin. Skills treat tool-absent identically to
|
|
82
|
+
* tool-failed: stop-don't-publish.
|
|
83
|
+
*/
|
|
84
|
+
export declare function createReviewSourceTool(options: {
|
|
85
|
+
requestContext: RequestContext;
|
|
86
|
+
storage: Pick<WorkItemsStorage, 'findActiveRunBindingByThread' | 'findActiveRunBinding' | 'get'>;
|
|
87
|
+
sessions?: FactorySessionSourceLookup;
|
|
88
|
+
/**
|
|
89
|
+
* Browser-facing UI origin, no trailing slash. In a separate-SPA deployment
|
|
90
|
+
* (API host distinct from UI host) this is the UI host — the origin the
|
|
91
|
+
* emitted session link opens in. `MastraFactoryConfig.publicUrl` is the API
|
|
92
|
+
* origin and must not be used here; the caller resolves the UI origin (see
|
|
93
|
+
* `factory.ts`) via the `MASTRACODE_PUBLIC_URL` env var.
|
|
94
|
+
*
|
|
95
|
+
* `null` means no browser-facing origin is configured. Match the Slack
|
|
96
|
+
* session-link surface (`integrations/slack/slack.ts:168-171`, `:809-812`),
|
|
97
|
+
* which omits the deep-link entirely rather than publishing an API/localhost
|
|
98
|
+
* URL into a public body: the tool is dropped from the toolset, and the
|
|
99
|
+
* skill's tool-not-available branch stops publication.
|
|
100
|
+
*/
|
|
101
|
+
uiOrigin: string | null;
|
|
102
|
+
}): Promise<IntegrationTools>;
|
|
103
|
+
//# sourceMappingURL=review-source-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-source-tool.d.ts","sourceRoot":"","sources":["../../src/rules/review-source-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,C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+
import { createTool } from "@mastra/core/tools";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/rules/review-source-tool.ts
|
|
5
|
+
/**
|
|
6
|
+
* Normalize the operator-provided browser-facing UI origin (the
|
|
7
|
+
* `MASTRACODE_PUBLIC_URL` env var) into the `uiOrigin` the tool accepts.
|
|
8
|
+
*
|
|
9
|
+
* Blank counts as unset: `mastracode/web/.env.schema` ships
|
|
10
|
+
* `MASTRACODE_PUBLIC_URL=` as the operator-facing line, so an empty or
|
|
11
|
+
* whitespace-only value is the expected "not configured" state — it must map
|
|
12
|
+
* to `null` (tool omitted) rather than register the tool and publish a
|
|
13
|
+
* hostless `sessionUrl` into a public review body.
|
|
14
|
+
*/
|
|
15
|
+
function resolveReviewSourceUiOrigin(raw) {
|
|
16
|
+
return raw?.trim().replace(/\/+$/, "") || null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* `factory_review_source` — read the routing facts behind the current review
|
|
20
|
+
* session (session deep-link, PR/MR author, the review target) so the review
|
|
21
|
+
* agent can attribute its verdict to a concrete originating run and detect a
|
|
22
|
+
* mis-targeted review before it publishes.
|
|
23
|
+
*
|
|
24
|
+
* The tool exists to make cross-PR misattribution detectable both in-run and
|
|
25
|
+
* after the fact: a review lands on GitHub/GitLab with the Factory session URL
|
|
26
|
+
* that produced it, and the human who investigates a suspicious review can
|
|
27
|
+
* jump straight to the run.
|
|
28
|
+
*
|
|
29
|
+
* All fields are derived server-side from the bound work item — nothing enters
|
|
30
|
+
* from the agent's tool arguments — so the session URL always points at the
|
|
31
|
+
* caller's own session, never one it was asked to name.
|
|
32
|
+
*
|
|
33
|
+
* The tool is intentionally omitted (returns `{}`) whenever it cannot produce
|
|
34
|
+
* a complete, correct provenance shape: no resolvable session address, no
|
|
35
|
+
* active binding, a non-review-role binding, no bound work item, or no
|
|
36
|
+
* configured browser-facing UI origin. Skills treat tool-absent identically to
|
|
37
|
+
* tool-failed: stop-don't-publish.
|
|
38
|
+
*/
|
|
39
|
+
async function createReviewSourceTool(options) {
|
|
40
|
+
if (options.uiOrigin === null) return {};
|
|
41
|
+
const resolution = await resolveFactorySessionAddress({
|
|
42
|
+
requestContext: options.requestContext,
|
|
43
|
+
storage: options.storage,
|
|
44
|
+
sessions: options.sessions
|
|
45
|
+
});
|
|
46
|
+
if (!resolution) return {};
|
|
47
|
+
const binding = resolution.binding ?? await options.storage.findActiveRunBinding(resolution.address);
|
|
48
|
+
if (!binding || binding.role !== "review") return {};
|
|
49
|
+
const item = await options.storage.get({
|
|
50
|
+
orgId: binding.orgId,
|
|
51
|
+
id: binding.workItemId
|
|
52
|
+
});
|
|
53
|
+
if (!item) return {};
|
|
54
|
+
const output = {
|
|
55
|
+
sessionUrl: buildSessionUrl({
|
|
56
|
+
uiOrigin: options.uiOrigin,
|
|
57
|
+
factoryProjectId: binding.factoryProjectId,
|
|
58
|
+
sessionId: binding.sessionId,
|
|
59
|
+
threadId: binding.threadId
|
|
60
|
+
}),
|
|
61
|
+
triggeredBy: readPullRequestAuthor(item),
|
|
62
|
+
reviewTarget: readReviewTarget(item),
|
|
63
|
+
boundRepository: readBoundRepository(item)
|
|
64
|
+
};
|
|
65
|
+
return { factory_review_source: createTool({
|
|
66
|
+
id: "factory_review_source",
|
|
67
|
+
description: "Read the routing facts behind this review session: a deep-link back to the Factory session that produced the review, the PR/MR author recorded on the review card, and the review target (the PR/MR the session was intake-bound to). Publish the session URL in the required `Factory Session` block of every review body so a misattributed review can always be traced back to the run that produced it. Cross-check `triggeredBy` and `reviewTarget` against the PR/MR you fetched in Phase 1, using `boundRepository` as the intake-stamped repository identity when `reviewTarget.url` is null; do not publish the `triggeredBy`, `reviewTarget`, or `boundRepository` fields.",
|
|
68
|
+
inputSchema: z.object({}),
|
|
69
|
+
execute: async () => output
|
|
70
|
+
}) };
|
|
71
|
+
}
|
|
72
|
+
function buildSessionUrl(input) {
|
|
73
|
+
return `${input.uiOrigin.replace(/\/+$/, "")}/factories/${encodeURIComponent(input.factoryProjectId)}/workspaces/${encodeURIComponent(input.sessionId)}/threads/${encodeURIComponent(input.threadId)}`;
|
|
74
|
+
}
|
|
75
|
+
function readReviewTarget(item) {
|
|
76
|
+
const source = item.externalSource;
|
|
77
|
+
if (!source) return null;
|
|
78
|
+
return {
|
|
79
|
+
integrationId: source.integrationId,
|
|
80
|
+
type: source.type,
|
|
81
|
+
externalId: source.externalId,
|
|
82
|
+
url: typeof source.url === "string" && source.url ? source.url : null
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function readBoundRepository(item) {
|
|
86
|
+
const metadata = item.metadata;
|
|
87
|
+
if (!metadata) return null;
|
|
88
|
+
if (typeof metadata.githubRepositoryId === "number") return {
|
|
89
|
+
provider: "github",
|
|
90
|
+
repositoryId: metadata.githubRepositoryId
|
|
91
|
+
};
|
|
92
|
+
if (typeof metadata.gitlabProjectId === "number") return {
|
|
93
|
+
provider: "gitlab",
|
|
94
|
+
host: typeof metadata.gitlabHost === "string" && metadata.gitlabHost ? metadata.gitlabHost : null,
|
|
95
|
+
projectId: metadata.gitlabProjectId
|
|
96
|
+
};
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
function readPullRequestAuthor(item) {
|
|
100
|
+
const metadata = item.metadata;
|
|
101
|
+
if (!metadata) return null;
|
|
102
|
+
const author = metadata.author;
|
|
103
|
+
if (typeof author === "string" && author.trim()) return author.trim();
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { createReviewSourceTool, resolveReviewSourceUiOrigin };
|
|
108
|
+
|
|
109
|
+
//# sourceMappingURL=review-source-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-source-tool.js","names":[],"sources":["../../src/rules/review-source-tool.ts"],"sourcesContent":["import type { RequestContext } from '@mastra/core/request-context';\nimport { createTool } from '@mastra/core/tools';\nimport { z } from 'zod';\n\nimport type { IntegrationTools } from '../integrations/base.js';\nimport type { WorkItemRow, WorkItemsStorage } from '../storage/domains/work-items/base.js';\nimport type { FactorySessionSourceLookup } from './binding-context.js';\nimport { resolveFactorySessionAddress } from './binding-context.js';\n\nexport interface ReviewSourceOutput {\n /**\n * Browser-facing deep-link back to the Factory session that produced this\n * review — the only field a review body publishes. Everything else on this\n * shape is an input to in-run cross-checks and the session handoff, never a\n * published field, so the GitHub/GitLab audience never sees the upstream\n * Linear/Jira slug through the review comment.\n */\n sessionUrl: string;\n /**\n * PR/MR author recorded on the review card at intake — for GitHub this is\n * `pullRequest.user.login`, for GitLab it is the GitLab username. The skill\n * cross-checks it against `gh pr view --json author` (`.author.login`) or\n * the equivalent MR fetch; a mismatch means the session is bound to a\n * different PR/MR than the one being reviewed.\n */\n triggeredBy: string | null;\n /**\n * The externalSource recorded on the review card itself — the PR/MR the\n * session was intake-bound to. The skill cross-checks the reviewed PR/MR\n * against this shape so a review can never quietly land on the wrong target.\n */\n reviewTarget: {\n integrationId: string;\n type: string;\n externalId: string;\n url: string | null;\n } | null;\n /**\n * Repository identity stamped on the review card at intake — the\n * binding-side value for the null-`url` cross-check fallback. The skill must\n * compare this against an identity resolved independently of the card (e.g.\n * `gh api repos/<owner>/<repo> --jq .id` — the numeric REST id — for the\n * session checkout's repository);\n * comparing two values derived from the same checkout proves nothing.\n * `null` when intake recorded no repository identity — in that case there\n * is no verifiable bound repository and the fallback must not publish.\n */\n boundRepository:\n | { provider: 'github'; repositoryId: number }\n | { provider: 'gitlab'; host: string | null; projectId: number }\n | null;\n}\n\n/**\n * Normalize the operator-provided browser-facing UI origin (the\n * `MASTRACODE_PUBLIC_URL` env var) into the `uiOrigin` the tool accepts.\n *\n * Blank counts as unset: `mastracode/web/.env.schema` ships\n * `MASTRACODE_PUBLIC_URL=` as the operator-facing line, so an empty or\n * whitespace-only value is the expected \"not configured\" state — it must map\n * to `null` (tool omitted) rather than register the tool and publish a\n * hostless `sessionUrl` into a public review body.\n */\nexport function resolveReviewSourceUiOrigin(raw: string | undefined): string | null {\n return raw?.trim().replace(/\\/+$/, '') || null;\n}\n\n/**\n * `factory_review_source` — read the routing facts behind the current review\n * session (session deep-link, PR/MR author, the review target) so the review\n * agent can attribute its verdict to a concrete originating run and detect a\n * mis-targeted review before it publishes.\n *\n * The tool exists to make cross-PR misattribution detectable both in-run and\n * after the fact: a review lands on GitHub/GitLab with the Factory session URL\n * that produced it, and the human who investigates a suspicious review can\n * jump straight to the run.\n *\n * All fields are derived server-side from the bound work item — nothing enters\n * from the agent's tool arguments — so the session URL always points at the\n * caller's own session, never one it was asked to name.\n *\n * The tool is intentionally omitted (returns `{}`) whenever it cannot produce\n * a complete, correct provenance shape: no resolvable session address, no\n * active binding, a non-review-role binding, no bound work item, or no\n * configured browser-facing UI origin. Skills treat tool-absent identically to\n * tool-failed: stop-don't-publish.\n */\nexport async function createReviewSourceTool(options: {\n requestContext: RequestContext;\n storage: Pick<WorkItemsStorage, 'findActiveRunBindingByThread' | 'findActiveRunBinding' | 'get'>;\n sessions?: FactorySessionSourceLookup;\n /**\n * Browser-facing UI origin, no trailing slash. In a separate-SPA deployment\n * (API host distinct from UI host) this is the UI host — the origin the\n * emitted session link opens in. `MastraFactoryConfig.publicUrl` is the API\n * origin and must not be used here; the caller resolves the UI origin (see\n * `factory.ts`) via the `MASTRACODE_PUBLIC_URL` env var.\n *\n * `null` means no browser-facing origin is configured. Match the Slack\n * session-link surface (`integrations/slack/slack.ts:168-171`, `:809-812`),\n * which omits the deep-link entirely rather than publishing an API/localhost\n * URL into a public body: the tool is dropped from the toolset, and the\n * skill's tool-not-available branch stops publication.\n */\n uiOrigin: string | null;\n}): Promise<IntegrationTools> {\n if (options.uiOrigin === null) return {};\n const resolution = await resolveFactorySessionAddress({\n requestContext: options.requestContext,\n storage: options.storage,\n sessions: options.sessions,\n });\n if (!resolution) return {};\n const binding = resolution.binding ?? (await options.storage.findActiveRunBinding(resolution.address));\n // The tool exists only for review-role sessions. Work/plan/triage runs never\n // publish reviews on GitHub, so exposing them the tool would just clutter\n // their prompt.\n if (!binding || binding.role !== 'review') return {};\n\n const item = await options.storage.get({ orgId: binding.orgId, id: binding.workItemId });\n if (!item) return {};\n\n const sessionUrl = buildSessionUrl({\n uiOrigin: options.uiOrigin,\n factoryProjectId: binding.factoryProjectId,\n sessionId: binding.sessionId,\n threadId: binding.threadId,\n });\n const triggeredBy = readPullRequestAuthor(item);\n const reviewTarget = readReviewTarget(item);\n const boundRepository = readBoundRepository(item);\n // Every field is pre-resolved server-side and returned as a plain object.\n // The tool takes no arguments and does no further I/O, so a review-role\n // session either sees a complete provenance shape or the tool is absent —\n // the skill treats those branches identically (stop-don't-publish).\n const output: ReviewSourceOutput = { sessionUrl, triggeredBy, reviewTarget, boundRepository };\n\n return {\n factory_review_source: createTool({\n id: 'factory_review_source',\n description:\n 'Read the routing facts behind this review session: a deep-link back to the Factory session that produced the review, the PR/MR author recorded on the review card, and the review target (the PR/MR the session was intake-bound to). Publish the session URL in the required `Factory Session` block of every review body so a misattributed review can always be traced back to the run that produced it. Cross-check `triggeredBy` and `reviewTarget` against the PR/MR you fetched in Phase 1, using `boundRepository` as the intake-stamped repository identity when `reviewTarget.url` is null; do not publish the `triggeredBy`, `reviewTarget`, or `boundRepository` fields.',\n inputSchema: z.object({}),\n execute: async (): Promise<ReviewSourceOutput> => output,\n }),\n };\n}\n\nfunction buildSessionUrl(input: {\n uiOrigin: string;\n factoryProjectId: string;\n sessionId: string;\n threadId: string;\n}): string {\n const origin = input.uiOrigin.replace(/\\/+$/, '');\n return `${origin}/factories/${encodeURIComponent(input.factoryProjectId)}/workspaces/${encodeURIComponent(input.sessionId)}/threads/${encodeURIComponent(input.threadId)}`;\n}\n\nfunction readReviewTarget(item: WorkItemRow): ReviewSourceOutput['reviewTarget'] {\n const source = item.externalSource;\n if (!source) return null;\n return {\n integrationId: source.integrationId,\n type: source.type,\n externalId: source.externalId,\n url: typeof source.url === 'string' && source.url ? source.url : null,\n };\n}\n\nfunction readBoundRepository(item: WorkItemRow): ReviewSourceOutput['boundRepository'] {\n const metadata = item.metadata;\n if (!metadata) return null;\n // Intake stamps repository identity on every PR/MR card:\n // `github/default-rules.ts` writes `githubRepositoryId`, and\n // `gitlab/default-rules.ts` writes `gitlabHost` + `gitlabProjectId`.\n if (typeof metadata.githubRepositoryId === 'number') {\n return { provider: 'github', repositoryId: metadata.githubRepositoryId };\n }\n if (typeof metadata.gitlabProjectId === 'number') {\n return {\n provider: 'gitlab',\n host: typeof metadata.gitlabHost === 'string' && metadata.gitlabHost ? metadata.gitlabHost : null,\n projectId: metadata.gitlabProjectId,\n };\n }\n return null;\n}\n\nfunction readPullRequestAuthor(item: WorkItemRow): string | null {\n const metadata = item.metadata;\n if (!metadata) return null;\n const author = metadata.author;\n if (typeof author === 'string' && author.trim()) return author.trim();\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;AA+DA,SAAgB,4BAA4B,KAAwC;CAClF,OAAO,KAAK,KAAK,CAAC,CAAC,QAAQ,QAAQ,EAAE,KAAK;AAC5C;;;;;;;;;;;;;;;;;;;;;;AAuBA,eAAsB,uBAAuB,SAkBf;CAC5B,IAAI,QAAQ,aAAa,MAAM,OAAO,CAAC;CACvC,MAAM,aAAa,MAAM,6BAA6B;EACpD,gBAAgB,QAAQ;EACxB,SAAS,QAAQ;EACjB,UAAU,QAAQ;CACpB,CAAC;CACD,IAAI,CAAC,YAAY,OAAO,CAAC;CACzB,MAAM,UAAU,WAAW,WAAY,MAAM,QAAQ,QAAQ,qBAAqB,WAAW,OAAO;CAIpG,IAAI,CAAC,WAAW,QAAQ,SAAS,UAAU,OAAO,CAAC;CAEnD,MAAM,OAAO,MAAM,QAAQ,QAAQ,IAAI;EAAE,OAAO,QAAQ;EAAO,IAAI,QAAQ;CAAW,CAAC;CACvF,IAAI,CAAC,MAAM,OAAO,CAAC;CAenB,MAAM,SAA6B;EAAE,YAblB,gBAAgB;GACjC,UAAU,QAAQ;GAClB,kBAAkB,QAAQ;GAC1B,WAAW,QAAQ;GACnB,UAAU,QAAQ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AMG;AACH,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,sBAAsB,CAAC,EAC1E,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAoBxE;AAED,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,sBAAsB,CAAC,EAC1E,KAAK,EAAE,oBAAoB,EAC3B,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAIjD"}
|
package/dist/skills/service.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { REVIEW_ONLY_FACTORY_SKILLS, rescanFactorySkills } from "../workspace.js";
|
|
1
2
|
import { formatSkillActivation } from "@mastra/core/workspace";
|
|
2
3
|
//#region src/skills/service.ts
|
|
3
4
|
var SkillInvocationError = class extends Error {
|
|
@@ -8,6 +9,19 @@ var SkillInvocationError = class extends Error {
|
|
|
8
9
|
this.code = code;
|
|
9
10
|
}
|
|
10
11
|
};
|
|
12
|
+
async function findSkill(session, name) {
|
|
13
|
+
const skills = session.getWorkspace().skills;
|
|
14
|
+
if (!skills) return void 0;
|
|
15
|
+
await skills.maybeRefresh();
|
|
16
|
+
const skill = await skills.get(name);
|
|
17
|
+
if (skill || !REVIEW_ONLY_FACTORY_SKILLS.has(name)) return skill;
|
|
18
|
+
try {
|
|
19
|
+
await rescanFactorySkills(skills);
|
|
20
|
+
} catch {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
return skills.get(name);
|
|
24
|
+
}
|
|
11
25
|
function escapeSkillBoundary(value) {
|
|
12
26
|
return value.replaceAll("</skill>", "</skill>");
|
|
13
27
|
}
|
|
@@ -23,9 +37,7 @@ async function resolvePromptInvocation(controller, input) {
|
|
|
23
37
|
async function resolveSkillInvocation(controller, input) {
|
|
24
38
|
const session = await controller.getSessionByResource(input.resourceId, input.scope);
|
|
25
39
|
if (!session) throw new SkillInvocationError("session_not_found", "Agent controller session not found.");
|
|
26
|
-
const
|
|
27
|
-
await skills?.maybeRefresh();
|
|
28
|
-
const skill = await skills?.get(input.name);
|
|
40
|
+
const skill = await findSkill(session, input.name);
|
|
29
41
|
if (!skill || skill["user-invocable"] === false) throw new SkillInvocationError("skill_not_found", `Skill not found: ${input.name}.`);
|
|
30
42
|
const args = input.arguments?.trim();
|
|
31
43
|
const content = `${formatSkillActivation(skill)}${args ? `\n\nARGUMENTS: ${args}` : ""}`.trim();
|
|
@@ -45,9 +57,7 @@ async function resolveSkillInvocation(controller, input) {
|
|
|
45
57
|
async function resolveSkillResumeInvocation(controller, input) {
|
|
46
58
|
const session = await controller.getSessionByResource(input.resourceId, input.scope);
|
|
47
59
|
if (!session) throw new SkillInvocationError("session_not_found", "Agent controller session not found.");
|
|
48
|
-
const
|
|
49
|
-
await skills?.maybeRefresh();
|
|
50
|
-
const skill = await skills?.get(input.name);
|
|
60
|
+
const skill = await findSkill(session, input.name);
|
|
51
61
|
if (!skill || skill["user-invocable"] === false) throw new SkillInvocationError("skill_not_found", `Skill not found: ${input.name}.`);
|
|
52
62
|
const args = input.arguments?.trim();
|
|
53
63
|
const content = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","names":[],"sources":["../../src/skills/service.ts"],"sourcesContent":["import type { MastraCodeState } from '@mastra/code-sdk/schema';\nimport type { SendAgentSignalResult } from '@mastra/core/agent';\nimport type { AgentController } from '@mastra/core/agent-controller';\nimport type { RequestContext } from '@mastra/core/request-context';\nimport { formatSkillActivation } from '@mastra/core/workspace';\nimport type { Workspace } from '@mastra/core/workspace';\n\nexport interface SkillInvocationInput {\n resourceId: string;\n scope?: string;\n name: string;\n arguments?: string;\n}\n\nexport interface SkillSession {\n getWorkspace(): Workspace;\n sendMessage(input: { content: string; requestContext?: RequestContext }): Promise<unknown>;\n sendNotificationSignal(\n input: {\n source: string;\n kind: string;\n summary: string;\n priority?: 'low' | 'medium' | 'high' | 'urgent';\n payload?: unknown;\n dedupeKey?: string;\n sourceId?: string;\n },\n options?: {\n ifActive?: { behavior?: 'deliver' | 'persist' };\n ifIdle?: { behavior?: 'persist' | 'wake' };\n requestContext?: RequestContext;\n },\n ): Promise<Pick<SendAgentSignalResult, 'persisted' | 'accepted'>>;\n}\n\nexport class SkillInvocationError extends Error {\n readonly code: 'session_not_found' | 'skill_not_found';\n\n constructor(code: SkillInvocationError['code'], message: string) {\n super(message);\n this.name = 'SkillInvocationError';\n this.code = code;\n }\n}\n\nfunction escapeSkillBoundary(value: string): string {\n return value.replaceAll('</skill>', '</skill>');\n}\n\n/** Kicks a run off from a plain prompt, for runs that activate no skill. */\nexport async function resolvePromptInvocation(\n controller: Pick<AgentController<MastraCodeState>, 'getSessionByResource'>,\n input: { resourceId: string; scope?: SkillInvocationInput['scope']; prompt: string },\n): Promise<{ session: SkillSession; message: string }> {\n const session = (await controller.getSessionByResource(input.resourceId, input.scope)) as SkillSession | undefined;\n if (!session) throw new SkillInvocationError('session_not_found', 'Agent controller session not found.');\n return { session, message: input.prompt };\n}\n\nexport async function resolveSkillInvocation(\n controller: Pick<AgentController<MastraCodeState>, 'getSessionByResource'>,\n input: SkillInvocationInput,\n): Promise<{ session: SkillSession; skillName: string; message: string }> {\n const session = (await controller.getSessionByResource(input.resourceId, input.scope)) as SkillSession | undefined;\n if (!session) throw new SkillInvocationError('session_not_found', 'Agent controller session not found.');\n\n const
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../src/skills/service.ts"],"sourcesContent":["import type { MastraCodeState } from '@mastra/code-sdk/schema';\nimport type { SendAgentSignalResult } from '@mastra/core/agent';\nimport type { AgentController } from '@mastra/core/agent-controller';\nimport type { RequestContext } from '@mastra/core/request-context';\nimport { formatSkillActivation } from '@mastra/core/workspace';\nimport type { Workspace } from '@mastra/core/workspace';\n\nimport { REVIEW_ONLY_FACTORY_SKILLS, rescanFactorySkills } from '../workspace.js';\n\nexport interface SkillInvocationInput {\n resourceId: string;\n scope?: string;\n name: string;\n arguments?: string;\n}\n\nexport interface SkillSession {\n getWorkspace(): Workspace;\n sendMessage(input: { content: string; requestContext?: RequestContext }): Promise<unknown>;\n sendNotificationSignal(\n input: {\n source: string;\n kind: string;\n summary: string;\n priority?: 'low' | 'medium' | 'high' | 'urgent';\n payload?: unknown;\n dedupeKey?: string;\n sourceId?: string;\n },\n options?: {\n ifActive?: { behavior?: 'deliver' | 'persist' };\n ifIdle?: { behavior?: 'persist' | 'wake' };\n requestContext?: RequestContext;\n },\n ): Promise<Pick<SendAgentSignalResult, 'persisted' | 'accepted'>>;\n}\n\nexport class SkillInvocationError extends Error {\n readonly code: 'session_not_found' | 'skill_not_found';\n\n constructor(code: SkillInvocationError['code'], message: string) {\n super(message);\n this.name = 'SkillInvocationError';\n this.code = code;\n }\n}\n\nasync function findSkill(session: SkillSession, name: string) {\n const skills = session.getWorkspace().skills;\n if (!skills) return undefined;\n await skills.maybeRefresh();\n const skill = await skills.get(name);\n if (skill || !REVIEW_ONLY_FACTORY_SKILLS.has(name)) return skill;\n // The cache may predate the review binding this run was just given.\n try {\n await rescanFactorySkills(skills);\n } catch {\n return undefined;\n }\n return skills.get(name);\n}\n\nfunction escapeSkillBoundary(value: string): string {\n return value.replaceAll('</skill>', '</skill>');\n}\n\n/** Kicks a run off from a plain prompt, for runs that activate no skill. */\nexport async function resolvePromptInvocation(\n controller: Pick<AgentController<MastraCodeState>, 'getSessionByResource'>,\n input: { resourceId: string; scope?: SkillInvocationInput['scope']; prompt: string },\n): Promise<{ session: SkillSession; message: string }> {\n const session = (await controller.getSessionByResource(input.resourceId, input.scope)) as SkillSession | undefined;\n if (!session) throw new SkillInvocationError('session_not_found', 'Agent controller session not found.');\n return { session, message: input.prompt };\n}\n\nexport async function resolveSkillInvocation(\n controller: Pick<AgentController<MastraCodeState>, 'getSessionByResource'>,\n input: SkillInvocationInput,\n): Promise<{ session: SkillSession; skillName: string; message: string }> {\n const session = (await controller.getSessionByResource(input.resourceId, input.scope)) as SkillSession | undefined;\n if (!session) throw new SkillInvocationError('session_not_found', 'Agent controller session not found.');\n\n const skill = await findSkill(session, input.name);\n if (!skill || skill['user-invocable'] === false) {\n throw new SkillInvocationError('skill_not_found', `Skill not found: ${input.name}.`);\n }\n\n const args = input.arguments?.trim();\n const content = `${formatSkillActivation(skill)}${args ? `\\n\\nARGUMENTS: ${args}` : ''}`.trim();\n return {\n session,\n skillName: skill.name,\n message: `<skill name=\"${skill.name}\">\\n${escapeSkillBoundary(content)}\\n</skill>`,\n };\n}\n\n/**\n * Same-stage re-entry: the skill is already active in the card's live session.\n * Resolve a compact continuation that references the skill by name and carries\n * only the fresh arguments, instead of re-pasting the whole skill document. If\n * the skill body was compacted out of context, the agent can re-open it with the\n * skill tool.\n */\nexport async function resolveSkillResumeInvocation(\n controller: Pick<AgentController<MastraCodeState>, 'getSessionByResource'>,\n input: SkillInvocationInput,\n): Promise<{ session: SkillSession; skillName: string; message: string }> {\n const session = (await controller.getSessionByResource(input.resourceId, input.scope)) as SkillSession | undefined;\n if (!session) throw new SkillInvocationError('session_not_found', 'Agent controller session not found.');\n\n const skill = await findSkill(session, input.name);\n if (!skill || skill['user-invocable'] === false) {\n throw new SkillInvocationError('skill_not_found', `Skill not found: ${input.name}.`);\n }\n\n const args = input.arguments?.trim();\n const content = [\n `Resume the active ${skill.name} session — it is already open in this thread; continue it rather than restarting.`,\n `Re-open the ${skill.name} skill with the skill tool if its instructions are no longer in context.`,\n ...(args ? [`ARGUMENTS: ${args}`] : []),\n ].join('\\n');\n return {\n session,\n skillName: skill.name,\n message: `<skill name=\"${skill.name}\">\\n${escapeSkillBoundary(content)}\\n</skill>`,\n };\n}\n\nexport async function dispatchSkillInvocation(\n controller: Pick<AgentController<MastraCodeState>, 'getSessionByResource'>,\n input: SkillInvocationInput,\n requestContext?: RequestContext,\n): Promise<{ skillName: string; message: string }> {\n const resolved = await resolveSkillInvocation(controller, input);\n await resolved.session.sendMessage({ content: resolved.message, ...(requestContext ? { requestContext } : {}) });\n return { skillName: resolved.skillName, message: resolved.message };\n}\n"],"mappings":";;;AAqCA,IAAa,uBAAb,cAA0C,MAAM;CAC9C;CAEA,YAAY,MAAoC,SAAiB;EAC/D,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;CACd;AACF;AAEA,eAAe,UAAU,SAAuB,MAAc;CAC5D,MAAM,SAAS,QAAQ,aAAa,CAAC,CAAC;CACtC,IAAI,CAAC,QAAQ,OAAO,KAAA;CACpB,MAAM,OAAO,aAAa;CAC1B,MAAM,QAAQ,MAAM,OAAO,IAAI,IAAI;CACnC,IAAI,SAAS,CAAC,2BAA2B,IAAI,IAAI,GAAG,OAAO;CAE3D,IAAI;EACF,MAAM,oBAAoB,MAAM;CAClC,QAAQ;EACN;CACF;CACA,OAAO,OAAO,IAAI,IAAI;AACxB;AAEA,SAAS,oBAAoB,OAAuB;CAClD,OAAO,MAAM,WAAW,YAAY,gBAAgB;AACtD;;AAGA,eAAsB,wBACpB,YACA,OACqD;CACrD,MAAM,UAAW,MAAM,WAAW,qBAAqB,MAAM,YAAY,MAAM,KAAK;CACpF,IAAI,CAAC,SAAS,MAAM,IAAI,qBAAqB,qBAAqB,qCAAqC;CACvG,OAAO;EAAE;EAAS,SAAS,MAAM;CAAO;AAC1C;AAEA,eAAsB,uBACpB,YACA,OACwE;CACxE,MAAM,UAAW,MAAM,WAAW,qBAAqB,MAAM,YAAY,MAAM,KAAK;CACpF,IAAI,CAAC,SAAS,MAAM,IAAI,qBAAqB,qBAAqB,qCAAqC;CAEvG,MAAM,QAAQ,MAAM,UAAU,SAAS,MAAM,IAAI;CACjD,IAAI,CAAC,SAAS,MAAM,sBAAsB,OACxC,MAAM,IAAI,qBAAqB,mBAAmB,oBAAoB,MAAM,KAAK,EAAE;CAGrF,MAAM,OAAO,MAAM,WAAW,KAAK;CACnC,MAAM,UAAU,GAAG,sBAAsB,KAAK,IAAI,OAAO,kBAAkB,SAAS,KAAK,KAAK;CAC9F,OAAO;EACL;EACA,WAAW,MAAM;EACjB,SAAS,gBAAgB,MAAM,KAAK,MAAM,oBAAoB,OAAO,EAAE;CACzE;AACF;;;;;;;;AASA,eAAsB,6BACpB,YACA,OACwE;CACxE,MAAM,UAAW,MAAM,WAAW,qBAAqB,MAAM,YAAY,MAAM,KAAK;CACpF,IAAI,CAAC,SAAS,MAAM,IAAI,qBAAqB,qBAAqB,qCAAqC;CAEvG,MAAM,QAAQ,MAAM,UAAU,SAAS,MAAM,IAAI;CACjD,IAAI,CAAC,SAAS,MAAM,sBAAsB,OACxC,MAAM,IAAI,qBAAqB,mBAAmB,oBAAoB,MAAM,KAAK,EAAE;CAGrF,MAAM,OAAO,MAAM,WAAW,KAAK;CACnC,MAAM,UAAU;EACd,qBAAqB,MAAM,KAAK;EAChC,eAAe,MAAM,KAAK;EAC1B,GAAI,OAAO,CAAC,cAAc,MAAM,IAAI,CAAC;CACvC,CAAC,CAAC,KAAK,IAAI;CACX,OAAO;EACL;EACA,WAAW,MAAM;EACjB,SAAS,gBAAgB,MAAM,KAAK,MAAM,oBAAoB,OAAO,EAAE;CACzE;AACF;AAEA,eAAsB,wBACpB,YACA,OACA,gBACiD;CACjD,MAAM,WAAW,MAAM,uBAAuB,YAAY,KAAK;CAC/D,MAAM,SAAS,QAAQ,YAAY;EAAE,SAAS,SAAS;EAAS,GAAI,iBAAiB,EAAE,eAAe,IAAI,CAAC;CAAG,CAAC;CAC/G,OAAO;EAAE,WAAW,SAAS;EAAW,SAAS,SAAS;CAAQ;AACpE"}
|
|
@@ -691,6 +691,17 @@ export declare class WorkItemsStorage extends FactoryStorageDomain {
|
|
|
691
691
|
resourceId: string;
|
|
692
692
|
sessionId: string;
|
|
693
693
|
}): Promise<FactoryRunBindingRecord | null>;
|
|
694
|
+
/**
|
|
695
|
+
* The active binding a Factory session is serving, keyed by the session
|
|
696
|
+
* alone so it resolves before the session has a live thread (e.g. when the
|
|
697
|
+
* dispatcher builds the workspace for a kickoff). Ambiguous matches never
|
|
698
|
+
* authorize.
|
|
699
|
+
*/
|
|
700
|
+
findActiveRunBindingForSession(input: {
|
|
701
|
+
orgId: string;
|
|
702
|
+
factoryProjectId: string;
|
|
703
|
+
sessionId: string;
|
|
704
|
+
}): Promise<FactoryRunBindingRecord | null>;
|
|
694
705
|
/** Resolve exact bound-session state for processor awareness; ambiguous cross-tenant matches return null. */
|
|
695
706
|
findRunBindingBySession(address: FactoryRunBindingSessionAddress): Promise<FactoryRunBindingRecord | null>;
|
|
696
707
|
/** Revoke one exact tenant-scoped binding. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/work-items/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,oBAAoB,EAAwB,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAsC,MAAM,sBAAsB,CAAC;AAEjG,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAO1E,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAanC,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAE7E;AAaD,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,4FA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ryStorageDomain {
|
|
|
2059
2059
|
const row = rows.sort((left, right) => right.created_at.getTime() - left.created_at.getTime())[0];
|
|
2060
2060
|
return row ? toBinding(row) : null;
|
|
2061
2061
|
}
|
|
2062
|
+
/**
|
|
2063
|
+
* The active binding a Factory session is serving, keyed by the session
|
|
2064
|
+
* alone so it resolves before the session has a live thread (e.g. when the
|
|
2065
|
+
* dispatcher builds the workspace for a kickoff). Ambiguous matches never
|
|
2066
|
+
* authorize.
|
|
2067
|
+
*/
|
|
2068
|
+
async findActiveRunBindingForSession(input) {
|
|
2069
|
+
const rows = await this.#db.findMany("factory_run_bindings", {
|
|
2070
|
+
org_id: input.orgId,
|
|
2071
|
+
factory_project_id: input.factoryProjectId,
|
|
2072
|
+
session_id: input.sessionId,
|
|
2073
|
+
status: "active"
|
|
2074
|
+
});
|
|
2075
|
+
if (rows.length !== 1) return null;
|
|
2076
|
+
return toBinding(rows[0]);
|
|
2077
|
+
}
|
|
2062
2078
|
/** Resolve exact bound-session state for processor awareness; ambiguous cross-tenant matches return null. */
|
|
2063
2079
|
async findRunBindingBySession(address) {
|
|
2064
2080
|
const rows = await this.#db.findMany("factory_run_bindings", {
|