@mastra/factory 0.1.0-alpha.7 → 0.1.0-alpha.9
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/CHANGELOG.md +20 -0
- package/dist/factory.js +31 -8
- package/dist/factory.js.map +1 -1
- package/dist/index.js +31 -8
- package/dist/index.js.map +1 -1
- package/dist/rules/defaults.d.ts.map +1 -1
- package/dist/rules/defaults.js +20 -6
- package/dist/rules/defaults.js.map +1 -1
- package/dist/rules/index.js +20 -6
- package/dist/rules/index.js.map +1 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +11 -2
- package/dist/workspace.js.map +1 -1
- package/factory-skills/factory-plan/SKILL.md +61 -0
- package/factory-skills/factory-review/SKILL.md +73 -0
- package/factory-skills/factory-triage/SKILL.md +77 -0
- package/package.json +7 -7
- package/factory-skills/understand-issue/SKILL.md +0 -251
- package/factory-skills/understand-pr/SKILL.md +0 -270
package/dist/workspace.js
CHANGED
|
@@ -263,7 +263,7 @@ var FACTORY_SKILLS_SOURCE_PATH = [
|
|
|
263
263
|
join(process.cwd(), "src", "mastra", "public", "factory-skills")
|
|
264
264
|
].find(existsSync) ?? bundledFactorySkillsPath;
|
|
265
265
|
var FACTORY_SKILLS_MOUNT = path2.resolve(path2.parse(process.cwd()).root, "__mastracode_factory_skills__");
|
|
266
|
-
var FACTORY_SKILL_NAMES = /* @__PURE__ */ new Set(["configure-factory-rules", "
|
|
266
|
+
var FACTORY_SKILL_NAMES = /* @__PURE__ */ new Set(["configure-factory-rules", "factory-plan", "factory-review", "factory-triage"]);
|
|
267
267
|
var FactorySkillSource = class {
|
|
268
268
|
constructor(fallback, fallbackSkillRoots) {
|
|
269
269
|
this.fallback = fallback;
|
|
@@ -367,6 +367,13 @@ function createWorkspaceFactory(options = {}) {
|
|
|
367
367
|
if (registered) {
|
|
368
368
|
registerGithubTokenInjector(requestContext, registered.inject);
|
|
369
369
|
registerGithubPatKind(requestContext, registered.patKind);
|
|
370
|
+
try {
|
|
371
|
+
const pat = await getGithubPat(() => github.integrationStorage, session.orgId, registered.patKind);
|
|
372
|
+
if (pat && pat !== registered.ghToken) {
|
|
373
|
+
registered.inject(pat);
|
|
374
|
+
}
|
|
375
|
+
} catch {
|
|
376
|
+
}
|
|
370
377
|
}
|
|
371
378
|
return existing;
|
|
372
379
|
}
|
|
@@ -413,8 +420,10 @@ function createWorkspaceFactory(options = {}) {
|
|
|
413
420
|
throw new Error("The active sandbox provider does not support runtime GitHub token refresh.");
|
|
414
421
|
}
|
|
415
422
|
sandbox.setEnvironmentVariable("GH_TOKEN", freshToken);
|
|
423
|
+
const registered = githubTokenInjectors.get(workspaceId);
|
|
424
|
+
if (registered) registered.ghToken = freshToken;
|
|
416
425
|
};
|
|
417
|
-
githubTokenInjectors.set(workspaceId, { inject: injectGithubToken, patKind });
|
|
426
|
+
githubTokenInjectors.set(workspaceId, { inject: injectGithubToken, patKind, ghToken: ghCliToken });
|
|
418
427
|
registerGithubTokenInjector(requestContext, injectGithubToken);
|
|
419
428
|
registerGithubPatKind(requestContext, patKind);
|
|
420
429
|
const filesystem = new SandboxFilesystem({ sandbox, workdir });
|