|
11 | 11 |
|
12 | 12 | - Top-level: `README.md` (architecture + quick start) |
13 | 13 | - Language entry points: `nodejs/src/client.ts`, `python/README.md`, `go/README.md`, `dotnet/README.md` |
14 | | -- Java: `java/README.md`, `java/pom.xml` |
| 14 | +- Java: `java/README.md`, `java/pom.xml`, `java/sdk/pom.xml`, `java/copilot-native/pom.xml` |
15 | 15 | - Test harness & E2E: `test/harness/*`, Python harness wrapper `python/e2e/testharness/proxy.py` |
16 | 16 | - Schemas & type generation: `nodejs/scripts/generate-session-types.ts` |
17 | 17 | - Session snapshots used by E2E: `test/snapshots/` (used by the replay proxy) |
|
39 | 39 | - E2E runs against a local **replaying CAPI proxy** (see `test/harness/server.ts`). Most language E2E harnesses spawn that server automatically (see `python/e2e/testharness/proxy.py`). |
40 | 40 | - Tests rely on YAML snapshot exchanges under `test/snapshots/` — to add test scenarios, add or edit the appropriate YAML files and update tests. |
41 | 41 | - The harness prints `Listening: http://...` — tests parse this URL to configure CLI or proxy. |
42 | | -- Java E2E tests use `E2ETestContext` which manages a `CapiProxy` (Node.js replaying proxy). The harness is cloned during Maven's `generate-test-resources` phase to `java/target/copilot-sdk/`. |
| 42 | +- Java E2E tests use `E2ETestContext` which manages a `CapiProxy` (Node.js replaying proxy). The harness is cloned during Maven's `generate-test-resources` phase to `java/sdk/target/copilot-sdk/`. |
43 | 43 | - Java test method names are converted to lowercase snake_case for snapshot filenames (avoids case collisions on macOS/Windows). |
44 | 44 |
|
45 | 45 | ## Project-specific conventions & patterns ✅ |
|
61 | 61 |
|
62 | 62 | ## Where to add new code or tests 🧭 |
63 | 63 |
|
64 | | -- SDK code: `nodejs/src`, `python/copilot`, `go`, `dotnet/src`, `rust/src`, `java/src/main/java` |
65 | | -- Unit tests: `nodejs/test`, `python/*`, `go/*`, `dotnet/test`, `rust/tests`, `java/src/test/java` |
66 | | -- E2E tests: `*/e2e/` folders that use the shared replay proxy and `test/snapshots/`, `java/src/test/java/**/e2e/` |
67 | | -- Generated types: update schema in `@github/copilot` then run `cd nodejs && npm run generate:session-types` and commit generated files in `src/generated` or language generated location. Java generated types: `java/src/generated/java` |
| 64 | +- SDK code: `nodejs/src`, `python/copilot`, `go`, `dotnet/src`, `rust/src`, `java/sdk/src/main/java` |
| 65 | +- Unit tests: `nodejs/test`, `python/*`, `go/*`, `dotnet/test`, `rust/tests`, `java/sdk/src/test/java` |
| 66 | +- E2E tests: `*/e2e/` folders that use the shared replay proxy and `test/snapshots/`, `java/sdk/src/test/java/**/e2e/` |
| 67 | +- Generated types: update schema in `@github/copilot` then run `cd nodejs && npm run generate:session-types` and commit generated files in `src/generated` or language generated location. Java generated types: `java/sdk/src/generated/java` |
68 | 68 |
|
69 | 69 | ## Boundaries — files you must NOT hand-edit ⛔ |
70 | 70 |
|
71 | | -- `java/src/generated/java/` — auto-generated by `scripts/codegen/java.ts`; regenerate with `cd java && mvn generate-sources -Pcodegen`. |
| 71 | +- `java/sdk/src/generated/java/` — auto-generated by `scripts/codegen/java.ts`; regenerate with `cd java && mvn generate-sources -Pcodegen`. |
72 | 72 | - `nodejs/src/generated/` — auto-generated by `npm run generate:session-types`. |
73 | 73 | - `test/snapshots/` — authoritative test fixtures; add/edit YAML here to change E2E behavior, but don't delete without understanding downstream impact. |
0 commit comments