@cat-factory/prompt-fragments 1.0.92 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/collections/deployment.d.ts +27 -0
- package/dist/collections/deployment.d.ts.map +1 -0
- package/dist/collections/deployment.js +108 -0
- package/dist/collections/deployment.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,12 @@ tenant-scoped [prompt-fragment library](https://github.com/kibertoad/cat-factory
|
|
|
9
9
|
## What's here
|
|
10
10
|
|
|
11
11
|
- `src/collections/*.ts`: fragments authored per topic. Today: `node`, `react`,
|
|
12
|
-
`acceptance`, `design`, `style`, `migration`. Each exports an array of
|
|
12
|
+
`acceptance`, `design`, `style`, `migration`, `deployment`. Each exports an array of
|
|
13
|
+
`PromptFragment`. Shipping a collection does NOT put it in front of an agent: a fragment reaches a
|
|
14
|
+
run only by being SELECTED (a task's `fragmentIds`, a service frame's `serviceFragmentIds`, or a
|
|
15
|
+
task-type default), so `appliesTo` narrows the management surface rather than gating a dispatch.
|
|
16
|
+
`deployment` is opt-in for exactly that reason, and exports `DEPLOYMENT_FRAGMENT_IDS` so a
|
|
17
|
+
deployment can name the set in one line.
|
|
13
18
|
- `src/index.ts`: merges the collections into a single `FRAGMENTS` registry plus
|
|
14
19
|
`FRAGMENTS_BY_ID` and `getFragment(id)` for O(1) lookup during composition.
|
|
15
20
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PromptFragment } from '@cat-factory/contracts';
|
|
2
|
+
export declare const deploymentFragments: PromptFragment[];
|
|
3
|
+
/**
|
|
4
|
+
* The ids of the deployment fragments, in catalog order, derived from {@link deploymentFragments}
|
|
5
|
+
* so it can never drift from the definitions.
|
|
6
|
+
*
|
|
7
|
+
* NOTHING SHIPS SELECTING THESE, deliberately, and that is the whole of their delivery story. A
|
|
8
|
+
* fragment reaches a run only by being SELECTED — a task's own `fragmentIds`, a service frame's
|
|
9
|
+
* `serviceFragmentIds`, or a task-type default — because the automatic per-run relevance selector
|
|
10
|
+
* is retired from the run path, so `appliesTo` narrows the management surface and gates nothing at
|
|
11
|
+
* dispatch. There is no deploy-shaped built-in task type to hang these on, and unioning them onto
|
|
12
|
+
* `feature` would fold three deployment standards into every feature run on every deployment,
|
|
13
|
+
* which is the same "long guidance riding every turn of a run that has no use for it" this catalog
|
|
14
|
+
* exists to avoid.
|
|
15
|
+
*
|
|
16
|
+
* So they are OPT-IN, by one of three acts a deployment or a workspace performs:
|
|
17
|
+
* - a workspace picks them on a task or on a service frame, in the fragment picker;
|
|
18
|
+
* - a deployment makes them the default for a task type of its own,
|
|
19
|
+
* `promptFragmentRegistry.registerTaskTypeDefaults('<type>', [...DEPLOYMENT_FRAGMENT_IDS])`;
|
|
20
|
+
* - a preset names them in its `defaultFragmentIds`, the way `preset_tech_migration` names
|
|
21
|
+
* `MIGRATION_FRAGMENT_IDS`.
|
|
22
|
+
*
|
|
23
|
+
* This export is what makes the second and third one line rather than three hand-copied ids that
|
|
24
|
+
* go stale the first time a fourth fragment joins the collection.
|
|
25
|
+
*/
|
|
26
|
+
export declare const DEPLOYMENT_FRAGMENT_IDS: readonly string[];
|
|
27
|
+
//# sourceMappingURL=deployment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/collections/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAsB5D,eAAO,MAAM,mBAAmB,EAAE,cAAc,EAqE/C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAyC,CAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// Best-practice fragments for shipping a CONTAINERIZED SERVICE: building and publishing the
|
|
2
|
+
// image, the workload manifest that runs it, and the cross-file contract that wires the workload
|
|
3
|
+
// to traffic. Authored from a recurring class of review finding rather than from a topic list:
|
|
4
|
+
// five of seven findings on one design review came from this class, and every one of them is a
|
|
5
|
+
// rule that is invisible until the cluster refuses the pod (a `runAsNonRoot` container with a
|
|
6
|
+
// username instead of a numeric UID does not start; a `readOnlyRootFilesystem` container with no
|
|
7
|
+
// writable mount dies the first time something touches `/tmp`).
|
|
8
|
+
//
|
|
9
|
+
// Three concerns, one fragment each:
|
|
10
|
+
// - `deployment.container-image`: what goes into the image and what gates the push.
|
|
11
|
+
// - `deployment.workload-runtime`: the pod-level settings the cluster enforces at admission.
|
|
12
|
+
// - `deployment.manifest-contract`: the names, labels and ports three files must agree on.
|
|
13
|
+
//
|
|
14
|
+
// Scoped by `appliesTo.agentKinds` rather than by block type: what makes these apply is that the
|
|
15
|
+
// step is DESIGNING or WRITING deployment artifacts, and a service, an API and a frontend all
|
|
16
|
+
// ship the same way. The design-time kinds get them because a round-2 finding here is usually a
|
|
17
|
+
// round-1 omission, which is the whole reason they are standards rather than review comments.
|
|
18
|
+
// `spec-writer` is deliberately absent from all three: it captures BUSINESS requirements only, and
|
|
19
|
+
// a numeric UID is not one.
|
|
20
|
+
export const deploymentFragments = [
|
|
21
|
+
{
|
|
22
|
+
id: 'deployment.container-image',
|
|
23
|
+
version: '1.0.0',
|
|
24
|
+
title: 'Container image build & publish',
|
|
25
|
+
category: 'Deployment',
|
|
26
|
+
summary: 'Immutable digest-pinned tags, a push gated on lint/typecheck/test, non-root by construction, pull-side auth.',
|
|
27
|
+
body: [
|
|
28
|
+
'Container image standards:',
|
|
29
|
+
'- Build for a NUMERIC non-root user: create the user in the image and set `USER <uid>` as a number, not a name. A workload with `runAsNonRoot` set cannot start from an image whose user is a name the kubelet cannot resolve to a uid.',
|
|
30
|
+
'- Publish IMMUTABLE tags: a content digest, or a tag derived from the commit sha. Never re-push `latest` or a moving tag and never rely on one to roll out; the deployed revision must be identifiable from the manifest alone.',
|
|
31
|
+
'- Gate the push on the checks: lint, typecheck and the test suite run BEFORE the image is published, not after. A published image is a thing someone can deploy, so an unverified one is a loaded gun in the registry.',
|
|
32
|
+
'- Order the pipeline push-then-apply: the image must exist in the registry before any manifest referencing it is applied, or the rollout fails on `ImagePullBackOff` for a reason that has nothing to do with the manifest.',
|
|
33
|
+
'- State the PULL-side auth: a registry is private by default (GHCR included), so the target namespace needs an image-pull credential and the workload must reference it. "The push worked" says nothing about whether the cluster can pull.',
|
|
34
|
+
'- Keep the runtime image minimal: no build toolchain, no test fixtures, no secrets baked in as layers or build args. Secrets arrive at run time from the platform, never from the image.',
|
|
35
|
+
].join('\n'),
|
|
36
|
+
brief: 'Container image: `USER <numeric uid>` in the image (a username breaks `runAsNonRoot`); publish immutable digest/sha tags, never a moving `latest`; gate the push on lint+typecheck+test; push before applying any manifest that references the image; the target namespace needs a pull credential (private registry is the default, GHCR included); keep the runtime image minimal with no secrets baked in.',
|
|
37
|
+
appliesTo: {
|
|
38
|
+
agentKinds: ['architect', 'coder', 'deploy-fixer'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'deployment.workload-runtime',
|
|
43
|
+
version: '1.0.0',
|
|
44
|
+
title: 'Workload runtime hardening',
|
|
45
|
+
category: 'Deployment',
|
|
46
|
+
summary: 'securityContext that actually starts, a writable mount for a read-only root, probes, resources, pull policy.',
|
|
47
|
+
body: [
|
|
48
|
+
'Workload runtime standards:',
|
|
49
|
+
'- `runAsNonRoot: true` requires a NUMERIC `runAsUser` (and normally `runAsGroup` + `fsGroup`) on the pod or container securityContext. Without one the pod fails admission or the container fails to create; the image having a non-root user is not enough on its own.',
|
|
50
|
+
'- `readOnlyRootFilesystem: true` requires an explicit writable mount for every path the process writes: at minimum an `emptyDir` at `/tmp`, plus caches, sockets and any scratch directory the runtime uses. Declare them; do not discover them from a crash loop.',
|
|
51
|
+
'- Drop what is not needed: `allowPrivilegeEscalation: false`, `capabilities.drop: [ALL]`, and no host namespaces, host paths or privileged mode unless the workload genuinely cannot work without them, stated as such.',
|
|
52
|
+
'- Set `imagePullPolicy` to match the tag: `IfNotPresent` is correct for an immutable digest-pinned tag and is a silent staleness bug for a mutable one. If the tag can move, the manifest is wrong, not the policy.',
|
|
53
|
+
'- Declare BOTH resource requests and limits, and state the reasoning for the numbers rather than copying a template. Requests are what the scheduler places on; limits are what the kernel enforces. A missing request lands the pod anywhere; a missing memory limit leaves the node to absorb whatever it takes.',
|
|
54
|
+
'- Declare readiness and liveness probes as the DIFFERENT questions they are: readiness gates traffic, liveness restarts the container. A liveness probe that checks a dependency turns an upstream outage into a restart loop.',
|
|
55
|
+
'- Give the workload a real shutdown path: handle SIGTERM, stop accepting new work, drain in flight, and set `terminationGracePeriodSeconds` above the real drain time.',
|
|
56
|
+
].join('\n'),
|
|
57
|
+
brief: 'Workload runtime: `runAsNonRoot` needs a NUMERIC `runAsUser`/`runAsGroup` (the image alone is not enough); `readOnlyRootFilesystem` needs an explicit writable mount per written path (at minimum an `emptyDir` at `/tmp`); drop privileges (`allowPrivilegeEscalation: false`, `capabilities.drop: [ALL]`, no host namespaces); `imagePullPolicy` must match tag mutability; declare resource requests AND limits with stated reasoning; readiness gates traffic and liveness restarts, so never probe a dependency in liveness; handle SIGTERM and size `terminationGracePeriodSeconds` to the real drain.',
|
|
58
|
+
appliesTo: {
|
|
59
|
+
agentKinds: ['architect', 'coder', 'deploy-fixer', 'environment-analyst'],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'deployment.manifest-contract',
|
|
64
|
+
version: '1.0.0',
|
|
65
|
+
title: 'Manifest cross-file contract',
|
|
66
|
+
category: 'Deployment',
|
|
67
|
+
summary: 'Selectors, labels, port names and namespaces that three files must agree on, from one source of truth.',
|
|
68
|
+
body: [
|
|
69
|
+
'Manifest cross-file contract:',
|
|
70
|
+
'A workload, the Service in front of it and the Ingress routing to that Service are three files carrying ONE contract. Nothing validates it: every mismatch below applies cleanly and fails as a silent 404, a Service with no endpoints, or traffic reaching nothing.',
|
|
71
|
+
'- The Service `selector` must match the pod TEMPLATE labels, not the labels on the workload object itself. These are different label sets and matching the wrong one is the single most common way to get a Service with zero endpoints.',
|
|
72
|
+
'- The Ingress `backend.service.name` must be the Service `metadata.name`, and its `port` must name a port the Service actually exposes, by the same NAME the Service gave it where the Service names its ports.',
|
|
73
|
+
'- Container `containerPort`, Service `targetPort` and the port the process actually listens on must be the same number. Prefer named ports so the agreement is readable rather than three literals to keep in step by hand.',
|
|
74
|
+
'- Every object must land in the same namespace, stated explicitly. An object defaulting to `default` while its siblings are namespaced is a resource nothing can reach.',
|
|
75
|
+
'- Derive the shared names and labels from ONE place (a chart value, a kustomize `commonLabels`, a single template variable). Three hand-written copies is not a contract, it is three chances to mistype one.',
|
|
76
|
+
'- When you change any of these, change every file that names it in the SAME change, and say in your report which files the rename touched.',
|
|
77
|
+
].join('\n'),
|
|
78
|
+
brief: 'Manifest contract: the Service `selector` matches the POD TEMPLATE labels, not the labels on the workload object itself; the Ingress backend names the Service `metadata.name` and a port the Service exposes, by the NAME the Service gave it; `containerPort` / `targetPort` / the listening port are one number, preferably a named port; every object states the same namespace explicitly; derive shared names and labels from ONE source (chart value / `commonLabels`); rename across every file in one change and report which files it touched.',
|
|
79
|
+
appliesTo: {
|
|
80
|
+
agentKinds: ['architect', 'coder', 'deploy-fixer', 'environment-analyst'],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* The ids of the deployment fragments, in catalog order, derived from {@link deploymentFragments}
|
|
86
|
+
* so it can never drift from the definitions.
|
|
87
|
+
*
|
|
88
|
+
* NOTHING SHIPS SELECTING THESE, deliberately, and that is the whole of their delivery story. A
|
|
89
|
+
* fragment reaches a run only by being SELECTED — a task's own `fragmentIds`, a service frame's
|
|
90
|
+
* `serviceFragmentIds`, or a task-type default — because the automatic per-run relevance selector
|
|
91
|
+
* is retired from the run path, so `appliesTo` narrows the management surface and gates nothing at
|
|
92
|
+
* dispatch. There is no deploy-shaped built-in task type to hang these on, and unioning them onto
|
|
93
|
+
* `feature` would fold three deployment standards into every feature run on every deployment,
|
|
94
|
+
* which is the same "long guidance riding every turn of a run that has no use for it" this catalog
|
|
95
|
+
* exists to avoid.
|
|
96
|
+
*
|
|
97
|
+
* So they are OPT-IN, by one of three acts a deployment or a workspace performs:
|
|
98
|
+
* - a workspace picks them on a task or on a service frame, in the fragment picker;
|
|
99
|
+
* - a deployment makes them the default for a task type of its own,
|
|
100
|
+
* `promptFragmentRegistry.registerTaskTypeDefaults('<type>', [...DEPLOYMENT_FRAGMENT_IDS])`;
|
|
101
|
+
* - a preset names them in its `defaultFragmentIds`, the way `preset_tech_migration` names
|
|
102
|
+
* `MIGRATION_FRAGMENT_IDS`.
|
|
103
|
+
*
|
|
104
|
+
* This export is what makes the second and third one line rather than three hand-copied ids that
|
|
105
|
+
* go stale the first time a fourth fragment joins the collection.
|
|
106
|
+
*/
|
|
107
|
+
export const DEPLOYMENT_FRAGMENT_IDS = deploymentFragments.map((f) => f.id);
|
|
108
|
+
//# sourceMappingURL=deployment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.js","sourceRoot":"","sources":["../../src/collections/deployment.ts"],"names":[],"mappings":"AAEA,4FAA4F;AAC5F,iGAAiG;AACjG,+FAA+F;AAC/F,+FAA+F;AAC/F,8FAA8F;AAC9F,iGAAiG;AACjG,gEAAgE;AAChE,EAAE;AACF,qCAAqC;AACrC,wFAAwF;AACxF,gGAAgG;AAChG,6FAA6F;AAC7F,EAAE;AACF,iGAAiG;AACjG,8FAA8F;AAC9F,gGAAgG;AAChG,8FAA8F;AAC9F,mGAAmG;AACnG,4BAA4B;AAE5B,MAAM,CAAC,MAAM,mBAAmB,GAAqB;IACnD;QACE,EAAE,EAAE,4BAA4B;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,qBAAqB,CAAC;SAC1E;KACF;CACF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsB,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { styleFragments, DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS } from './collectio
|
|
|
6
6
|
export { BUILTIN_TASK_TYPE_DEFAULTS } from './task-type-defaults.js';
|
|
7
7
|
export { MIGRATION_FRAGMENT_IDS, migrationFragmentIdsFor } from './collections/migration.js';
|
|
8
8
|
export { DESIGN_CONTEXT_FRAGMENT_ID, withDesignContextFragment } from './collections/design.js';
|
|
9
|
+
export { DEPLOYMENT_FRAGMENT_IDS } from './collections/deployment.js';
|
|
9
10
|
/** Fragments keyed by id for O(1) lookup during prompt composition. */
|
|
10
11
|
export declare const FRAGMENTS_BY_ID: ReadonlyMap<string, PromptFragment>;
|
|
11
12
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAY,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,sBAAsB,EAAiC,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAY,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,sBAAsB,EAAiC,MAAM,qBAAqB,CAAA;AAmB3F,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,eAAO,MAAM,SAAS,EAAE,cAAc,EAQrC,CAAA;AAKD,OAAO,EAAE,cAAc,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAA;AAG5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AAKpE,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAI5F,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAG/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAErE,uEAAuE;AACvE,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAE/D,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kCAAkC,IAAI,sBAAsB,CAO3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAElE"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PromptFragmentRegistry, defaultPromptFragmentRegistry } from '@cat-factory/kernel';
|
|
2
2
|
import { BUILTIN_TASK_TYPE_DEFAULTS } from './task-type-defaults.js';
|
|
3
3
|
import { acceptanceFragments } from './collections/acceptance.js';
|
|
4
|
+
import { deploymentFragments } from './collections/deployment.js';
|
|
4
5
|
import { designFragments } from './collections/design.js';
|
|
5
6
|
import { migrationFragments } from './collections/migration.js';
|
|
6
7
|
import { nodeFragments } from './collections/node.js';
|
|
@@ -13,6 +14,7 @@ export const FRAGMENTS = [
|
|
|
13
14
|
...designFragments,
|
|
14
15
|
...styleFragments,
|
|
15
16
|
...migrationFragments,
|
|
17
|
+
...deploymentFragments,
|
|
16
18
|
];
|
|
17
19
|
// Re-export the writing-style collection + the document-task style defaults so a consumer (the
|
|
18
20
|
// board service seeding a new document task's fragments, the docs-refresh preset building its
|
|
@@ -30,6 +32,9 @@ export { MIGRATION_FRAGMENT_IDS, migrationFragmentIdsFor } from './collections/m
|
|
|
30
32
|
// context carries a design-origin document reads the guidance automatically, rather than depending on
|
|
31
33
|
// a human having ticked it in a picker basic mode does not show.
|
|
32
34
|
export { DESIGN_CONTEXT_FRAGMENT_ID, withDesignContextFragment } from './collections/design.js';
|
|
35
|
+
// The containerized-service deployment ids, so a deployment can make the shipped set the default
|
|
36
|
+
// for its own task type or preset without restating the ids the collection already owns.
|
|
37
|
+
export { DEPLOYMENT_FRAGMENT_IDS } from './collections/deployment.js';
|
|
33
38
|
/** Fragments keyed by id for O(1) lookup during prompt composition. */
|
|
34
39
|
export const FRAGMENTS_BY_ID = new Map(FRAGMENTS.map((fragment) => [fragment.id, fragment]));
|
|
35
40
|
/**
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAavD,MAAM,CAAC,MAAM,SAAS,GAAqB;IACzC,GAAG,aAAa;IAChB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,eAAe;IAClB,GAAG,cAAc;IACjB,GAAG,kBAAkB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,EAAE,0BAA0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C,EAAE,EAAE,QAAQ,CAAC,CAAC,CACrD,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,kCAAkC;IAChD,MAAM,QAAQ,GAAG,6BAA6B,EAAE,CAAA;IAChD,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IAC/B,KAAK,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,0BAA0B,CAAC,EAAE,CAAC;QACzE,IAAI,GAAG;YAAE,QAAQ,CAAC,wBAAwB,CAAC,QAAoB,EAAE,GAAG,CAAC,CAAA;IACvE,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,EAAU;IACpC,OAAO,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;AAChC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/prompt-fragments",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Curated, versioned best-practice prompt fragments injected into agent system prompts.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@cat-factory/contracts": "0.324.0",
|
|
28
|
-
"@cat-factory/kernel": "0.
|
|
28
|
+
"@cat-factory/kernel": "0.316.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "7.0.2",
|