Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .agents/rules/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Repository Rules

- Use `npm run format:check` to verify formatting and `npm run format` to apply
the [dprint configuration](../../dprint.json). Security manifests retain their original bytes.

## Ownership and boundaries

- Agent Trace consumes only documented, permission-scoped Host projections.
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Formatting

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci --ignore-scripts
- run: npm run format:check
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ unavailable, the Timeline shows no rows and never falls back to another source.

## Configuration

| Setting | Default | Values | Meaning |
| --- | --- | --- | --- |
| `timelineWindowSize` | `500` | 50-500 | Bound the in-memory and rendered Timeline window. |
| Setting | Default | Values | Meaning |
| -------------------- | ------- | ------ | ------------------------------------------------- |
| `timelineWindowSize` | `500` | 50-500 | Bound the in-memory and rendered Timeline window. |

Configuration applies on restart so the owning Cordis fiber replaces page
state cleanly. Page unmount and plugin deactivation own their disposers.
Expand Down
32 changes: 32 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"indentWidth": 2,
"newLineKind": "lf",
"typescript": {
"module.sortImportDeclarations": "maintain",
"module.sortExportDeclarations": "maintain",
"quoteStyle": "preferSingle",
"jsx.quoteStyle": "preferDouble",
"semiColons": "asi"
},
"markdown": {
"textWrap": "maintain"
},
"includes": [
"**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json,jsonc,md,markdown}"
],
// Exclude npm-generated lock and build outputs; maintained source and tests remain included.
"excludes": [
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"package-lock.json",
// Byte-addressed security artifacts: do not rewrite manifests or their recorded digests.
"runtime-manifest.json",
"cordisx.plugin.json"
],
"plugins": [
"npm:@dprint/typescript@0.96.1",
"npm:@dprint/json@0.23.0",
"npm:@dprint/markdown@0.23.3"
]
}
239 changes: 239 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"test": "vitest run",
"naming:check": "node scripts/check-public-naming.mjs",
"check": "npm run naming:check && npm run typecheck && npm run build && npm test && npm run naming:check && npm run pack:check",
"pack:check": "npm pack --dry-run"
"pack:check": "npm pack --dry-run",
"format": "dprint fmt",
"format:check": "dprint check"
},
"dependencies": {
"@deepseek-ai/cordis": "4.0.1",
Expand All @@ -30,6 +32,7 @@
},
"devDependencies": {
"@cordisx/protocol": "github:cordisx/cordisx-protocol#c96c290697f9e802a68c6d3bb094fd27d8d00d1e",
"dprint": "0.57.1",
"jsdom": "^26.1.0",
"typescript": "^5.9.2",
"vitest": "^3.2.4"
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-public-naming.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFile, readdir } from 'node:fs/promises'
import { readdir, readFile } from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

Expand Down
25 changes: 17 additions & 8 deletions src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ export const TRACE_SESSION_HEADER_ACTION = Object.freeze({
group: 'action' as const,
order: 10 as const,
item: Object.freeze({
label: Object.freeze({ namespace: 'agent-trace-showcase', key: 'action.open', fallback: 'Open Agent Trace Timeline' }),
ariaLabel: Object.freeze({ namespace: 'agent-trace-showcase', key: 'action.open', fallback: 'Open Agent Trace Timeline' }),
label: Object.freeze({
namespace: 'agent-trace-showcase',
key: 'action.open',
fallback: 'Open Agent Trace Timeline',
}),
ariaLabel: Object.freeze({
namespace: 'agent-trace-showcase',
key: 'action.open',
fallback: 'Open Agent Trace Timeline',
}),
icon: 'host:history' as const,
route: Object.freeze({ id: 'session.timeline' as const }),
routeBehavior: 'toggle' as const,
Expand All @@ -24,10 +32,11 @@ export interface SessionHeaderEntryAdapter {
}

export const STRUCTURED_SESSION_HEADER_ENTRY: SessionHeaderEntryAdapter = Object.freeze({
register: (ctx: Context, contribution: typeof TRACE_SESSION_HEADER_ACTION) => ctx.slots.register({
name: contribution.surface,
id: contribution.id,
group: contribution.group,
order: contribution.order,
}, contribution.item),
register: (ctx: Context, contribution: typeof TRACE_SESSION_HEADER_ACTION) =>
ctx.slots.register({
name: contribution.surface,
id: contribution.id,
group: contribution.group,
order: contribution.order,
}, contribution.item),
})
Loading
Loading