@tracedojo/sdk 0.1.0 → 0.1.1

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 CHANGED
@@ -90,7 +90,7 @@ The SDK, compiled distribution, documentation in this package, and starter
90
90
  templates are licensed under [Apache-2.0](LICENSE). The hosted dashboard is
91
91
  proprietary and is not included in this package.
92
92
 
93
- [Setup guide](https://github.com/syedarman1/TraceDojo/blob/main/docs/WORKFLOWS.md)
94
- · [Security](https://github.com/syedarman1/TraceDojo/blob/main/docs/SECURITY.md)
95
- · [Limitations](https://github.com/syedarman1/TraceDojo/blob/main/LIMITATIONS.md)
93
+ [Setup guide](https://tracedojo.com/docs)
94
+ · [Security](https://tracedojo.com/docs/security)
95
+ · [Limitations](https://tracedojo.com/docs/limitations)
96
96
  · [Dashboard](https://tracedojo.com)
package/dist/cli.js CHANGED
@@ -260,7 +260,7 @@ async function main() {
260
260
  console.log(`Before: ${before.runs[0].status} — ${before.runs[0].metrics.mutations} committed writes; duplicate booking.`);
261
261
  console.log(`After: ${after.runs[0].status} — ${after.runs[0].metrics.mutations} committed write; the retry reused the original booking.`);
262
262
  console.log('Both no-fault controls passed. Scripted example; no model calls.');
263
- console.log(`Open before.json and after.json from ${directory} in the Workflows dashboard.`);
263
+ console.log(`Open before.json and after.json from ${directory} in a project at https://tracedojo.com (sign-in required), using Workflows → Preview report. Preview does not save reports.\nLocal dashboard and upload instructions: https://github.com/syedarman1/TraceDojo/blob/main/docs/WORKFLOWS.md#inspect-and-save-reports`);
264
264
  return;
265
265
  }
266
266
  if (!['test', 'import-langsmith'].includes(command))
package/dist/starter.js CHANGED
@@ -5,6 +5,20 @@ import { dirname, isAbsolute, relative, resolve, sep } from 'node:path';
5
5
  import { worldFiles } from './worlds.js';
6
6
  export async function createStarter(directory, ci, template = 'calendar', virtualTime = false) {
7
7
  const files = await worldFiles(template);
8
+ const { version } = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
9
+ files['README.md'] =
10
+ '# Install the SDK first\n\n' +
11
+ 'Running `npx tracedojo init` creates files but does not install a project dependency. ' +
12
+ 'From your repository root, run `npm init -y` only if you do not already have a package.json, then:\n\n' +
13
+ `\`\`\`sh\nnpm install --save-dev --save-exact @tracedojo/sdk@${version}\n\`\`\`\n\n` +
14
+ 'The test commands below use that local installation. Commit package.json and package-lock.json for reproducible CI.\n\n' +
15
+ files['README.md'];
16
+ if (ci) {
17
+ files['README.md'] +=
18
+ '\n## First CI run\n\nThe generated push filter uses `main`. Change it in `.github/workflows/tracedojo.yml` if your default branch differs. The first adoption PR can report an incomplete comparison because no baseline exists yet. Merge the generated workflows and comment script to the default branch, then verify its baseline run succeeds before requiring `agent-checks` in branch protection. Subsequent PRs need a report for their exact base commit; rerun that base workflow if its artifact is missing or expired.\n';
19
+ }
20
+ files['README.md'] +=
21
+ '\n## View your reports\n\nAt https://tracedojo.com, sign in, create a project, and open Workflows → Preview report to inspect JSON in your browser. Preview does not save it. To save reports, create an upload token in project settings and follow the upload instructions in https://github.com/syedarman1/TraceDojo/blob/main/docs/WORKFLOWS.md#inspect-and-save-reports. That guide also covers running the dashboard locally without an account. Never commit upload tokens or private reports.\n';
8
22
  if (virtualTime) {
9
23
  const workflow = JSON.parse(files['workflow.json']);
10
24
  workflow.clock = { mode: 'virtual', startMs: 0, maxTimeMs: 60000 };
package/dist/worlds.js CHANGED
@@ -274,6 +274,6 @@ export async function worldFiles(id) {
274
274
  'adapter.mjs': template
275
275
  .replace('/* DEFINITION */ {}', JSON.stringify(definition, null, 2))
276
276
  .replace('/* EFFECT */', world.effect),
277
- 'README.md': `# ${world.title}\n\nSynthetic, in-memory starter. No model calls or real services.\n\nRun from your repository with the SDK installed:\n\n\`\`\`sh\nnpx --no-install tracedojo test --config PATH/workflow.json --adapter PATH/adapter.mjs\n\`\`\`\n\nReplace PATH with this directory. Five scenarios cover lost confirmation, request timeout, temporary unavailability, malformed responses, and revoked permission.\n\nTo reproduce the bug, change \`operationKey: 'one-operation'\` to \`operationKey: String(attempt)\` in the reference agent. The lost-confirmation check must fail. Restore the stable key to pass.\n\nThe simulated tool accepts only this fixture's target and payload. Expand validation and state transitions for your application; these are starting points, not full service emulators. Replace createAgent with your agent and route all tools through context.call. Keep each trial's conversation state inside the factory. Review task, state, and checks independently of recorded outputs.\n\nHandlers are synchronous and only mutate their state draft. Local adapters are trusted code, not sandboxed. Add .tracedojo/ to .gitignore; reports can contain application data.\n`,
277
+ 'README.md': `# ${world.title}\n\nSynthetic, in-memory starter. No model calls or real services.\n\nRun from your repository with the SDK installed:\n\n\`\`\`sh\nnpx --no-install tracedojo test --config PATH/workflow.json --adapter PATH/adapter.mjs\n\`\`\`\n\nReplace PATH with this directory. Five scenarios cover lost confirmation, request timeout, temporary unavailability, malformed responses, and revoked permission.\n\nTo reproduce the bug, change \`operationKey: 'one-operation'\` to \`operationKey: String(attempt)\` in the reference agent. The lost-confirmation check must fail. Restore the stable key to pass.\n\nThe simulated tool accepts only this fixture's target and payload. Expand validation and state transitions for your application; these are starting points, not full service emulators. Replace createAgent with your agent and route all tools through context.call. Keep each trial's conversation state inside the factory. Review task, state, and checks independently of recorded outputs.\n\nHandlers may return promises and only mutate their state draft; await asynchronous work before returning. Local adapters are trusted code, not sandboxed. Add .tracedojo/ to .gitignore; reports can contain application data.\n`,
278
278
  };
279
279
  }
package/package.json CHANGED
@@ -1,16 +1,10 @@
1
1
  {
2
2
  "name": "@tracedojo/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Controlled tool failures and state assertions for AI agents",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Syed Arman",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/syedarman1/TraceDojo.git",
10
- "directory": "packages/sdk"
11
- },
12
- "homepage": "https://tracedojo.com",
13
- "bugs": "https://github.com/syedarman1/TraceDojo/issues",
7
+ "homepage": "https://tracedojo.com/docs",
14
8
  "publishConfig": {
15
9
  "access": "public",
16
10
  "registry": "https://registry.npmjs.org/"
@@ -81,5 +75,18 @@
81
75
  "@langchain/core": {
82
76
  "optional": true
83
77
  }
84
- }
78
+ },
79
+ "keywords": [
80
+ "ai-agents",
81
+ "llm-testing",
82
+ "chaos-engineering",
83
+ "prompt-injection",
84
+ "regression-testing"
85
+ ],
86
+ "repository": {
87
+ "type": "git",
88
+ "url": "git+https://github.com/syedarman1/tracedojo-sdk.git",
89
+ "directory": "packages/sdk"
90
+ },
91
+ "bugs": "https://github.com/syedarman1/tracedojo-sdk/issues"
85
92
  }
@@ -62,4 +62,4 @@ paid model calls separately; never expose credentials to untrusted pull requests
62
62
  Exit codes: 0 passed, 1 failed checks, 2 invalid setup/input, 3 incomplete results.
63
63
  Reports preserve individual trials; new assertion failures cannot cancel each other out.
64
64
 
65
- Full setup: https://github.com/syedarman1/TraceDojo/blob/main/docs/WORKFLOWS.md
65
+ Full setup: https://tracedojo.com/docs