@c4a/context 0.7.14 → 0.7.15

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.
@@ -319,6 +319,12 @@ input without that flag to continue. A preview is not approval and does not make
319
319
  a stale revision valid.
320
320
 
321
321
  Review can approve checked pages while leaving repair pages pending. The HTML
322
+ report shows the current site navigation, candidate changes and expected file
323
+ paths. Unchanged approved pages retain their titles with omitted bodies. Enter
324
+ revision instructions directly in the report; the copied code and following
325
+ instruction lines must be returned together without edits. The CLI binds them to
326
+ the reviewed content and baseline and returns repair commands while leaving
327
+ those pages pending. Changed candidates require a fresh review. The HTML
322
328
  review code includes pending positions; managed Review provides the same current
323
329
  scope as a JSON template. Send decisions only for pages actually reviewed. Omit
324
330
  means a durable exclusion, not repair. Partial approval alone does not build.
@@ -124,3 +124,41 @@ fixed. Accepted failures remain visible as warnings and unavailable-resource
124
124
  notices; they are never represented as downloaded evidence. Review shows
125
125
  available previews, references, and warnings so the human or managed policy can
126
126
  assess the page with its non-text evidence.
127
+
128
+ ## Image choices for a production task
129
+
130
+ The work-start report asks once when a task contains more than 30 distinct images
131
+ and has no explicit image policy. The choices are intelligent conversion and
132
+ inclusion (recommended), include all as images with compression, or include none
133
+ with placeholders. Count the whole task, not each capture or writing batch.
134
+ Review reports show the resulting image handling and any fallbacks.
135
+
136
+ To skip image acquisition while preserving visible source placeholders:
137
+
138
+ ```ts
139
+ captureLark({ source: handbook, resources: { images: "reference-only" } });
140
+ ```
141
+
142
+ To retain static images but exclude GIF files:
143
+
144
+ ```ts
145
+ captureLark({ source: handbook, resources: { gifs: "reference-only" } });
146
+ ```
147
+
148
+ Both fields also accept `bundle`; omitted fields retain normal capture behavior.
149
+ Known GIF metadata avoids downloading; when a source only supplies an opaque
150
+ media token, identification may require downloading the file. Such a GIF is then
151
+ excluded from the snapshot assets and knowledge, rather than decoded or retained.
152
+ Existing evidence is not deleted by changing a policy. Already approved image
153
+ references must be revised through the normal Review flow to change their content.
154
+
155
+ Inclusion does not mean lossless original-byte delivery. The package optimizer
156
+ preserves animations without decoding every frame or silently flattening them.
157
+ Codec failures and images that cannot fit delivery budgets become visible output
158
+ placeholders with a build warning; approved source bytes remain unchanged.
159
+ Do not rewrite approved prose to repair a codec error or disable pixel safety
160
+ limits. The reading meaning of an image is handled in writing and Review.
161
+
162
+ Source document links can be retained for viewing under the reader's permissions.
163
+ Temporary signed media links are not durable image hosting. Do not embed access
164
+ tokens in generated pages or claim that excluded images have been interpreted.
package/index.js CHANGED
@@ -31425,6 +31425,12 @@ var captureFile = (definition) => {
31425
31425
  var captureLark = (definition) => {
31426
31426
  const sourceDefinition = bindSourceType(definition.source, "lark", "captureLark source");
31427
31427
  const sourceId = getSourceName(sourceDefinition);
31428
+ for (const key of ["images", "gifs"]) {
31429
+ const value = definition.resources?.[key];
31430
+ if (value !== undefined && value !== "bundle" && value !== "reference-only") {
31431
+ throw new TypeError(`captureLark resources.${key} must be bundle or reference-only`);
31432
+ }
31433
+ }
31428
31434
  const maxBytesPerResource = definition.resources?.maxBytesPerResource ?? 20 * 1024 * 1024;
31429
31435
  const maxTotalBytes = definition.resources?.maxTotalBytes ?? 200 * 1024 * 1024;
31430
31436
  if (!Number.isSafeInteger(maxBytesPerResource) || maxBytesPerResource < 1) {
@@ -31443,6 +31449,8 @@ var captureLark = (definition) => {
31443
31449
  writes: [sourceSnapshotResource(sourceDefinition, "lark")],
31444
31450
  source: sourceDefinition,
31445
31451
  resources: {
31452
+ ...definition.resources?.images === undefined ? {} : { images: definition.resources.images },
31453
+ ...definition.resources?.gifs === undefined ? {} : { gifs: definition.resources.gifs },
31446
31454
  videos: definition.resources?.videos ?? "reference-only",
31447
31455
  maxBytesPerResource,
31448
31456
  maxTotalBytes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context",
3
- "version": "0.7.14",
3
+ "version": "0.7.15",
4
4
  "type": "module",
5
5
  "description": "Declarative SDK for Context knowledge sources, workflows, review, and package outputs",
6
6
  "license": "MIT",
package/phases.d.ts CHANGED
@@ -50,6 +50,8 @@ export type CaptureLarkPhaseDefinition = {
50
50
  writes: readonly PhaseResourceReference[];
51
51
  source: LarkSourceDefinition | LarkSourceReference;
52
52
  resources: {
53
+ images?: "reference-only" | "bundle";
54
+ gifs?: "reference-only" | "bundle";
53
55
  videos: "reference-only" | "bundle";
54
56
  maxBytesPerResource: number;
55
57
  maxTotalBytes: number;
@@ -76,6 +78,8 @@ export declare const captureFile: (definition: {
76
78
  export declare const captureLark: (definition: {
77
79
  source: LarkSourceDefinition | LarkSourceReference;
78
80
  resources?: {
81
+ images?: "reference-only" | "bundle";
82
+ gifs?: "reference-only" | "bundle";
79
83
  videos?: "reference-only" | "bundle";
80
84
  maxBytesPerResource?: number;
81
85
  maxTotalBytes?: number;