Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
]
},
"packageManager": "pnpm@10.33.0",
"dependencies": {
"@attest-protocol/attest-ts": "^0.1.0"
},
"devDependencies": {
"@biomejs/biome": "^2.4.9",
"@types/node": "^25.5.0",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 1 addition & 2 deletions src/cli/export.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { openStore, type ReceiptStore } from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import type { ReceiptStore } from "../store/store.js";
import { openStore } from "../store/store.js";
import { makeReceipt } from "../test-utils/receipts.js";
import { runExport } from "./export.js";

Expand Down
2 changes: 1 addition & 1 deletion src/cli/export.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ReceiptStore } from "../store/store.js";
import type { ReceiptStore } from "@attest-protocol/attest-ts";

/**
* Run the `attest export` command.
Expand Down
15 changes: 10 additions & 5 deletions src/cli/inspect.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import {
CONTEXT,
CREDENTIAL_TYPE,
generateKeyPair,
openStore,
type ReceiptStore,
signReceipt,
type UnsignedActionReceipt,
RECEIPT_VERSION as VERSION,
} from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { generateKeyPair, signReceipt } from "../receipt/signing.js";
import type { UnsignedActionReceipt } from "../receipt/types.js";
import { CONTEXT, CREDENTIAL_TYPE, VERSION } from "../receipt/types.js";
import type { ReceiptStore } from "../store/store.js";
import { openStore } from "../store/store.js";
import { runInspect } from "./inspect.js";

function makeUnsigned(): UnsignedActionReceipt {
Expand Down
3 changes: 1 addition & 2 deletions src/cli/inspect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { verifyReceipt } from "../receipt/signing.js";
import type { ReceiptStore } from "../store/store.js";
import { type ReceiptStore, verifyReceipt } from "@attest-protocol/attest-ts";

/**
* Options for the `attest inspect` command.
Expand Down
3 changes: 1 addition & 2 deletions src/cli/list.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { openStore, type ReceiptStore } from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import type { ReceiptStore } from "../store/store.js";
import { openStore } from "../store/store.js";
import { makeReceipt } from "../test-utils/receipts.js";
import { runList } from "./list.js";

Expand Down
5 changes: 3 additions & 2 deletions src/cli/list.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type {
ActionReceipt,
OutcomeStatus,
ReceiptQuery,
ReceiptStore,
RiskLevel,
} from "../receipt/types.js";
import type { ReceiptQuery, ReceiptStore } from "../store/store.js";
} from "@attest-protocol/attest-ts";

const VALID_RISK_LEVELS = new Set<string>([
"low",
Expand Down
9 changes: 6 additions & 3 deletions src/cli/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ import { execFileSync } from "node:child_process";
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import {
generateKeyPair,
hashReceipt,
openStore,
signReceipt,
} from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { hashReceipt } from "../receipt/hash.js";
import { generateKeyPair, signReceipt } from "../receipt/signing.js";
import { openStore } from "../store/store.js";
import { makeReceipt, makeUnsigned } from "../test-utils/receipts.js";

const CLI = join(
Expand Down
2 changes: 1 addition & 1 deletion src/cli/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { readFileSync } from "node:fs";
import { parseArgs } from "node:util";
import { openStore } from "../store/store.js";
import { openStore } from "@attest-protocol/attest-ts";
import { runExport } from "./export.js";
import { runInspect } from "./inspect.js";
import { runList } from "./list.js";
Expand Down
3 changes: 1 addition & 2 deletions src/cli/stats.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { openStore, type ReceiptStore } from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import type { ReceiptStore } from "../store/store.js";
import { openStore } from "../store/store.js";
import { makeReceipt } from "../test-utils/receipts.js";
import { runStats } from "./stats.js";

Expand Down
2 changes: 1 addition & 1 deletion src/cli/stats.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ReceiptStore } from "../store/store.js";
import type { ReceiptStore } from "@attest-protocol/attest-ts";

/**
* Options for the `attest stats` command.
Expand Down
11 changes: 7 additions & 4 deletions src/cli/verify.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {
generateKeyPair,
hashReceipt,
openStore,
type ReceiptStore,
signReceipt,
} from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { hashReceipt } from "../receipt/hash.js";
import { generateKeyPair, signReceipt } from "../receipt/signing.js";
import type { ReceiptStore } from "../store/store.js";
import { openStore } from "../store/store.js";
import { makeUnsigned } from "../test-utils/receipts.js";
import { runVerify } from "./verify.js";

Expand Down
6 changes: 4 additions & 2 deletions src/cli/verify.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { ReceiptStore } from "../store/store.js";
import { verifyStoredChain } from "../store/verify.js";
import {
type ReceiptStore,
verifyStoredChain,
} from "@attest-protocol/attest-ts";

/**
* Options for the `attest verify` command.
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "0.1.0";
export { RECEIPT_VERSION, VERSION } from "@attest-protocol/attest-ts";
11 changes: 7 additions & 4 deletions src/proxy/emitter.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { dirname, join } from "node:path";
import { PassThrough } from "node:stream";
import { fileURLToPath } from "node:url";
import {
generateKeyPair,
hashReceipt,
openStore,
type ReceiptStore,
verifyReceipt,
} from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { hashReceipt } from "../receipt/hash.js";
import { generateKeyPair, verifyReceipt } from "../receipt/signing.js";
import type { ReceiptStore } from "../store/store.js";
import { openStore } from "../store/store.js";
import { readLine } from "../test-utils/streams.js";
import type { EmitterConfig } from "./emitter.js";
import { ReceiptEmitter } from "./emitter.js";
Expand Down
18 changes: 11 additions & 7 deletions src/proxy/emitter.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { randomUUID } from "node:crypto";
import { createReceipt } from "../receipt/create.js";
import { hashReceipt, sha256 } from "../receipt/hash.js";
import { signReceipt } from "../receipt/signing.js";
import type { Issuer, Principal } from "../receipt/types.js";
import type { ReceiptStore } from "../store/store.js";
import { classifyToolCall } from "../taxonomy/classify.js";
import type { TaxonomyMapping } from "../taxonomy/types.js";
import {
classifyToolCall,
createReceipt,
hashReceipt,
type Issuer,
type Principal,
type ReceiptStore,
sha256,
signReceipt,
type TaxonomyMapping,
} from "@attest-protocol/attest-ts";
import type { ToolCallComplete, ToolCallInterceptor } from "./interceptor.js";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { openStore } from "@attest-protocol/attest-ts";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { openStore } from "../store/store.js";

const __dirname = dirname(fileURLToPath(import.meta.url));
const PROXY_CLI = join(__dirname, "..", "..", "dist", "proxy", "main.js");
Expand Down
8 changes: 5 additions & 3 deletions src/proxy/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import { readFileSync } from "node:fs";
import { parseArgs } from "node:util";
import { generateKeyPair } from "../receipt/signing.js";
import { openStore } from "../store/store.js";
import { loadTaxonomyConfig } from "../taxonomy/config.js";
import {
generateKeyPair,
loadTaxonomyConfig,
openStore,
} from "@attest-protocol/attest-ts";
import { ReceiptEmitter } from "./emitter.js";
import { ToolCallInterceptor } from "./interceptor.js";
import { McpProxy } from "./proxy.js";
Expand Down
161 changes: 0 additions & 161 deletions src/receipt/chain.test.ts

This file was deleted.

Loading
Loading