@hexagen-monaco/sync 0.9.0 → 0.11.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/LICENSE +6 -0
- package/README.md +56 -8
- package/dist/application/ports/out/index.d.ts +1 -2
- package/dist/application/ports/out/index.d.ts.map +1 -1
- package/dist/application/ports/out/symbol-reference-index.port.d.ts +74 -0
- package/dist/application/ports/out/symbol-reference-index.port.d.ts.map +1 -0
- package/dist/application/use-cases/get-architecture-graph.use-case.d.ts +1 -1
- package/dist/application/use-cases/get-architecture-graph.use-case.d.ts.map +1 -1
- package/dist/application/use-cases/get-linter-report.use-case.d.ts +1 -1
- package/dist/application/use-cases/get-linter-report.use-case.d.ts.map +1 -1
- package/dist/application/use-cases/index.d.ts +0 -1
- package/dist/application/use-cases/index.d.ts.map +1 -1
- package/dist/application/use-cases/refactoring-impact.use-case.d.ts +24 -6
- package/dist/application/use-cases/refactoring-impact.use-case.d.ts.map +1 -1
- package/dist/arch-linter-bin.d.ts +19 -3
- package/dist/arch-linter-bin.d.ts.map +1 -1
- package/dist/cli.js +2905 -5399
- package/dist/cli.js.map +1 -1
- package/dist/commands/add/validate.d.ts.map +1 -1
- package/dist/commands/adopt/index.d.ts +24 -0
- package/dist/commands/adopt/index.d.ts.map +1 -0
- package/dist/commands/bootstrap/index.d.ts +41 -0
- package/dist/commands/bootstrap/index.d.ts.map +1 -0
- package/dist/commands/bootstrap.d.ts +30 -0
- package/dist/commands/bootstrap.d.ts.map +1 -0
- package/dist/commands/report/baseline-read.d.ts +12 -0
- package/dist/commands/report/baseline-read.d.ts.map +1 -0
- package/dist/commands/report/build-report.d.ts +13 -0
- package/dist/commands/report/build-report.d.ts.map +1 -0
- package/dist/commands/report/context-map.d.ts +9 -0
- package/dist/commands/report/context-map.d.ts.map +1 -0
- package/dist/commands/report/exec-git.d.ts +3 -0
- package/dist/commands/report/exec-git.d.ts.map +1 -0
- package/dist/commands/report/handoff.d.ts +3 -0
- package/dist/commands/report/handoff.d.ts.map +1 -0
- package/dist/commands/report/index.d.ts +14 -0
- package/dist/commands/report/index.d.ts.map +1 -0
- package/dist/commands/report/lint-collect.d.ts +4 -0
- package/dist/commands/report/lint-collect.d.ts.map +1 -0
- package/dist/commands/report/ratchet-trend.d.ts +3 -0
- package/dist/commands/report/ratchet-trend.d.ts.map +1 -0
- package/dist/commands/report/render-html.d.ts +3 -0
- package/dist/commands/report/render-html.d.ts.map +1 -0
- package/dist/commands/report/render-markdown.d.ts +3 -0
- package/dist/commands/report/render-markdown.d.ts.map +1 -0
- package/dist/commands/report/types.d.ts +52 -0
- package/dist/commands/report/types.d.ts.map +1 -0
- package/dist/commands/report/zip-store.d.ts +10 -0
- package/dist/commands/report/zip-store.d.ts.map +1 -0
- package/dist/commands/shared/detect-workspaces.d.ts +12 -0
- package/dist/commands/shared/detect-workspaces.d.ts.map +1 -0
- package/dist/commands/shared/index.d.ts +1 -1
- package/dist/commands/shared/index.d.ts.map +1 -1
- package/dist/commands/shared/project-root.d.ts +7 -0
- package/dist/commands/shared/project-root.d.ts.map +1 -1
- package/dist/domain/services/emission-plan-builder.d.ts +14 -3
- package/dist/domain/services/emission-plan-builder.d.ts.map +1 -1
- package/dist/domain/services/impact-analysis.types.d.ts +6 -1
- package/dist/domain/services/impact-analysis.types.d.ts.map +1 -1
- package/dist/domain/services/index.d.ts +2 -0
- package/dist/domain/services/index.d.ts.map +1 -1
- package/dist/domain/services/layer-classifier.d.ts +53 -2
- package/dist/domain/services/layer-classifier.d.ts.map +1 -1
- package/dist/domain/services/layer-dir-resolver.d.ts +63 -0
- package/dist/domain/services/layer-dir-resolver.d.ts.map +1 -0
- package/dist/domain/services/name-normalizer.d.ts +35 -0
- package/dist/domain/services/name-normalizer.d.ts.map +1 -0
- package/dist/domain/services/stub-template-resolver.d.ts +33 -2
- package/dist/domain/services/stub-template-resolver.d.ts.map +1 -1
- package/dist/generators/apps-framework-templates.d.ts.map +1 -1
- package/dist/generators/architecture-file-templates.d.ts +2 -2
- package/dist/generators/architecture-file-templates.d.ts.map +1 -1
- package/dist/generators/architecture-files.d.ts.map +1 -1
- package/dist/generators/cross-context.d.ts.map +1 -1
- package/dist/generators/eslint.d.ts.map +1 -1
- package/dist/generators/layer-folders.d.ts.map +1 -1
- package/dist/generators/package-json.d.ts.map +1 -1
- package/dist/generators/root-file-templates.d.ts +1 -1
- package/dist/generators/root-file-templates.d.ts.map +1 -1
- package/dist/generators/root-files.d.ts.map +1 -1
- package/dist/generators/stubs.d.ts +4 -1
- package/dist/generators/stubs.d.ts.map +1 -1
- package/dist/index.d.ts +23 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +581 -4770
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/adapters/index.d.ts +1 -0
- package/dist/infrastructure/adapters/index.d.ts.map +1 -1
- package/dist/infrastructure/adapters/ts-morph-symbol-index.adapter.d.ts +47 -0
- package/dist/infrastructure/adapters/ts-morph-symbol-index.adapter.d.ts.map +1 -0
- package/dist/infrastructure/config/layout-schema.d.ts +29 -0
- package/dist/infrastructure/config/layout-schema.d.ts.map +1 -0
- package/dist/infrastructure/config/load-layout-config.d.ts +8 -0
- package/dist/infrastructure/config/load-layout-config.d.ts.map +1 -0
- package/dist/linter.d.ts +24 -0
- package/dist/linter.d.ts.map +1 -1
- package/dist/manifest-service.d.ts.map +1 -1
- package/dist/refactoring/impact-analyzer.d.ts +7 -2
- package/dist/refactoring/impact-analyzer.d.ts.map +1 -1
- package/dist/sync-engine.d.ts.map +1 -1
- package/dist/templates/adobe-creative-production/files/src/domain/ports/out/creative-production.port.ts +2 -4
- package/dist/templates/adobe-creative-production/files/src/infrastructure/adobe/creative-production/creative-production.adapter.ts +8 -7
- package/dist/templates/adobe-express/files/src/domain/ports/out/express.port.ts +2 -4
- package/dist/templates/adobe-express/files/src/infrastructure/adobe/express/express.adapter.ts +9 -8
- package/dist/templates/adobe-firefly-composite/files/src/domain/ports/out/composite.port.ts +2 -4
- package/dist/templates/adobe-firefly-composite/files/src/infrastructure/adobe/composite/composite.adapter.ts +12 -12
- package/dist/templates/adobe-firefly-content-tagging/files/src/domain/ports/out/content-tagging.port.ts +2 -4
- package/dist/templates/adobe-firefly-content-tagging/files/src/infrastructure/adobe/content-tagging/content-tagging.adapter.ts +6 -5
- package/dist/templates/adobe-firefly-core/README.md +1 -1
- package/dist/templates/adobe-firefly-core/files/src/domain/errors/creative-service-error.ts +62 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/errors/to-creative-service-error.ts +45 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/index.ts +9 -0
- package/dist/templates/adobe-firefly-core/manifest.json +2 -0
- package/dist/templates/adobe-firefly-custom-models/files/src/domain/ports/out/custom-model.port.ts +5 -7
- package/dist/templates/adobe-firefly-custom-models/files/src/infrastructure/adobe/custom-models/firefly-custom-model.adapter.ts +16 -15
- package/dist/templates/adobe-firefly-generate/files/src/domain/ports/out/image-generation.port.ts +6 -8
- package/dist/templates/adobe-firefly-generate/files/src/infrastructure/adobe/generate/firefly-generate.adapter.ts +14 -16
- package/dist/templates/adobe-firefly-media/files/src/domain/ports/out/media-generation.port.ts +6 -8
- package/dist/templates/adobe-firefly-media/files/src/infrastructure/adobe/media/firefly-media.adapter.ts +11 -10
- package/dist/templates/adobe-firefly-upscale/files/src/domain/ports/out/upscale.port.ts +2 -4
- package/dist/templates/adobe-firefly-upscale/files/src/infrastructure/adobe/upscale/upscale.adapter.ts +13 -11
- package/dist/templates/adobe-illustrator/files/src/domain/ports/out/illustrator.port.ts +4 -6
- package/dist/templates/adobe-illustrator/files/src/infrastructure/adobe/illustrator/illustrator.adapter.ts +17 -15
- package/dist/templates/adobe-indesign/files/src/domain/ports/out/indesign.port.ts +4 -6
- package/dist/templates/adobe-indesign/files/src/infrastructure/adobe/indesign/indesign.adapter.ts +10 -9
- package/dist/templates/adobe-lightroom/files/src/domain/ports/out/lightroom.port.ts +4 -6
- package/dist/templates/adobe-lightroom/files/src/infrastructure/adobe/lightroom/lightroom.adapter.ts +10 -9
- package/dist/templates/adobe-photoshop/files/src/domain/ports/out/photoshop-automation.port.ts +6 -8
- package/dist/templates/adobe-photoshop/files/src/infrastructure/adobe/photoshop/photoshop-automation.adapter.ts +12 -11
- package/dist/templates/adobe-substance-3d/files/src/domain/ports/out/substance-3d.port.ts +4 -6
- package/dist/templates/adobe-substance-3d/files/src/infrastructure/adobe/substance-3d/substance-3d.adapter.ts +10 -9
- package/dist/templates/agents-md/files/AGENTS.md +5 -5
- package/dist/templates/bedrock-agentcore-runtime/files/src/application/ports/agent-runtime.port.ts +25 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/invocations.handler.ts +1 -1
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/server.ts +1 -1
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/runtime/payload.ts +5 -22
- package/dist/templates/bedrock-agentcore-runtime/manifest.json +1 -0
- package/dist/templates/ci-github-actions/README.md +13 -7
- package/dist/templates/ci-github-actions/files/.github/dependabot.yml +9 -2
- package/dist/templates/ci-github-actions/files/.github/workflows/ci.yml +18 -14
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-fly.yml +12 -6
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-railway.yml +14 -8
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vercel.yml +29 -8
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vps.yml +14 -8
- package/dist/templates/ci-github-actions/files/.github/workflows/preview.yml +34 -18
- package/dist/templates/ci-github-actions/manifest.json +2 -2
- package/dist/templates/docker/README.md +3 -0
- package/dist/templates/docker/files/.github/workflows/docker-build.yml +15 -6
- package/dist/templates/docker/manifest.json +1 -0
- package/dist/templates/llm-adapter/files/src/domain/errors/llm-error.ts +35 -0
- package/dist/templates/llm-adapter/files/src/domain/ports/out/llm-client.port.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/anthropic-llm-client.adapter.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/azure-openai-llm-client.adapter.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/ollama-llm-client.adapter.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/openai-llm-client.adapter.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/xai-llm-client.adapter.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/errors/llm-errors.ts +9 -23
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/index.ts +4 -3
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/router/llm-router.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/retry.ts +1 -1
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/structured-output.ts +1 -1
- package/dist/templates/llm-adapter/manifest.json +1 -0
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/adapters/bedrock-llm-client.adapter.ts +1 -1
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/errors/bedrock-errors.ts +1 -1
- package/dist/templates/mcp-server/README.md +1 -1
- package/dist/templates/mcp-server-http/README.md +1 -1
- package/package.json +6 -5
- package/dist/application/ports/out/project-configuration-read.port.d.ts +0 -9
- package/dist/application/ports/out/project-configuration-read.port.d.ts.map +0 -1
- package/dist/application/ports/out/symbol-reference-provider.port.d.ts +0 -10
- package/dist/application/ports/out/symbol-reference-provider.port.d.ts.map +0 -1
- package/dist/application/use-cases/get-manifest-resource.use-case.d.ts +0 -8
- package/dist/application/use-cases/get-manifest-resource.use-case.d.ts.map +0 -1
- package/dist/generators/validators/index.d.ts +0 -11
- package/dist/generators/validators/index.d.ts.map +0 -1
- package/dist/generators/validators/validate-dependencies.d.ts +0 -7
- package/dist/generators/validators/validate-dependencies.d.ts.map +0 -1
- package/dist/generators/validators/validate-manifest-sync.d.ts +0 -5
- package/dist/generators/validators/validate-manifest-sync.d.ts.map +0 -1
- package/dist/generators/validators/validate-port-adapter.d.ts +0 -5
- package/dist/generators/validators/validate-port-adapter.d.ts.map +0 -1
- package/dist/generators/validators/validation-types.d.ts +0 -20
- package/dist/generators/validators/validation-types.d.ts.map +0 -1
- package/dist/generators/validators.d.ts +0 -7
- package/dist/generators/validators.d.ts.map +0 -1
package/dist/templates/adobe-indesign/files/src/infrastructure/adobe/indesign/indesign.adapter.ts
CHANGED
|
@@ -10,7 +10,8 @@ import { fireflyClient } from "../http/firefly-client";
|
|
|
10
10
|
import { jobPort } from "../jobs/job-port";
|
|
11
11
|
import { toJobHandle } from "../jobs/job-result";
|
|
12
12
|
import { getStoragePresigner } from "../storage/passthrough-storage.adapter";
|
|
13
|
-
import {
|
|
13
|
+
import { toCreativeServiceError } from "../errors/to-creative-service-error";
|
|
14
|
+
import { CreativeServiceError } from "../../../domain/errors/creative-service-error";
|
|
14
15
|
import { ok, err, type Result } from "../../../shared/result";
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -37,7 +38,7 @@ const DEFAULT_FORMAT: InDesignFormat =
|
|
|
37
38
|
: "{output_format}";
|
|
38
39
|
|
|
39
40
|
export class InDesignAdapter implements InDesignPort {
|
|
40
|
-
async dataMerge(req: DataMergeRequest): Promise<Result<string,
|
|
41
|
+
async dataMerge(req: DataMergeRequest): Promise<Result<string, CreativeServiceError>> {
|
|
41
42
|
return this.run(async () => {
|
|
42
43
|
const storage = getStoragePresigner();
|
|
43
44
|
const input = await storage.presignInput(req.inputHref);
|
|
@@ -54,7 +55,7 @@ export class InDesignAdapter implements InDesignPort {
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
async renderLayout(req: RenderLayoutRequest): Promise<Result<string,
|
|
58
|
+
async renderLayout(req: RenderLayoutRequest): Promise<Result<string, CreativeServiceError>> {
|
|
58
59
|
return this.run(async () => {
|
|
59
60
|
const { input, output } = await this.presignIO(req);
|
|
60
61
|
return {
|
|
@@ -67,7 +68,7 @@ export class InDesignAdapter implements InDesignPort {
|
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
async exportPdf(req: ExportPdfRequest): Promise<Result<string,
|
|
71
|
+
async exportPdf(req: ExportPdfRequest): Promise<Result<string, CreativeServiceError>> {
|
|
71
72
|
return this.run(async () => {
|
|
72
73
|
const { input, output } = await this.presignIO(req);
|
|
73
74
|
return {
|
|
@@ -93,7 +94,7 @@ export class InDesignAdapter implements InDesignPort {
|
|
|
93
94
|
|
|
94
95
|
private async run(
|
|
95
96
|
build: () => Promise<{ path: string; body: unknown }>,
|
|
96
|
-
): Promise<Result<string,
|
|
97
|
+
): Promise<Result<string, CreativeServiceError>> {
|
|
97
98
|
try {
|
|
98
99
|
const { path, body } = await build();
|
|
99
100
|
const handle = toJobHandle(await fireflyClient.post(path, body));
|
|
@@ -103,24 +104,24 @@ export class InDesignAdapter implements InDesignPort {
|
|
|
103
104
|
// clear error rather than routing through the job port's await — which only
|
|
104
105
|
// resolves a jobId-only handle in webhook mode and would fail in polling builds.
|
|
105
106
|
if (!handle.statusUrl) {
|
|
106
|
-
return err(new
|
|
107
|
+
return err(new CreativeServiceError("unknown", "InDesign submit response had no status URL to track the job."));
|
|
107
108
|
}
|
|
108
109
|
// jobPort.poll() is the centralised always-poll entry point (keeps the wait
|
|
109
110
|
// path on the port rather than importing the poller directly).
|
|
110
111
|
const done = await jobPort.poll(handle);
|
|
111
112
|
if (done.status !== "succeeded") {
|
|
112
|
-
return err(new
|
|
113
|
+
return err(new CreativeServiceError("unknown", done.error ?? "InDesign job did not succeed."));
|
|
113
114
|
}
|
|
114
115
|
// `done.outputs` is a non-optional JobOutput[] (parseJobResult always returns
|
|
115
116
|
// an array), so `[0]?.href` is enough — an empty array yields the no-output
|
|
116
117
|
// path below; no `?.` on `outputs` itself is needed.
|
|
117
118
|
const href = done.outputs[0]?.href;
|
|
118
119
|
if (!href) {
|
|
119
|
-
return err(new
|
|
120
|
+
return err(new CreativeServiceError("unknown", "InDesign job produced no output."));
|
|
120
121
|
}
|
|
121
122
|
return ok(href);
|
|
122
123
|
} catch (error) {
|
|
123
|
-
return err(
|
|
124
|
+
return err(toCreativeServiceError(error));
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Result } from "../../../shared/result";
|
|
2
|
-
|
|
3
|
-
// domain→infra decoupling for the port's failure channel, not an oversight.
|
|
4
|
-
import type { FireflyError } from "../../../infrastructure/adobe/errors/firefly-errors";
|
|
2
|
+
import type { CreativeServiceError } from "../../errors/creative-service-error";
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
5
|
* Outbound port for the Adobe Lightroom API (image.adobe.io/lrService).
|
|
@@ -28,9 +26,9 @@ export interface EditRequest extends LightroomRequest {
|
|
|
28
26
|
|
|
29
27
|
export interface LightroomPort {
|
|
30
28
|
/** Auto-tone an image (automatic exposure/colour correction). */
|
|
31
|
-
autoTone(req: LightroomRequest): Promise<Result<string,
|
|
29
|
+
autoTone(req: LightroomRequest): Promise<Result<string, CreativeServiceError>>;
|
|
32
30
|
/** Apply a Lightroom preset (XMP) to an image. */
|
|
33
|
-
applyPreset(req: ApplyPresetRequest): Promise<Result<string,
|
|
31
|
+
applyPreset(req: ApplyPresetRequest): Promise<Result<string, CreativeServiceError>>;
|
|
34
32
|
/** Apply explicit edit parameters to an image. */
|
|
35
|
-
edit(req: EditRequest): Promise<Result<string,
|
|
33
|
+
edit(req: EditRequest): Promise<Result<string, CreativeServiceError>>;
|
|
36
34
|
}
|
package/dist/templates/adobe-lightroom/files/src/infrastructure/adobe/lightroom/lightroom.adapter.ts
CHANGED
|
@@ -9,7 +9,8 @@ import { fireflyClient } from "../http/firefly-client";
|
|
|
9
9
|
import { jobPort } from "../jobs/job-port";
|
|
10
10
|
import { toJobHandle } from "../jobs/job-result";
|
|
11
11
|
import { getStoragePresigner } from "../storage/passthrough-storage.adapter";
|
|
12
|
-
import {
|
|
12
|
+
import { toCreativeServiceError } from "../errors/to-creative-service-error";
|
|
13
|
+
import { CreativeServiceError } from "../../../domain/errors/creative-service-error";
|
|
13
14
|
import { ok, err, type Result } from "../../../shared/result";
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -34,7 +35,7 @@ const DEFAULT_FORMAT: "jpeg" | "png" =
|
|
|
34
35
|
rawDefaultFormat === "jpeg" || rawDefaultFormat === "png" ? rawDefaultFormat : "{output_format}";
|
|
35
36
|
|
|
36
37
|
export class LightroomAdapter implements LightroomPort {
|
|
37
|
-
async autoTone(req: LightroomRequest): Promise<Result<string,
|
|
38
|
+
async autoTone(req: LightroomRequest): Promise<Result<string, CreativeServiceError>> {
|
|
38
39
|
return this.run(async () => {
|
|
39
40
|
const { input, output } = await this.presignIO(req);
|
|
40
41
|
return {
|
|
@@ -44,7 +45,7 @@ export class LightroomAdapter implements LightroomPort {
|
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
async applyPreset(req: ApplyPresetRequest): Promise<Result<string,
|
|
48
|
+
async applyPreset(req: ApplyPresetRequest): Promise<Result<string, CreativeServiceError>> {
|
|
48
49
|
return this.run(async () => {
|
|
49
50
|
const storage = getStoragePresigner();
|
|
50
51
|
const input = await storage.presignInput(req.inputHref);
|
|
@@ -61,7 +62,7 @@ export class LightroomAdapter implements LightroomPort {
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
async edit(req: EditRequest): Promise<Result<string,
|
|
65
|
+
async edit(req: EditRequest): Promise<Result<string, CreativeServiceError>> {
|
|
65
66
|
return this.run(async () => {
|
|
66
67
|
const { input, output } = await this.presignIO(req);
|
|
67
68
|
return {
|
|
@@ -84,7 +85,7 @@ export class LightroomAdapter implements LightroomPort {
|
|
|
84
85
|
|
|
85
86
|
private async run(
|
|
86
87
|
build: () => Promise<{ path: string; body: unknown }>,
|
|
87
|
-
): Promise<Result<string,
|
|
88
|
+
): Promise<Result<string, CreativeServiceError>> {
|
|
88
89
|
try {
|
|
89
90
|
const { path, body } = await build();
|
|
90
91
|
const handle = toJobHandle(await fireflyClient.post(path, body));
|
|
@@ -94,22 +95,22 @@ export class LightroomAdapter implements LightroomPort {
|
|
|
94
95
|
// rather than routing through the job port's await — which only resolves a
|
|
95
96
|
// jobId-only handle in webhook mode and would fail in polling builds.
|
|
96
97
|
if (!handle.statusUrl) {
|
|
97
|
-
return err(new
|
|
98
|
+
return err(new CreativeServiceError("unknown", "Lightroom submit response had no status URL to track the job."));
|
|
98
99
|
}
|
|
99
100
|
const done = await jobPort.poll(handle);
|
|
100
101
|
if (done.status !== "succeeded") {
|
|
101
|
-
return err(new
|
|
102
|
+
return err(new CreativeServiceError("unknown", done.error ?? "Lightroom job did not succeed."));
|
|
102
103
|
}
|
|
103
104
|
// `done.outputs` is a non-optional JobOutput[] (parseJobResult always returns
|
|
104
105
|
// an array), so `[0]?.href` is enough — an empty array yields the no-output
|
|
105
106
|
// path below; no `?.` on `outputs` itself is needed.
|
|
106
107
|
const href = done.outputs[0]?.href;
|
|
107
108
|
if (!href) {
|
|
108
|
-
return err(new
|
|
109
|
+
return err(new CreativeServiceError("unknown", "Lightroom job produced no output."));
|
|
109
110
|
}
|
|
110
111
|
return ok(href);
|
|
111
112
|
} catch (error) {
|
|
112
|
-
return err(
|
|
113
|
+
return err(toCreativeServiceError(error));
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
}
|
package/dist/templates/adobe-photoshop/files/src/domain/ports/out/photoshop-automation.port.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Result } from "../../../shared/result";
|
|
2
|
-
|
|
3
|
-
// port's failure channel without runtime domain→infra coupling.
|
|
4
|
-
import type { FireflyError } from "../../../infrastructure/adobe/errors/firefly-errors";
|
|
2
|
+
import type { CreativeServiceError } from "../../errors/creative-service-error";
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
5
|
* Outbound port for the Adobe Photoshop API (image.adobe.io/pie/psdService).
|
|
@@ -48,13 +46,13 @@ export interface RenderPsdRequest extends PsdRequest {
|
|
|
48
46
|
|
|
49
47
|
export interface PhotoshopAutomationPort {
|
|
50
48
|
/** Replace a named Smart Object layer with another image. */
|
|
51
|
-
smartObject(req: SmartObjectRequest): Promise<Result<string,
|
|
49
|
+
smartObject(req: SmartObjectRequest): Promise<Result<string, CreativeServiceError>>;
|
|
52
50
|
/** Edit the contents of a named text layer. */
|
|
53
|
-
editTextLayer(req: EditTextLayerRequest): Promise<Result<string,
|
|
51
|
+
editTextLayer(req: EditTextLayerRequest): Promise<Result<string, CreativeServiceError>>;
|
|
54
52
|
/** Apply a Photoshop actionJSON to the document. */
|
|
55
|
-
applyActionJson(req: ApplyActionJsonRequest): Promise<Result<string,
|
|
53
|
+
applyActionJson(req: ApplyActionJsonRequest): Promise<Result<string, CreativeServiceError>>;
|
|
56
54
|
/** Crop the document to the given bounds. */
|
|
57
|
-
crop(req: CropRequest): Promise<Result<string,
|
|
55
|
+
crop(req: CropRequest): Promise<Result<string, CreativeServiceError>>;
|
|
58
56
|
/** Render the `.psd` to a flattened image. */
|
|
59
|
-
renderPsd(req: RenderPsdRequest): Promise<Result<string,
|
|
57
|
+
renderPsd(req: RenderPsdRequest): Promise<Result<string, CreativeServiceError>>;
|
|
60
58
|
}
|
|
@@ -11,7 +11,8 @@ import { fireflyClient } from "../http/firefly-client";
|
|
|
11
11
|
import { jobPort } from "../jobs/job-port";
|
|
12
12
|
import { toJobHandle } from "../jobs/job-result";
|
|
13
13
|
import { getStoragePresigner } from "../storage/passthrough-storage.adapter";
|
|
14
|
-
import {
|
|
14
|
+
import { toCreativeServiceError } from "../errors/to-creative-service-error";
|
|
15
|
+
import { CreativeServiceError } from "../../../domain/errors/creative-service-error";
|
|
15
16
|
import { ok, err, type Result } from "../../../shared/result";
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -52,7 +53,7 @@ const DEFAULT_FORMAT: "jpeg" | "png" =
|
|
|
52
53
|
const PSD_TYPE = "image/vnd.adobe.photoshop";
|
|
53
54
|
|
|
54
55
|
export class PhotoshopAutomationAdapter implements PhotoshopAutomationPort {
|
|
55
|
-
async smartObject(req: SmartObjectRequest): Promise<Result<string,
|
|
56
|
+
async smartObject(req: SmartObjectRequest): Promise<Result<string, CreativeServiceError>> {
|
|
56
57
|
return this.run(async () => {
|
|
57
58
|
const storage = getStoragePresigner();
|
|
58
59
|
const input = await storage.presignInput(req.inputHref);
|
|
@@ -71,7 +72,7 @@ export class PhotoshopAutomationAdapter implements PhotoshopAutomationPort {
|
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
async editTextLayer(req: EditTextLayerRequest): Promise<Result<string,
|
|
75
|
+
async editTextLayer(req: EditTextLayerRequest): Promise<Result<string, CreativeServiceError>> {
|
|
75
76
|
return this.run(async () => {
|
|
76
77
|
const { input, output } = await this.presignIO(req);
|
|
77
78
|
return {
|
|
@@ -87,7 +88,7 @@ export class PhotoshopAutomationAdapter implements PhotoshopAutomationPort {
|
|
|
87
88
|
});
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
async applyActionJson(req: ApplyActionJsonRequest): Promise<Result<string,
|
|
91
|
+
async applyActionJson(req: ApplyActionJsonRequest): Promise<Result<string, CreativeServiceError>> {
|
|
91
92
|
return this.run(async () => {
|
|
92
93
|
const { input, output } = await this.presignIO(req);
|
|
93
94
|
return {
|
|
@@ -101,7 +102,7 @@ export class PhotoshopAutomationAdapter implements PhotoshopAutomationPort {
|
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
async crop(req: CropRequest): Promise<Result<string,
|
|
105
|
+
async crop(req: CropRequest): Promise<Result<string, CreativeServiceError>> {
|
|
105
106
|
return this.run(async () => {
|
|
106
107
|
const { input, output } = await this.presignIO(req);
|
|
107
108
|
return {
|
|
@@ -115,7 +116,7 @@ export class PhotoshopAutomationAdapter implements PhotoshopAutomationPort {
|
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
118
|
|
|
118
|
-
async renderPsd(req: RenderPsdRequest): Promise<Result<string,
|
|
119
|
+
async renderPsd(req: RenderPsdRequest): Promise<Result<string, CreativeServiceError>> {
|
|
119
120
|
return this.run(async () => {
|
|
120
121
|
const { input, output } = await this.presignIO(req);
|
|
121
122
|
const format = req.format ?? DEFAULT_FORMAT;
|
|
@@ -141,7 +142,7 @@ export class PhotoshopAutomationAdapter implements PhotoshopAutomationPort {
|
|
|
141
142
|
|
|
142
143
|
private async run(
|
|
143
144
|
build: () => Promise<{ path: string; body: unknown }>,
|
|
144
|
-
): Promise<Result<string,
|
|
145
|
+
): Promise<Result<string, CreativeServiceError>> {
|
|
145
146
|
try {
|
|
146
147
|
const { path, body } = await build();
|
|
147
148
|
const handle = toJobHandle(await fireflyClient.post(path, body));
|
|
@@ -151,19 +152,19 @@ export class PhotoshopAutomationAdapter implements PhotoshopAutomationPort {
|
|
|
151
152
|
// clear error rather than routing through the job port's await — which only
|
|
152
153
|
// resolves a jobId-only handle in webhook mode and would fail in polling builds.
|
|
153
154
|
if (!handle.statusUrl) {
|
|
154
|
-
return err(new
|
|
155
|
+
return err(new CreativeServiceError("unknown", "Photoshop submit response had no status URL to track the job."));
|
|
155
156
|
}
|
|
156
157
|
const done = await jobPort.poll(handle);
|
|
157
158
|
if (done.status !== "succeeded") {
|
|
158
|
-
return err(new
|
|
159
|
+
return err(new CreativeServiceError("unknown", done.error ?? "Photoshop job did not succeed."));
|
|
159
160
|
}
|
|
160
161
|
const href = done.outputs[0]?.href;
|
|
161
162
|
if (!href) {
|
|
162
|
-
return err(new
|
|
163
|
+
return err(new CreativeServiceError("unknown", "Photoshop job produced no output."));
|
|
163
164
|
}
|
|
164
165
|
return ok(href);
|
|
165
166
|
} catch (error) {
|
|
166
|
-
return err(
|
|
167
|
+
return err(toCreativeServiceError(error));
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Result } from "../../../shared/result";
|
|
2
|
-
|
|
3
|
-
// domain→infra decoupling for the port's failure channel, not an oversight.
|
|
4
|
-
import type { FireflyError } from "../../../infrastructure/adobe/errors/firefly-errors";
|
|
2
|
+
import type { CreativeServiceError } from "../../errors/creative-service-error";
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
5
|
* Outbound port for the Adobe Substance 3D API (image.adobe.io).
|
|
@@ -37,9 +35,9 @@ export interface RelightRequest extends Substance3DRequest {
|
|
|
37
35
|
|
|
38
36
|
export interface Substance3DPort {
|
|
39
37
|
/** Render a scene to an image. */
|
|
40
|
-
render(req: RenderRequest): Promise<Result<string,
|
|
38
|
+
render(req: RenderRequest): Promise<Result<string, CreativeServiceError>>;
|
|
41
39
|
/** Composite a render over a background plate. */
|
|
42
|
-
composite(req: CompositeRequest): Promise<Result<string,
|
|
40
|
+
composite(req: CompositeRequest): Promise<Result<string, CreativeServiceError>>;
|
|
43
41
|
/** Relight a scene with a new lighting environment. */
|
|
44
|
-
relight(req: RelightRequest): Promise<Result<string,
|
|
42
|
+
relight(req: RelightRequest): Promise<Result<string, CreativeServiceError>>;
|
|
45
43
|
}
|
|
@@ -10,7 +10,8 @@ import { fireflyClient } from "../http/firefly-client";
|
|
|
10
10
|
import { jobPort } from "../jobs/job-port";
|
|
11
11
|
import { toJobHandle } from "../jobs/job-result";
|
|
12
12
|
import { getStoragePresigner } from "../storage/passthrough-storage.adapter";
|
|
13
|
-
import {
|
|
13
|
+
import { toCreativeServiceError } from "../errors/to-creative-service-error";
|
|
14
|
+
import { CreativeServiceError } from "../../../domain/errors/creative-service-error";
|
|
14
15
|
import { ok, err, type Result } from "../../../shared/result";
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -44,7 +45,7 @@ const DEFAULT_FORMAT: Substance3DFormat =
|
|
|
44
45
|
: "{output_format}";
|
|
45
46
|
|
|
46
47
|
export class Substance3DAdapter implements Substance3DPort {
|
|
47
|
-
async render(req: RenderRequest): Promise<Result<string,
|
|
48
|
+
async render(req: RenderRequest): Promise<Result<string, CreativeServiceError>> {
|
|
48
49
|
return this.run(async () => {
|
|
49
50
|
const { input, output } = await this.presignIO(req);
|
|
50
51
|
return {
|
|
@@ -59,7 +60,7 @@ export class Substance3DAdapter implements Substance3DPort {
|
|
|
59
60
|
|
|
60
61
|
async composite(
|
|
61
62
|
req: CompositeRequest,
|
|
62
|
-
): Promise<Result<string,
|
|
63
|
+
): Promise<Result<string, CreativeServiceError>> {
|
|
63
64
|
return this.run(async () => {
|
|
64
65
|
const storage = getStoragePresigner();
|
|
65
66
|
const input = await storage.presignInput(req.inputHref);
|
|
@@ -76,7 +77,7 @@ export class Substance3DAdapter implements Substance3DPort {
|
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
async relight(req: RelightRequest): Promise<Result<string,
|
|
80
|
+
async relight(req: RelightRequest): Promise<Result<string, CreativeServiceError>> {
|
|
80
81
|
return this.run(async () => {
|
|
81
82
|
const storage = getStoragePresigner();
|
|
82
83
|
const input = await storage.presignInput(req.inputHref);
|
|
@@ -105,7 +106,7 @@ export class Substance3DAdapter implements Substance3DPort {
|
|
|
105
106
|
|
|
106
107
|
private async run(
|
|
107
108
|
build: () => Promise<{ path: string; body: unknown }>,
|
|
108
|
-
): Promise<Result<string,
|
|
109
|
+
): Promise<Result<string, CreativeServiceError>> {
|
|
109
110
|
try {
|
|
110
111
|
const { path, body } = await build();
|
|
111
112
|
const handle = toJobHandle(await fireflyClient.post(path, body));
|
|
@@ -116,7 +117,7 @@ export class Substance3DAdapter implements Substance3DPort {
|
|
|
116
117
|
// resolves a jobId-only handle in webhook mode and would fail in polling builds.
|
|
117
118
|
if (!handle.statusUrl) {
|
|
118
119
|
return err(
|
|
119
|
-
new
|
|
120
|
+
new CreativeServiceError("unknown",
|
|
120
121
|
"Substance 3D submit response had no status URL to track the job.",
|
|
121
122
|
),
|
|
122
123
|
);
|
|
@@ -126,7 +127,7 @@ export class Substance3DAdapter implements Substance3DPort {
|
|
|
126
127
|
const done = await jobPort.poll(handle);
|
|
127
128
|
if (done.status !== "succeeded") {
|
|
128
129
|
return err(
|
|
129
|
-
new
|
|
130
|
+
new CreativeServiceError("unknown", done.error ?? "Substance 3D job did not succeed."),
|
|
130
131
|
);
|
|
131
132
|
}
|
|
132
133
|
// `done.outputs` is a non-optional JobOutput[] (parseJobResult always returns
|
|
@@ -134,11 +135,11 @@ export class Substance3DAdapter implements Substance3DPort {
|
|
|
134
135
|
// path below; no `?.` on `outputs` itself is needed.
|
|
135
136
|
const href = done.outputs[0]?.href;
|
|
136
137
|
if (!href) {
|
|
137
|
-
return err(new
|
|
138
|
+
return err(new CreativeServiceError("unknown", "Substance 3D job produced no output."));
|
|
138
139
|
}
|
|
139
140
|
return ok(href);
|
|
140
141
|
} catch (error) {
|
|
141
|
-
return err(
|
|
142
|
+
return err(toCreativeServiceError(error));
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
}
|
|
@@ -48,12 +48,12 @@ before continuing.
|
|
|
48
48
|
|
|
49
49
|
| Trigger | Command | On failure |
|
|
50
50
|
| ------------------------ | ---------------------------------------- | ----------------------- |
|
|
51
|
-
| Before starting work | `
|
|
52
|
-
| Any `.ts` / `.tsx` edit | `
|
|
51
|
+
| Before starting work | `yarn build && yarn typecheck` | STOP — fix first |
|
|
52
|
+
| Any `.ts` / `.tsx` edit | `yarn lint && yarn typecheck` | Fix before continuing |
|
|
53
53
|
| After adding a template | `hexagen validate-templates` | Resolve conflicts |
|
|
54
|
-
| Before committing | `
|
|
54
|
+
| Before committing | `yarn test` | Diagnose — never skip |
|
|
55
55
|
|
|
56
|
-
(If this project uses
|
|
56
|
+
(If this project uses npm or pnpm, substitute the package manager — the
|
|
57
57
|
triggers stay the same.)
|
|
58
58
|
|
|
59
59
|
## Files Never Edit
|
|
@@ -64,7 +64,7 @@ Each rule has a reason; agents follow rules they understand.
|
|
|
64
64
|
| ----------------------------- | ----------------------------------------------------------- |
|
|
65
65
|
| `AGENTS.md` | This contract. Change it deliberately, never as a side effect. |
|
|
66
66
|
| `.agents/*.md` (except `session-log.md`) | Spec files — edit only when explicitly asked to update specs. `session-log.md` is the deliberate exception: append to it after each session. |
|
|
67
|
-
| `
|
|
67
|
+
| `yarn.lock` | Lockfile — updated only by `yarn` commands, never by hand. (Generated projects pin yarn via `packageManager`; if this repo uses npm or pnpm instead, the same rule applies to `package-lock.json` / `pnpm-lock.yaml`.) |
|
|
68
68
|
| `DESIGN.md` | Design contract (if present). Changes require design review. |
|
|
69
69
|
|
|
70
70
|
## Mode System
|
package/dist/templates/bedrock-agentcore-runtime/files/src/application/ports/agent-runtime.port.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contract the AgentCore runtime drives — an application port, not an
|
|
3
|
+
* infrastructure detail (ADR-0053).
|
|
4
|
+
*
|
|
5
|
+
* Implemented by your agent (a LangGraph graph, a tool-calling loop, a single
|
|
6
|
+
* LLM call) and injected into the server: the inbound HTTP adapter depends only
|
|
7
|
+
* on this port, never on a concrete agent, and this module depends on nothing —
|
|
8
|
+
* no transport type, no HTTP envelope, no SDK. `runStream` is optional; when
|
|
9
|
+
* absent, `stream: true` requests fall back to a single `run()` result.
|
|
10
|
+
*/
|
|
11
|
+
export interface AgentRunInput {
|
|
12
|
+
readonly prompt: string;
|
|
13
|
+
readonly sessionId: string;
|
|
14
|
+
readonly metadata?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AgentRunResult {
|
|
18
|
+
readonly output: string;
|
|
19
|
+
readonly metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AgentRuntimePort {
|
|
23
|
+
run(input: AgentRunInput): Promise<AgentRunResult>;
|
|
24
|
+
runStream?(input: AgentRunInput): AsyncIterable<string>;
|
|
25
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { AgentRuntimePort } from "../../../application/ports/agent-runtime.port";
|
|
1
2
|
import {
|
|
2
3
|
invocationPayloadSchema,
|
|
3
|
-
type AgentRuntimePort,
|
|
4
4
|
type InvocationResponse,
|
|
5
5
|
} from "../runtime/payload";
|
|
6
6
|
import { readSessionId, withSession } from "../runtime/session";
|
package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/server.ts
CHANGED
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { createInvocationHandler } from "./invocations.handler";
|
|
6
6
|
import { handlePing } from "./ping.handler";
|
|
7
|
-
import type { AgentRuntimePort } from "
|
|
7
|
+
import type { AgentRuntimePort } from "../../../application/ports/agent-runtime.port";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* AgentCore Runtime container entrypoint.
|
|
@@ -39,25 +39,8 @@ export interface InvocationErrorResponse {
|
|
|
39
39
|
readonly sessionId?: string;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* fall back to a single `run()` result.
|
|
48
|
-
*/
|
|
49
|
-
export interface AgentRunInput {
|
|
50
|
-
readonly prompt: string;
|
|
51
|
-
readonly sessionId: string;
|
|
52
|
-
readonly metadata?: Record<string, unknown>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface AgentRunResult {
|
|
56
|
-
readonly output: string;
|
|
57
|
-
readonly metadata?: Record<string, unknown>;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface AgentRuntimePort {
|
|
61
|
-
run(input: AgentRunInput): Promise<AgentRunResult>;
|
|
62
|
-
runStream?(input: AgentRunInput): AsyncIterable<string>;
|
|
63
|
-
}
|
|
42
|
+
// The port the runtime drives (`AgentRuntimePort` and its `AgentRunInput` /
|
|
43
|
+
// `AgentRunResult` companions) is NOT declared here: it is an application
|
|
44
|
+
// contract and lives at `src/application/ports/agent-runtime.port.ts`
|
|
45
|
+
// (ADR-0053). What stays in this module is the HTTP wire envelope above, which
|
|
46
|
+
// is infrastructure by definition.
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"envVars": [],
|
|
60
60
|
"outputs": [
|
|
61
61
|
"Dockerfile.agentcore",
|
|
62
|
+
"src/application/ports/agent-runtime.port.ts",
|
|
62
63
|
"src/infrastructure/agentcore/http/invocations.handler.ts",
|
|
63
64
|
"src/infrastructure/agentcore/http/ping.handler.ts",
|
|
64
65
|
"src/infrastructure/agentcore/http/server.ts",
|
|
@@ -41,8 +41,10 @@ remote cache.
|
|
|
41
41
|
|
|
42
42
|
## Usage
|
|
43
43
|
|
|
44
|
-
Push to a feature branch → CI runs.
|
|
45
|
-
the
|
|
44
|
+
Push to a feature branch → CI runs. Deploy workflows start **manual-only**
|
|
45
|
+
(`workflow_dispatch`) and the preview job is gated on the `ENABLE_PREVIEW_DEPLOYS` repository
|
|
46
|
+
variable, so a freshly pushed repo has zero failing checks — each generated workflow's header
|
|
47
|
+
comment lists the secrets it needs and how to switch on automatic triggers.
|
|
46
48
|
|
|
47
49
|
## Notes for agents
|
|
48
50
|
|
|
@@ -53,16 +55,20 @@ the secrets each needs.
|
|
|
53
55
|
- Only the workflow for the chosen `deploy_target` is emitted.
|
|
54
56
|
- **Dependabot is tuned to avoid a first-publish PR flood.** Action bumps are
|
|
55
57
|
grouped into one PR; npm minor+patch bumps are batched into one PR per
|
|
56
|
-
dependency type (`production-dependencies`, `dev-dependencies`),
|
|
57
|
-
bumps
|
|
58
|
-
|
|
58
|
+
dependency type (`production-dependencies`, `dev-dependencies`), and **major**
|
|
59
|
+
npm bumps are **ignored** outright (an `ignore` block on
|
|
60
|
+
`version-update:semver-major`) — a fresh repo is a major behind on several
|
|
61
|
+
deps at once. Delete the ignore block when you're ready to review majors one
|
|
62
|
+
at a time; security advisories open PRs regardless. To go quieter still, make
|
|
63
|
+
the npm ecosystem security-only: change the npm entry's existing
|
|
59
64
|
`open-pull-requests-limit: 5` to `0` (version updates off; security updates
|
|
60
65
|
still open) — trades freshness for near-zero noise on a freshly scaffolded repo.
|
|
61
66
|
|
|
62
67
|
## Checklist (post-install)
|
|
63
68
|
|
|
64
|
-
Verify CI runs green; add the secrets
|
|
65
|
-
|
|
69
|
+
Verify CI runs green; add the secrets listed in each workflow's header comment; set Turbo cache
|
|
70
|
+
vars; uncomment the deploy workflow's push trigger and confirm it runs on merge to main; set
|
|
71
|
+
`ENABLE_PREVIEW_DEPLOYS=true` and open a PR to test preview deploys; review Dependabot PRs.
|
|
66
72
|
|
|
67
73
|
## Related
|
|
68
74
|
|
|
@@ -15,8 +15,9 @@ updates:
|
|
|
15
15
|
# npm: batch NON-BREAKING bumps (minor + patch) into one PR per dependency
|
|
16
16
|
# type, so a freshly published repo doesn't open a wave of PRs (every dep is
|
|
17
17
|
# "behind latest" at once on first push — previously production deps were
|
|
18
|
-
# ungrouped, so each one opened its own PR). MAJOR bumps
|
|
19
|
-
#
|
|
18
|
+
# ungrouped, so each one opened its own PR). MAJOR bumps are IGNORED for the
|
|
19
|
+
# first release cycle (see the ignore block below) — a fresh repo is a major
|
|
20
|
+
# behind on several deps at once, and each major opens its own PR.
|
|
20
21
|
# To go quieter still, switch npm to security-only updates — see README.
|
|
21
22
|
- package-ecosystem: npm
|
|
22
23
|
directory: /
|
|
@@ -30,3 +31,9 @@ updates:
|
|
|
30
31
|
dev-dependencies:
|
|
31
32
|
dependency-type: development
|
|
32
33
|
update-types: ["minor", "patch"]
|
|
34
|
+
# First-release-cycle quiet mode: skip major version bumps entirely.
|
|
35
|
+
# Delete this block once the project is stable enough to review majors
|
|
36
|
+
# one at a time. Security advisories still open PRs regardless.
|
|
37
|
+
ignore:
|
|
38
|
+
- dependency-name: "*"
|
|
39
|
+
update-types: ["version-update:semver-major"]
|
|
@@ -33,20 +33,12 @@ jobs:
|
|
|
33
33
|
steps:
|
|
34
34
|
- uses: actions/checkout@v5
|
|
35
35
|
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# packageManager-pinned project. Committing yarn.lock does NOT make it
|
|
43
|
-
# safe: the hazard is ordering, not the lockfile. To cache, add a
|
|
44
|
-
# separate actions/cache step AFTER Corepack instead. The Turbo cache
|
|
45
|
-
# below already covers task outputs.
|
|
46
|
-
|
|
47
|
-
# Corepack activates the package manager pinned in package.json
|
|
48
|
-
# (`packageManager`). Without it, the runner's default Yarn (Classic)
|
|
49
|
-
# can't honor a Yarn-4 project. See SETUP.md.
|
|
36
|
+
# Corepack MUST run before setup-node: setup-node@v5 probes the
|
|
37
|
+
# package-manager cache with the runner's global Yarn (Classic 1.22),
|
|
38
|
+
# which hard-errors on a packageManager-pinned yarn@4 project. Enabling
|
|
39
|
+
# Corepack first makes `yarn` resolve to the pinned shim. Corepack
|
|
40
|
+
# activates the package manager pinned in package.json
|
|
41
|
+
# (`packageManager`). See SETUP.md.
|
|
50
42
|
- name: Enable Corepack
|
|
51
43
|
run: corepack enable
|
|
52
44
|
|
|
@@ -56,6 +48,18 @@ jobs:
|
|
|
56
48
|
run: |
|
|
57
49
|
corepack prepare "$(node -p 'require("./package.json").packageManager')" --activate
|
|
58
50
|
|
|
51
|
+
- uses: actions/setup-node@v5
|
|
52
|
+
with:
|
|
53
|
+
node-version: "{node_version}"
|
|
54
|
+
# No `cache: yarn` — and the v5 auto-probe is disabled explicitly:
|
|
55
|
+
# setup-node@v5 otherwise still runs the global Yarn Classic
|
|
56
|
+
# (`yarn cache dir`) to locate the store, which fails on a
|
|
57
|
+
# packageManager-pinned project. Committing yarn.lock does NOT make it
|
|
58
|
+
# safe: the hazard is the probe, not the lockfile. To cache, add a
|
|
59
|
+
# separate actions/cache step AFTER Corepack instead. The Turbo cache
|
|
60
|
+
# below already covers task outputs.
|
|
61
|
+
package-manager-cache: false
|
|
62
|
+
|
|
59
63
|
# First run has no committed lockfile, so install is NOT immutable.
|
|
60
64
|
# After you commit yarn.lock, switch this to `yarn install --immutable`
|
|
61
65
|
# (npm: `npm ci`; pnpm: `pnpm install --frozen-lockfile`). See SETUP.md.
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
name: Deploy to Fly.io
|
|
2
2
|
|
|
3
|
-
# Production deploy
|
|
4
|
-
#
|
|
3
|
+
# Production deploy — manual-only (workflow_dispatch) until Fly.io is
|
|
4
|
+
# configured, so a freshly pushed repo shows zero failed Actions runs (F20).
|
|
5
|
+
# Fly.io suits apps that need persistent connections / WebSockets. Deploy
|
|
6
|
+
# config lives in fly.toml.
|
|
5
7
|
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
+
# TO ENABLE automatic deploys on merge to main:
|
|
9
|
+
# 1. Add FLY_API_TOKEN in GitHub repo → Settings → Secrets and variables →
|
|
10
|
+
# Actions (create one with `fly tokens create deploy`).
|
|
11
|
+
# 2. Uncomment the push trigger below (keep workflow_dispatch — it gives you
|
|
12
|
+
# a manual deploy button in the Actions tab).
|
|
8
13
|
on:
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
# push:
|
|
16
|
+
# branches: [main]
|
|
11
17
|
|
|
12
18
|
concurrency:
|
|
13
19
|
group: deploy-production
|