@intentius/chant-lexicon-temporal 0.6.0 → 0.8.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/dist/codegen/docs-cli.d.ts +3 -0
- package/dist/codegen/docs-cli.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +7 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +3 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +16 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/package-cli.d.ts +3 -0
- package/dist/codegen/package-cli.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +10 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/composites/apply-op.d.ts +73 -0
- package/dist/composites/apply-op.d.ts.map +1 -0
- package/dist/composites/cloud-stack.d.ts +54 -0
- package/dist/composites/cloud-stack.d.ts.map +1 -0
- package/dist/composites/dev-stack.d.ts +63 -0
- package/dist/composites/dev-stack.d.ts.map +1 -0
- package/dist/composites/pipeline-audit-op.d.ts +55 -0
- package/dist/composites/pipeline-audit-op.d.ts.map +1 -0
- package/dist/composites/reconcile-op.d.ts +62 -0
- package/dist/composites/reconcile-op.d.ts.map +1 -0
- package/dist/composites/watch-op.d.ts +56 -0
- package/dist/composites/watch-op.d.ts.map +1 -0
- package/dist/composites/workflow-audit-op.d.ts +61 -0
- package/dist/composites/workflow-audit-op.d.ts.map +1 -0
- package/dist/config.d.ts +197 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/coverage.d.ts +15 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +26 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +5 -5
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp001-retention-too-short.d.ts +10 -0
- package/dist/lint/post-synth/tmp001-retention-too-short.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp002-allowall-without-note.d.ts +11 -0
- package/dist/lint/post-synth/tmp002-allowall-without-note.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp010-cron-syntax.d.ts +12 -0
- package/dist/lint/post-synth/tmp010-cron-syntax.d.ts.map +1 -0
- package/dist/lint/post-synth/tmp011-namespace-reference.d.ts +10 -0
- package/dist/lint/post-synth/tmp011-namespace-reference.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/op/activities/apply.d.ts +70 -0
- package/dist/op/activities/apply.d.ts.map +1 -0
- package/dist/op/activities/argo.d.ts +56 -0
- package/dist/op/activities/argo.d.ts.map +1 -0
- package/dist/op/activities/build.d.ts +11 -0
- package/dist/op/activities/build.d.ts.map +1 -0
- package/dist/op/activities/gitlab.d.ts +15 -0
- package/dist/op/activities/gitlab.d.ts.map +1 -0
- package/dist/op/activities/heartbeat.d.ts +27 -0
- package/dist/op/activities/heartbeat.d.ts.map +1 -0
- package/dist/op/activities/helm.d.ts +18 -0
- package/dist/op/activities/helm.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +29 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/op/activities/kubectl.d.ts +11 -0
- package/dist/op/activities/kubectl.d.ts.map +1 -0
- package/dist/op/activities/lifecycle.d.ts +42 -0
- package/dist/op/activities/lifecycle.d.ts.map +1 -0
- package/dist/op/activities/pipeline-audit.d.ts +84 -0
- package/dist/op/activities/pipeline-audit.d.ts.map +1 -0
- package/dist/op/activities/policy.d.ts +17 -0
- package/dist/op/activities/policy.d.ts.map +1 -0
- package/dist/op/activities/reconcile.d.ts +69 -0
- package/dist/op/activities/reconcile.d.ts.map +1 -0
- package/dist/op/activities/shell.d.ts +13 -0
- package/dist/op/activities/shell.d.ts.map +1 -0
- package/dist/op/activities/teardown.d.ts +10 -0
- package/dist/op/activities/teardown.d.ts.map +1 -0
- package/dist/op/activities/util.d.ts +8 -0
- package/dist/op/activities/util.d.ts.map +1 -0
- package/dist/op/activities/wait.d.ts +16 -0
- package/dist/op/activities/wait.d.ts.map +1 -0
- package/dist/op/activities/workflow-audit.d.ts +92 -0
- package/dist/op/activities/workflow-audit.d.ts.map +1 -0
- package/dist/op/serializer.d.ts +20 -0
- package/dist/op/serializer.d.ts.map +1 -0
- package/dist/plugin.d.ts +10 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/resources.d.ts +101 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/rules/{tmp001.ts → tmp001-retention-too-short.ts} +9 -11
- package/dist/rules/{tmp002.ts → tmp002-allowall-without-note.ts} +9 -11
- package/dist/rules/tmp011-namespace-reference.ts +2 -2
- package/dist/serializer.d.ts +15 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +18 -0
- package/dist/validate.d.ts.map +1 -0
- package/package.json +27 -6
- package/src/lint/post-synth/index.ts +13 -0
- package/src/lint/post-synth/post-synth.test.ts +124 -1
- package/src/lint/{rules/tmp001.ts → post-synth/tmp001-retention-too-short.ts} +9 -11
- package/src/lint/{rules/tmp002.ts → post-synth/tmp002-allowall-without-note.ts} +9 -11
- package/src/lint/post-synth/tmp011-namespace-reference.ts +2 -2
- package/src/op/serializer.ts +2 -2
- package/src/plugin.test.ts +5 -6
- package/src/plugin.ts +2 -12
- package/src/serializer.ts +6 -6
- package/src/lint/rules/index.ts +0 -2
- package/src/lint/rules/lint-rules.test.ts +0 -150
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-cli.d.ts","sourceRoot":"","sources":["../../src/codegen/docs-cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-cli.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporal lexicon generation step.
|
|
3
|
+
*
|
|
4
|
+
* All 4 resources (TemporalServer, TemporalNamespace, SearchAttribute, TemporalSchedule)
|
|
5
|
+
* are hand-written. There is no remote spec to fetch or parse. This module builds
|
|
6
|
+
* the required lexiconJSON catalog and typesDTS stubs so that packagePipeline
|
|
7
|
+
* can hash and write dist/ artifacts correctly.
|
|
8
|
+
*/
|
|
9
|
+
import type { GenerateResult } from "@intentius/chant/codegen/generate";
|
|
10
|
+
export type { GenerateResult };
|
|
11
|
+
export declare function generate(opts?: {
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
force?: boolean;
|
|
14
|
+
}): Promise<GenerateResult>;
|
|
15
|
+
export declare function writeGeneratedFiles(_result: GenerateResult, pkgDir: string): void;
|
|
16
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,YAAY,EAAE,cAAc,EAAE,CAAC;AAgD/B,wBAAsB,QAAQ,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAarG;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAKjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-cli.d.ts","sourceRoot":"","sources":["../../src/codegen/package-cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporal lexicon packaging — delegates to core packagePipeline.
|
|
3
|
+
*/
|
|
4
|
+
import { type PackageOptions, type PackageResult } from "@intentius/chant/codegen/package";
|
|
5
|
+
export type { PackageOptions, PackageResult };
|
|
6
|
+
/**
|
|
7
|
+
* Package the Temporal lexicon into a distributable BundleSpec.
|
|
8
|
+
*/
|
|
9
|
+
export declare function packageLexicon(opts?: PackageOptions): Promise<PackageResult>;
|
|
10
|
+
//# sourceMappingURL=package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/codegen/package.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;AAM9C;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CA6BtF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ApplyOp composite — the code → cloud workflow as an Op.
|
|
3
|
+
*
|
|
4
|
+
* Compute the plan, then apply via the target's native mechanism. Authority
|
|
5
|
+
* stays with the platform (the CloudFormation stack, the Kubernetes API
|
|
6
|
+
* server, the ARM resource group) — chant never hosts a state file.
|
|
7
|
+
*
|
|
8
|
+
* Phases: build → plan → [approve] → apply. Deletes are limited to chant-owned
|
|
9
|
+
* orphans, ridden on the native prune/complete path scoped to the ownership
|
|
10
|
+
* marker, so a foreign resource is never touched.
|
|
11
|
+
*
|
|
12
|
+
* An ungated apply may run on the local Op executor; a gated apply needs
|
|
13
|
+
* Temporal for the durable approval wait (added in #125).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // additive, local executor
|
|
18
|
+
* export const { op } = ApplyOp({ name: "prod-apply", env: "prod", target: "kubectl" });
|
|
19
|
+
*
|
|
20
|
+
* // gated destructive apply on Temporal
|
|
21
|
+
* export const { op } = ApplyOp({
|
|
22
|
+
* name: "prod-apply",
|
|
23
|
+
* env: "prod",
|
|
24
|
+
* target: "kubectl",
|
|
25
|
+
* delete: "gated",
|
|
26
|
+
* gate: { signalName: "approve-apply", description: "Approve prod apply with deletes" },
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @see #112 — stateless-authoritative state model + live import
|
|
31
|
+
*/
|
|
32
|
+
import { OpResource } from "@intentius/chant/op";
|
|
33
|
+
import type { ApplyTarget, DeleteMode } from "../op/activities/apply.js";
|
|
34
|
+
export interface ApplyOpConfig {
|
|
35
|
+
/** Op name (kebab-case). */
|
|
36
|
+
name: string;
|
|
37
|
+
/** Environment — CFN stack name / ARM resource group / kube context env. */
|
|
38
|
+
env: string;
|
|
39
|
+
/** Native apply mechanism. Default: "kubectl". */
|
|
40
|
+
target?: ApplyTarget;
|
|
41
|
+
/** Built manifest/template path (or directory for kubectl). Default: "dist". */
|
|
42
|
+
output?: string;
|
|
43
|
+
/** Project directory to build. Default: ".". */
|
|
44
|
+
path?: string;
|
|
45
|
+
/** Delete handling. Default: "never". */
|
|
46
|
+
delete?: DeleteMode;
|
|
47
|
+
/**
|
|
48
|
+
* Approval gate before the apply. Implied when `delete: "gated"`; may also be
|
|
49
|
+
* set explicitly. Omit `signalName` to default to `approve-<name>`.
|
|
50
|
+
*/
|
|
51
|
+
gate?: {
|
|
52
|
+
signalName?: string;
|
|
53
|
+
timeout?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Saga-style rollback on partial apply failure, run as an `onFailure` phase.
|
|
58
|
+
* Defaults on whenever the apply is destructive (`delete !== "never"`). Pass
|
|
59
|
+
* `{ command }` to supply a rollback command for targets without a native one
|
|
60
|
+
* (kubectl, ARM); `false` to disable.
|
|
61
|
+
*/
|
|
62
|
+
compensate?: boolean | {
|
|
63
|
+
command?: string;
|
|
64
|
+
};
|
|
65
|
+
/** Override the task queue. Defaults to `name`. */
|
|
66
|
+
taskQueue?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface ApplyOpResources {
|
|
69
|
+
/** Op resource — generates the build→plan→[approve]→apply workflow. */
|
|
70
|
+
op: InstanceType<typeof OpResource>;
|
|
71
|
+
}
|
|
72
|
+
export declare function ApplyOp(config: ApplyOpConfig): ApplyOpResources;
|
|
73
|
+
//# sourceMappingURL=apply-op.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-op.d.ts","sourceRoot":"","sources":["../../src/composites/apply-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAA6B,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAqE/D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TemporalCloudStack composite — a Temporal Cloud namespace + search attributes.
|
|
3
|
+
*
|
|
4
|
+
* Bundles a TemporalNamespace with an optional set of SearchAttribute entities.
|
|
5
|
+
* No server resource is included — this composite assumes you are connecting
|
|
6
|
+
* to Temporal Cloud (or a remotely managed server).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* export const { ns, searchAttributes } = TemporalCloudStack({
|
|
11
|
+
* namespace: "prod",
|
|
12
|
+
* retention: "30d",
|
|
13
|
+
* searchAttributes: [
|
|
14
|
+
* { name: "Project", type: "Keyword" },
|
|
15
|
+
* { name: "Priority", type: "Int" },
|
|
16
|
+
* ],
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import { TemporalNamespace, SearchAttribute } from "../resources.js";
|
|
21
|
+
import type { SearchAttributeProps } from "../resources.js";
|
|
22
|
+
export interface TemporalCloudStackConfig {
|
|
23
|
+
/** Namespace name (required). */
|
|
24
|
+
namespace: string;
|
|
25
|
+
/**
|
|
26
|
+
* Workflow history retention.
|
|
27
|
+
* @default "30d"
|
|
28
|
+
*/
|
|
29
|
+
retention?: string;
|
|
30
|
+
/** Human-readable description for the namespace. */
|
|
31
|
+
description?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Search attribute definitions to register in this namespace.
|
|
34
|
+
* Each entry creates a SearchAttribute entity scoped to this namespace.
|
|
35
|
+
*/
|
|
36
|
+
searchAttributes?: Array<Pick<SearchAttributeProps, "name" | "type">>;
|
|
37
|
+
}
|
|
38
|
+
export interface TemporalCloudStackResources {
|
|
39
|
+
ns: InstanceType<typeof TemporalNamespace>;
|
|
40
|
+
searchAttributes: InstanceType<typeof SearchAttribute>[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create a Temporal Cloud namespace stack.
|
|
44
|
+
*
|
|
45
|
+
* Returns a TemporalNamespace and an array of SearchAttribute entities.
|
|
46
|
+
* Export the namespace and spread the search attributes from your chant project:
|
|
47
|
+
*
|
|
48
|
+
* ```typescript
|
|
49
|
+
* export const { ns, searchAttributes } = TemporalCloudStack({ namespace: "prod" });
|
|
50
|
+
* export const [projectAttr, priorityAttr] = searchAttributes;
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function TemporalCloudStack(config: TemporalCloudStackConfig): TemporalCloudStackResources;
|
|
54
|
+
//# sourceMappingURL=cloud-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-stack.d.ts","sourceRoot":"","sources":["../../src/composites/cloud-stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,wBAAwB;IACvC,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;CACvE;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC3C,gBAAgB,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,EAAE,CAAC;CAC1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,2BAA2B,CAiBhG"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TemporalDevStack composite — a local dev server + default namespace.
|
|
3
|
+
*
|
|
4
|
+
* Wires together a TemporalServer (dev mode) and a TemporalNamespace so
|
|
5
|
+
* that `chant build` emits a docker-compose.yml and temporal-setup.sh
|
|
6
|
+
* ready for local development.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* export const { server, ns } = TemporalDevStack({
|
|
11
|
+
* namespace: "my-app",
|
|
12
|
+
* retention: "7d",
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import { TemporalServer, TemporalNamespace } from "../resources.js";
|
|
17
|
+
export interface TemporalDevStackConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Temporal server version.
|
|
20
|
+
* @default "1.26.2"
|
|
21
|
+
*/
|
|
22
|
+
version?: string;
|
|
23
|
+
/**
|
|
24
|
+
* gRPC port for the Temporal frontend.
|
|
25
|
+
* @default 7233
|
|
26
|
+
*/
|
|
27
|
+
port?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Port for the Temporal Web UI.
|
|
30
|
+
* @default 8080
|
|
31
|
+
*/
|
|
32
|
+
uiPort?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Namespace to create on first run.
|
|
35
|
+
* @default "default"
|
|
36
|
+
*/
|
|
37
|
+
namespace?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Workflow history retention for the namespace.
|
|
40
|
+
* @default "7d"
|
|
41
|
+
*/
|
|
42
|
+
retention?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Human-readable description for the namespace.
|
|
45
|
+
*/
|
|
46
|
+
description?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface TemporalDevStackResources {
|
|
49
|
+
server: InstanceType<typeof TemporalServer>;
|
|
50
|
+
ns: InstanceType<typeof TemporalNamespace>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a local Temporal dev stack.
|
|
54
|
+
*
|
|
55
|
+
* Returns a TemporalServer (dev mode) and a TemporalNamespace wired to the
|
|
56
|
+
* same default namespace. Export both from your chant project:
|
|
57
|
+
*
|
|
58
|
+
* ```typescript
|
|
59
|
+
* export const { server, ns } = TemporalDevStack({ namespace: "my-app" });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare function TemporalDevStack(config?: TemporalDevStackConfig): TemporalDevStackResources;
|
|
63
|
+
//# sourceMappingURL=dev-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-stack.d.ts","sourceRoot":"","sources":["../../src/composites/dev-stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,EAAE,EAAE,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;CAC5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,sBAA2B,GAAG,yBAAyB,CAe/F"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PipelineAuditOp composite — the live include/component audit of GitLab
|
|
3
|
+
* pipelines as a chant Op + an optional TemporalSchedule (#303).
|
|
4
|
+
*
|
|
5
|
+
* The gitlab post-synth checks (#297) own everything answerable from the
|
|
6
|
+
* deterministic build. This Op owns *only* the checks that require live
|
|
7
|
+
* resolution against a moving upstream truth — a pinned component/include ref
|
|
8
|
+
* that no longer resolves, an archived or moved upstream project, or a new
|
|
9
|
+
* advisory covering a component/image in use. It sits at **observe** on the
|
|
10
|
+
* lifecycle dial, with a finding-mode (`report | issue | merge-request`) as the
|
|
11
|
+
* **reconcile** step — for GitLab the PR mode is a merge request.
|
|
12
|
+
*
|
|
13
|
+
* Runs one-shot on the local Op executor via `chant run`; on Temporal when a
|
|
14
|
+
* `schedule` is given.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* export const { op, schedule } = PipelineAuditOp({
|
|
19
|
+
* name: "pipeline-audit",
|
|
20
|
+
* schedule: "0 6 * * *",
|
|
21
|
+
* onFinding: "merge-request",
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @see #297 — the deterministic counterpart this freshens.
|
|
26
|
+
*/
|
|
27
|
+
import { OpResource } from "@intentius/chant/op";
|
|
28
|
+
import { TemporalSchedule } from "../resources.js";
|
|
29
|
+
import type { PipelineAuditMode } from "../op/activities/pipeline-audit.js";
|
|
30
|
+
export interface PipelineAuditOpConfig {
|
|
31
|
+
/** Op name (kebab-case). Used as workflow function name, task queue, schedule id base. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** Cron expression. When set, a TemporalSchedule fires the workflow; omit for one-shot. */
|
|
34
|
+
schedule?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Path to the emitted `.gitlab-ci.yml` to audit at run time.
|
|
37
|
+
* @default ".gitlab-ci.yml"
|
|
38
|
+
*/
|
|
39
|
+
pipelineFile?: string;
|
|
40
|
+
/**
|
|
41
|
+
* What to produce on findings. Default: "report".
|
|
42
|
+
* @default "report"
|
|
43
|
+
*/
|
|
44
|
+
onFinding?: PipelineAuditMode;
|
|
45
|
+
/** Override the task queue. Defaults to `name`. */
|
|
46
|
+
taskQueue?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface PipelineAuditOpResources {
|
|
49
|
+
/** Op resource — generates the audit workflow on `chant build`. */
|
|
50
|
+
op: InstanceType<typeof OpResource>;
|
|
51
|
+
/** Temporal schedule, present only when `schedule` was given. */
|
|
52
|
+
schedule?: InstanceType<typeof TemporalSchedule>;
|
|
53
|
+
}
|
|
54
|
+
export declare function PipelineAuditOp(config: PipelineAuditOpConfig): PipelineAuditOpResources;
|
|
55
|
+
//# sourceMappingURL=pipeline-audit-op.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-audit-op.d.ts","sourceRoot":"","sources":["../../src/composites/pipeline-audit-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAa,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAMzE,MAAM,WAAW,qBAAqB;IACpC,0FAA0F;IAC1F,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,mEAAmE;IACnE,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;IACpC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;CAClD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,wBAAwB,CAsCvF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReconcileOp composite — the cloud → code workflow as an Op.
|
|
3
|
+
*
|
|
4
|
+
* Keeps source tracking reality: when live drifts from declarations, open a PR
|
|
5
|
+
* that regenerates the affected TypeScript. Mirrors the {@link WatchOp} shape.
|
|
6
|
+
*
|
|
7
|
+
* Phases: snapshot → plan → regenerate (live import) → open PR. The
|
|
8
|
+
* regenerate-and-PR step is the `reconcilePr` activity (#122), which derives
|
|
9
|
+
* the change set from `chant lifecycle plan` and opens a reviewable PR.
|
|
10
|
+
*
|
|
11
|
+
* Runs on the local Op executor for a one-shot `chant run`; on Temporal when a
|
|
12
|
+
* `schedule` is given (the cron + run history are the value, as with WatchOp).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // one-shot, local executor
|
|
17
|
+
* export const { op } = ReconcileOp({ name: "prod-reconcile", env: "prod" });
|
|
18
|
+
*
|
|
19
|
+
* // scheduled on Temporal
|
|
20
|
+
* export const { op, schedule } = ReconcileOp({
|
|
21
|
+
* name: "prod-reconcile",
|
|
22
|
+
* env: "prod",
|
|
23
|
+
* schedule: "0 * * * *", // hourly
|
|
24
|
+
* scope: { owned: true },
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @see #112 — stateless-authoritative state model + live import
|
|
29
|
+
*/
|
|
30
|
+
import { OpResource } from "@intentius/chant/op";
|
|
31
|
+
import { TemporalSchedule } from "../resources.js";
|
|
32
|
+
import type { ReconcileMode } from "../op/activities/reconcile.js";
|
|
33
|
+
export interface ReconcileOpConfig {
|
|
34
|
+
/** Op name (kebab-case). Used as workflow function name, task queue, schedule id base. */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Environment to reconcile (e.g. "prod"). */
|
|
37
|
+
env: string;
|
|
38
|
+
/**
|
|
39
|
+
* Cron expression. When set, a TemporalSchedule fires the workflow; omit for
|
|
40
|
+
* one-shot `chant run` on the local executor.
|
|
41
|
+
*/
|
|
42
|
+
schedule?: string;
|
|
43
|
+
/**
|
|
44
|
+
* What to produce on drift. Default: "pull-request".
|
|
45
|
+
* @default "pull-request"
|
|
46
|
+
*/
|
|
47
|
+
onDrift?: ReconcileMode;
|
|
48
|
+
/** Restrict reconciliation to chant-owned resources. */
|
|
49
|
+
scope?: {
|
|
50
|
+
owned?: boolean;
|
|
51
|
+
};
|
|
52
|
+
/** Override the task queue. Defaults to `name`. */
|
|
53
|
+
taskQueue?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ReconcileOpResources {
|
|
56
|
+
/** Op resource — generates the snapshot→plan→regenerate→PR workflow. */
|
|
57
|
+
op: InstanceType<typeof OpResource>;
|
|
58
|
+
/** Temporal schedule, present only when `schedule` was given. */
|
|
59
|
+
schedule?: InstanceType<typeof TemporalSchedule>;
|
|
60
|
+
}
|
|
61
|
+
export declare function ReconcileOp(config: ReconcileOpConfig): ReconcileOpResources;
|
|
62
|
+
//# sourceMappingURL=reconcile-op.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-op.d.ts","sourceRoot":"","sources":["../../src/composites/reconcile-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAuB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAMhE,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wDAAwD;IACxD,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;IACpC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;CAClD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,oBAAoB,CA6C3E"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WatchOp composite — periodic state observation via a chant Op + a
|
|
3
|
+
* TemporalSchedule.
|
|
4
|
+
*
|
|
5
|
+
* Composes existing pieces:
|
|
6
|
+
* - The Op codegen (#7) emits a workflow that runs phases sequentially
|
|
7
|
+
* - The auto-emit search-attribute behavior (#28) tags each phase
|
|
8
|
+
* - The pre-built lifecycleSnapshot + lifecycleDiff activities (this commit)
|
|
9
|
+
* - TemporalSchedule fires the workflow on a cron schedule
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* export const { op, schedule } = WatchOp({
|
|
14
|
+
* name: "prod-watch",
|
|
15
|
+
* env: "prod",
|
|
16
|
+
* schedule: "0,15,30,45 * * * *", // every 15 minutes
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @see #31 — Continuous observation (the issue this composite addresses)
|
|
21
|
+
*/
|
|
22
|
+
import { OpResource } from "@intentius/chant/op";
|
|
23
|
+
import { TemporalSchedule } from "../resources.js";
|
|
24
|
+
export interface WatchOpConfig {
|
|
25
|
+
/**
|
|
26
|
+
* Op name (kebab-case). Used as workflow function name (camelCase),
|
|
27
|
+
* task queue, and schedule id base.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/** Environment to snapshot + diff (e.g. "prod"). */
|
|
31
|
+
env: string;
|
|
32
|
+
/**
|
|
33
|
+
* Cron expression controlling how often the watch runs.
|
|
34
|
+
* @example "0,15,30,45 * * * *" — every 15 minutes
|
|
35
|
+
* @example "0 * * * *" — hourly
|
|
36
|
+
*/
|
|
37
|
+
schedule: string;
|
|
38
|
+
/**
|
|
39
|
+
* Override the task queue. Defaults to `name`.
|
|
40
|
+
*/
|
|
41
|
+
taskQueue?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Run `chant lifecycle diff --live` (queries cloud APIs) instead of the
|
|
44
|
+
* default digest-only diff. Recommended for real drift detection.
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
live?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface WatchOpResources {
|
|
50
|
+
/** Op resource — generates the snapshot+diff workflow on `chant build`. */
|
|
51
|
+
op: InstanceType<typeof OpResource>;
|
|
52
|
+
/** Temporal schedule that fires the workflow on the configured cron. */
|
|
53
|
+
schedule: InstanceType<typeof TemporalSchedule>;
|
|
54
|
+
}
|
|
55
|
+
export declare function WatchOp(config: WatchOpConfig): WatchOpResources;
|
|
56
|
+
//# sourceMappingURL=watch-op.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-op.d.ts","sourceRoot":"","sources":["../../src/composites/watch-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAuB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMhD,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;IACpC,wEAAwE;IACxE,QAAQ,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;CACjD;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAsC/D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkflowAuditOp composite — the live supply-chain audit of GitHub workflows
|
|
3
|
+
* as a chant Op + an optional TemporalSchedule (#292).
|
|
4
|
+
*
|
|
5
|
+
* The github post-synth checks (#286-#291) own everything answerable from the
|
|
6
|
+
* deterministic build. This Op owns *only* the checks that require live
|
|
7
|
+
* resolution against a moving upstream truth — stale SHA pins, impostor refs,
|
|
8
|
+
* symbolic-ref confusion, pin/comment mismatch, advisories, archived upstreams.
|
|
9
|
+
* It sits at **observe** on the lifecycle dial, with a finding-mode (mirroring
|
|
10
|
+
* `ReconcileOp`: `report | issue | pull-request`) as the **reconcile** step.
|
|
11
|
+
*
|
|
12
|
+
* Runs one-shot on the local Op executor via `chant run`; on Temporal when a
|
|
13
|
+
* `schedule` is given, for continuous re-audit between change windows.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // one-shot, local executor
|
|
18
|
+
* export const { op } = WorkflowAuditOp({ name: "actions-audit" });
|
|
19
|
+
*
|
|
20
|
+
* // scheduled daily on Temporal, open a PR that bumps a stale pin
|
|
21
|
+
* export const { op, schedule } = WorkflowAuditOp({
|
|
22
|
+
* name: "actions-audit",
|
|
23
|
+
* schedule: "0 6 * * *",
|
|
24
|
+
* onFinding: "pull-request",
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @see #286 — the deterministic counterpart this freshens.
|
|
29
|
+
*/
|
|
30
|
+
import { OpResource } from "@intentius/chant/op";
|
|
31
|
+
import { TemporalSchedule } from "../resources.js";
|
|
32
|
+
import type { WorkflowAuditMode } from "../op/activities/workflow-audit.js";
|
|
33
|
+
export interface WorkflowAuditOpConfig {
|
|
34
|
+
/** Op name (kebab-case). Used as workflow function name, task queue, schedule id base. */
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Cron expression. When set, a TemporalSchedule fires the workflow for
|
|
38
|
+
* continuous re-audit; omit for one-shot `chant run` on the local executor.
|
|
39
|
+
*/
|
|
40
|
+
schedule?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Directory of emitted workflow files to audit at run time.
|
|
43
|
+
* @default ".github/workflows"
|
|
44
|
+
*/
|
|
45
|
+
workflowsDir?: string;
|
|
46
|
+
/**
|
|
47
|
+
* What to produce on findings. Default: "report".
|
|
48
|
+
* @default "report"
|
|
49
|
+
*/
|
|
50
|
+
onFinding?: WorkflowAuditMode;
|
|
51
|
+
/** Override the task queue. Defaults to `name`. */
|
|
52
|
+
taskQueue?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface WorkflowAuditOpResources {
|
|
55
|
+
/** Op resource — generates the audit workflow on `chant build`. */
|
|
56
|
+
op: InstanceType<typeof OpResource>;
|
|
57
|
+
/** Temporal schedule, present only when `schedule` was given. */
|
|
58
|
+
schedule?: InstanceType<typeof TemporalSchedule>;
|
|
59
|
+
}
|
|
60
|
+
export declare function WorkflowAuditOp(config: WorkflowAuditOpConfig): WorkflowAuditOpResources;
|
|
61
|
+
//# sourceMappingURL=workflow-audit-op.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-audit-op.d.ts","sourceRoot":"","sources":["../../src/composites/workflow-audit-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAuB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAMzE,MAAM,WAAW,qBAAqB;IACpC,0FAA0F;IAC1F,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,mEAAmE;IACnE,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;IACpC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;CAClD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,wBAAwB,CAwCvF"}
|