agent-trajectories 0.5.8 → 0.6.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 +18 -10
- package/dist/{chunk-WMJRBQB4.js → chunk-ENWKFNUD.js} +522 -267
- package/dist/chunk-ENWKFNUD.js.map +1 -0
- package/dist/cli/index.js +588 -384
- package/dist/cli/index.js.map +1 -1
- package/dist/{index-C9IcYSNQ.d.ts → index-DEr3Rs32.d.ts} +67 -41
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/package.json +3 -1
- package/dist/chunk-WMJRBQB4.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ A **trajectory** is the complete story of agent work on a task:
|
|
|
21
21
|
Works with any task system: Beads, Linear, Jira, GitHub Issues, or standalone. Trajectories are a universal format—like Markdown for documentation.
|
|
22
22
|
|
|
23
23
|
### Multiple Storage Backends
|
|
24
|
-
- **File system** (default) - `.trajectories/` directory, git-friendly
|
|
24
|
+
- **File system** (default) - `.agentworkforce/trajectories/` directory, git-friendly
|
|
25
25
|
- **SQLite** - Local indexing and search
|
|
26
26
|
- **PostgreSQL/S3** - For teams and archival
|
|
27
27
|
|
|
@@ -95,17 +95,25 @@ Over time, trajectories become a searchable knowledge base:
|
|
|
95
95
|
### CLI
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
#
|
|
98
|
+
# Run without installing globally
|
|
99
|
+
npx --yes agent-trajectories start "Implement auth module"
|
|
100
|
+
|
|
101
|
+
# Or install globally if you prefer the short trail command
|
|
99
102
|
npm install -g agent-trajectories
|
|
103
|
+
trail start "Implement auth module"
|
|
100
104
|
|
|
101
|
-
# Or install locally
|
|
105
|
+
# Or install locally in a project
|
|
102
106
|
npm install agent-trajectories
|
|
107
|
+
npx --no-install trail start "Implement auth module"
|
|
108
|
+
# or
|
|
109
|
+
npm exec -- trail start "Implement auth module"
|
|
103
110
|
```
|
|
104
111
|
|
|
105
112
|
```bash
|
|
106
113
|
# Start tracking a task
|
|
107
114
|
trail start "Implement auth module"
|
|
108
|
-
# (
|
|
115
|
+
# (for non-global installs, replace `trail` with
|
|
116
|
+
# `npx --yes agent-trajectories`, `npx --no-install trail`, or `npm exec -- trail`)
|
|
109
117
|
|
|
110
118
|
# View current status
|
|
111
119
|
trail status
|
|
@@ -132,20 +140,20 @@ trail compact --commits abc1234,def5678 # Trajectories matching specific commit
|
|
|
132
140
|
trail compact --pr 123 # Trajectories mentioning PR #123
|
|
133
141
|
trail compact --since 7d # Last 7 days
|
|
134
142
|
trail compact --all # Everything (including previously compacted)
|
|
135
|
-
trail compact --pr 123 --discard-sources # Delete source trajectories
|
|
143
|
+
trail compact --pr 123 --discard-sources # Delete source trajectories after compaction
|
|
136
144
|
```
|
|
137
145
|
|
|
138
146
|
### Automatic Compaction (GitHub Action)
|
|
139
147
|
|
|
140
148
|
Add these steps to any workflow that runs on PR merge (e.g., your release or publish flow). Requires `ref: ${{ github.event.pull_request.base.ref }}` and `fetch-depth: 0` on checkout, plus `contents: write` permission.
|
|
141
149
|
|
|
142
|
-
Use `--discard-sources` when the compacted summary should replace the raw source trajectories. This removes the source JSON/Markdown/trace files
|
|
150
|
+
Use `--discard-sources` when the compacted summary should replace the raw source trajectories. This removes the source JSON/Markdown/trace files, reducing future list/search noise.
|
|
143
151
|
|
|
144
152
|
```yaml
|
|
145
153
|
- name: Compact trajectories
|
|
146
154
|
run: |
|
|
147
155
|
PR_COMMITS=$(git log ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} --format=%H | paste -sd, -)
|
|
148
|
-
OUTPUT=".trajectories/compacted/pr-${{ github.event.pull_request.number }}.json"
|
|
156
|
+
OUTPUT=".agentworkforce/trajectories/compacted/pr-${{ github.event.pull_request.number }}.json"
|
|
149
157
|
if [ -n "$PR_COMMITS" ]; then
|
|
150
158
|
npx agent-trajectories compact --commits "$PR_COMMITS" --output "$OUTPUT" --discard-sources
|
|
151
159
|
else
|
|
@@ -153,7 +161,7 @@ Use `--discard-sources` when the compacted summary should replace the raw source
|
|
|
153
161
|
fi
|
|
154
162
|
- name: Commit compacted trajectories
|
|
155
163
|
run: |
|
|
156
|
-
git add .trajectories/ || true
|
|
164
|
+
git add .agentworkforce/trajectories/ || true
|
|
157
165
|
git diff --cached --quiet || \
|
|
158
166
|
(git commit -m "chore: compact trajectories for PR #${{ github.event.pull_request.number }}" && git push)
|
|
159
167
|
```
|
|
@@ -463,7 +471,7 @@ The client manages trajectories with persistent storage.
|
|
|
463
471
|
```typescript
|
|
464
472
|
const client = new TrajectoryClient({
|
|
465
473
|
defaultAgent: 'my-agent', // Default agent name
|
|
466
|
-
dataDir: '.
|
|
474
|
+
dataDir: '.', // Base directory; stores under .agentworkforce/trajectories
|
|
467
475
|
autoSave: true, // Auto-save after operations
|
|
468
476
|
});
|
|
469
477
|
|
|
@@ -542,7 +550,7 @@ const t = TrajectoryBuilder.create('Task')
|
|
|
542
550
|
This project is in early development. See [PROPOSAL-trajectories.md](./PROPOSAL-trajectories.md) for the full design document.
|
|
543
551
|
|
|
544
552
|
**v1.0 (current)**
|
|
545
|
-
- [x] File-based storage (`.trajectories/`)
|
|
553
|
+
- [x] File-based storage (`.agentworkforce/trajectories/`)
|
|
546
554
|
- [x] Core CLI commands (`start`, `decision`, `complete`, `list`, `show`, `export`)
|
|
547
555
|
- [x] Agent Trace spec compliance (`.trace.json` generation)
|
|
548
556
|
- [x] Multi-agent participation tracking
|