Skip to content

Commit 287209b

Browse files
committed
Add context activity backfill
Add context-auto, context-objects, and context-activities strategy handling for context collection backfill. The auto strategy classifies ordinary objects directly and extracts objects from supported Create activities while preserving shared request budgets, deduplication, abort, and interval behavior. Document the strategy behavior and add coverage for explicit, automatic, empty, overlapping, and duplicate strategy configurations. Assisted-by: Codex:gpt-5
1 parent 5d2a8ed commit 287209b

4 files changed

Lines changed: 620 additions & 42 deletions

File tree

packages/backfill/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,23 @@ for await (
6161

6262
The seed object itself is not yielded. If it appears in the discovered
6363
collection, it is skipped by ID.
64+
65+
By default, `backfill()` uses the `context-auto` strategy. In this mode,
66+
collection items are treated as backfillable objects by default. If an item is
67+
recognized as an Activity, `backfill()` extracts the activity's object instead.
68+
69+
To read only FEP-f228 activity collections, enable the `context-activities`
70+
strategy:
71+
72+
~~~~ typescript
73+
for await (
74+
const item of backfill({ documentLoader }, note, {
75+
strategies: ["context-activities"],
76+
})
77+
) {
78+
console.log(item.object);
79+
}
80+
~~~~
81+
82+
The `context-activities` strategy currently supports `Create` activities and
83+
yields the activity's object, not the activity itself.

0 commit comments

Comments
 (0)