antpath 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.
@@ -1,30 +1,41 @@
1
- ---
2
- title: antpath research sources
3
- status: reference
4
- scope: architecture research
5
- ---
6
-
7
- # Research sources
8
-
9
- Primary sources used to frame the MVP architecture.
10
-
11
- | Topic | Source | Notes |
12
- | --- | --- | --- |
13
- | Claude Managed Agents overview | https://platform.claude.com/docs/en/managed-agents/overview.md | Agent, Environment, Session, Event primitives; provider-managed autonomous sessions. |
14
- | Claude Managed Agents environments | https://platform.claude.com/docs/en/managed-agents/environments.md | Environments define container/package/network configuration; sessions get isolated instances. |
15
- | Claude Managed Agents events | https://platform.claude.com/docs/en/managed-agents/events-and-streaming.md | Event stream, idle/running/terminated states, user messages, interruptions. |
16
- | Claude Managed Agents files | https://platform.claude.com/docs/en/managed-agents/files.md | Session-scoped files can be listed by `scope_id` and downloaded by file ID. |
17
- | Claude Managed Agents vaults | https://platform.claude.com/docs/en/managed-agents/vaults.md | Provider-side MCP credentials via vault IDs; static bearer and OAuth credentials. |
18
- | Claude Managed Agents MCP connector | https://platform.claude.com/docs/en/managed-agents/mcp-connector.md | Agent declares MCP URLs; session supplies vault IDs. |
19
- | Claude Managed Agents permission policies | https://platform.claude.com/docs/en/managed-agents/permission-policies.md | `always_allow` vs `always_ask`; MVP must avoid approval-required tools. |
20
- | Anthropic API and data retention | https://platform.claude.com/docs/en/manage-claude/api-and-data-retention.md | Managed Agents are stateful and not automatically deleted. |
21
- | OpenAI data controls | https://developers.openai.com/api/docs/guides/your-data | Responses retention, `store`, files, container lifecycle, ZDR behavior. |
22
- | OpenAI remote MCP tools | https://developers.openai.com/api/docs/guides/tools-remote-mcp | Remote MCP `authorization` is sent per request and not stored by OpenAI. |
23
- | MCP transports | https://modelcontextprotocol.io/specification/2025-11-25/basic/transports.md | Stdio and Streamable HTTP requirements, session IDs, Origin validation. |
24
- | MCP authorization | https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization.md | OAuth 2.1/OIDC discovery, protected resource metadata, scopes/resource binding. |
25
- | MCP tools | https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md | Tool schemas, structured content, task support, HITL considerations. |
26
- | MCP security best practices | https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices.md | Confused deputy and token passthrough risks. |
27
- | MCP client best practices | https://modelcontextprotocol.io/docs/develop/clients/client-best-practices.md | Progressive discovery, dynamic server management, prompt-cache considerations. |
28
- | OpenAI Agents SDK JS | https://openai.github.io/openai-agents-js/ | Future comparison point for OpenAI support. |
29
- | Vercel AI SDK agents | https://ai-sdk.dev/docs/agents/building-agents | Future comparison point for TypeScript agent abstractions. |
30
- | Temporal TypeScript workflows | https://docs.temporal.io/develop/typescript/workflows/basics | Future reference if antpath adds durable cloud orchestration. |
1
+ ---
2
+ title: antpath research sources
3
+ status: reference
4
+ scope: architecture research
5
+ ---
6
+
7
+ # Research sources
8
+
9
+ Primary sources used to frame the platform MVP architecture.
10
+
11
+ | Topic | Source | Notes |
12
+ | --- | --- | --- |
13
+ | Claude Managed Agents overview | https://platform.claude.com/docs/en/managed-agents/overview.md | Agent, Environment, Session, Event primitives; provider-managed autonomous sessions. |
14
+ | Claude Managed Agents environments | https://platform.claude.com/docs/en/managed-agents/environments.md | Environments define container/package/network configuration; sessions get isolated instances. |
15
+ | Claude Managed Agents events | https://platform.claude.com/docs/en/managed-agents/events-and-streaming.md | Event stream, idle/running/terminated states, user messages, interruptions. |
16
+ | Claude Managed Agents files | https://platform.claude.com/docs/en/managed-agents/files.md | Session-scoped files can be listed by `scope_id` and downloaded by file ID. |
17
+ | Claude Managed Agents vaults | https://platform.claude.com/docs/en/managed-agents/vaults.md | Provider-side MCP credentials via vault IDs; static bearer and OAuth credentials. |
18
+ | Claude Managed Agents MCP connector | https://platform.claude.com/docs/en/managed-agents/mcp-connector.md | Agent declares MCP URLs; session supplies vault IDs. |
19
+ | Claude Managed Agents permission policies | https://platform.claude.com/docs/en/managed-agents/permission-policies.md | `always_allow` vs `always_ask`; MVP must avoid approval-required tools. |
20
+ | Anthropic API and data retention | https://platform.claude.com/docs/en/manage-claude/api-and-data-retention.md | Managed Agents are stateful and not automatically deleted. |
21
+ | Anthropic webhooks | https://docs.anthropic.com/en/api/webhooks | Webhooks are backlog; if used, treat as wakeup/reconciliation signals, not primary state. |
22
+ | Supabase Postgres RLS | https://supabase.com/docs/guides/database/postgres/row-level-security | RLS is not the MVP browser boundary because Auth.js is primary auth and browser data access goes through BFF. |
23
+ | Supabase Realtime | https://supabase.com/docs/guides/realtime | Realtime is backlog until Auth.js-to-Supabase authorization is explicitly solved. |
24
+ | Supabase Storage access control | https://supabase.com/docs/guides/storage/security/access-control | Private buckets and signed/server-mediated access for captured outputs. |
25
+ | Supabase Vault | https://supabase.com/docs/guides/database/vault | Encrypted storage for workspace BYO provider keys. |
26
+ | Auth.js | https://authjs.dev/ | Dashboard user auth; BFF resolves identity and workspace membership. |
27
+ | Vercel | https://vercel.com/docs | Dashboard deployment baseline. |
28
+ | Railway | https://docs.railway.com/ | Persistent worker deployment baseline. |
29
+ | PostgreSQL `SELECT` locking | https://www.postgresql.org/docs/current/sql-select.html | `FOR UPDATE SKIP LOCKED` for concurrent worker claims. |
30
+ | PostgreSQL `LISTEN`/`NOTIFY` | https://www.postgresql.org/docs/current/sql-notify.html | `NOTIFY` is wakeup only; polling remains source of truth. |
31
+ | npm workspaces | https://docs.npmjs.com/cli/using-npm/workspaces | Repository migration to a TypeScript workspace. |
32
+ | OpenAI data controls | https://developers.openai.com/api/docs/guides/your-data | Responses retention, `store`, files, container lifecycle, ZDR behavior. |
33
+ | OpenAI remote MCP tools | https://developers.openai.com/api/docs/guides/tools-remote-mcp | Remote MCP `authorization` is sent per request and not stored by OpenAI. |
34
+ | MCP transports | https://modelcontextprotocol.io/specification/2025-11-25/basic/transports.md | Stdio and Streamable HTTP requirements, session IDs, Origin validation. |
35
+ | MCP authorization | https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization.md | OAuth 2.1/OIDC discovery, protected resource metadata, scopes/resource binding. |
36
+ | MCP tools | https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md | Tool schemas, structured content, task support, HITL considerations. |
37
+ | MCP security best practices | https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices.md | Confused deputy and token passthrough risks. |
38
+ | MCP client best practices | https://modelcontextprotocol.io/docs/develop/clients/client-best-practices.md | Progressive discovery, dynamic server management, prompt-cache considerations. |
39
+ | OpenAI Agents SDK JS | https://openai.github.io/openai-agents-js/ | Future comparison point for OpenAI support. |
40
+ | Vercel AI SDK agents | https://ai-sdk.dev/docs/agents/building-agents | Future comparison point for TypeScript agent abstractions. |
41
+ | Temporal TypeScript workflows | https://docs.temporal.io/develop/typescript/workflows/basics | Future reference if antpath adds durable cloud orchestration. |
@@ -1,108 +1,29 @@
1
- ---
2
- title: antpath testing strategy
3
- status: accepted
4
- scope: sdk-only MVP
5
- ---
6
-
7
- # antpath testing strategy
8
-
9
- antpath uses **test-first development**. For every behavior change, write or update the relevant failing test first, then implement the smallest maintainable change that passes it.
10
-
11
- ## Test layers
12
-
13
- | Layer | Name | Purpose | Default CI |
14
- | --- | --- | --- | --- |
15
- | 1 | Unit | Pure logic and small state transitions. | Yes |
16
- | 2 | Component integration | Multiple SDK components with fake providers and local fixtures. | Yes |
17
- | 3 | Recorded API integration | Provider adapter behavior using sanitized real API recordings. | Yes, if fixtures are present |
18
- | 4 | Live e2e | Full lifecycle against real Claude Managed Agents. | No |
19
-
20
- ## Layer 1: unit tests
21
-
22
- Unit tests must have no network, provider, or real filesystem dependency unless the unit being tested is explicitly a path utility.
23
-
24
- Targets:
25
-
26
- - Template compiler;
27
- - variable resolution and escaping;
28
- - credential parser;
29
- - redaction utilities;
30
- - state-machine reducer;
31
- - cleanup plan builder;
32
- - output path sanitizer.
33
-
34
- ## Layer 2: component integration tests
35
-
36
- Component integration tests verify collaboration between modules with fake providers.
37
-
38
- Targets:
39
-
40
- - Client plus Template compiler plus credential validator;
41
- - RunController plus fake provider stream;
42
- - queued message scheduler;
43
- - output downloader plus fake file service;
44
- - cleanup manager plus fake provider resources;
45
- - logger/event hooks with redaction.
46
-
47
- ## Layer 3: recorded API integration tests
48
-
49
- Recorded API integration tests use persisted responses from real provider calls. These tests make provider adapter behavior reproducible without live network calls.
50
-
51
- Rules:
52
-
53
- - Recordings are created only by explicit scripts.
54
- - Raw recordings are ignored and must not be committed.
55
- - Sanitized recordings may be committed.
56
- - Sanitization must remove request headers, API keys, bearer tokens, OAuth tokens, raw credentials, and any secret-shaped values.
57
- - Tests must fail if a fixture contains known secret patterns.
58
- - Fixtures should include provider API version and beta headers in non-secret metadata.
59
-
60
- Expected scripts:
61
-
62
- ```text
63
- npm run fixtures:record:anthropic
64
- npm run fixtures:sanitize
65
- npm run test:integration:api
66
- ```
67
-
68
- ## Layer 4: live e2e tests
69
-
70
- Live e2e tests verify the complete lifecycle against Claude Managed Agents.
71
-
72
- Rules:
73
-
74
- - Never run by default.
75
- - Require `.env.local` with `ANTHROPIC_API_KEY`.
76
- - Use low-cost prompts and short timeouts.
77
- - Always attempt cleanup in `finally`.
78
- - Never print credentials or auth headers.
79
- - Keep assertions focused on lifecycle invariants, not model prose.
80
-
81
- Expected command:
82
-
83
- ```text
84
- npm run test:e2e:live
85
- ```
86
-
87
- ## Secret handling
88
-
89
- `.env.local` may be used for local live testing and must stay ignored. Do not inspect, print, snapshot, or commit it.
90
-
91
- Secrets must never appear in:
92
-
93
- - committed fixtures;
94
- - logs;
95
- - snapshots;
96
- - error messages;
97
- - Template snapshots;
98
- - output manifests;
99
- - reference documents.
100
-
101
- ## Test-first workflow
102
-
103
- 1. Choose the narrowest test layer that can prove the behavior.
104
- 2. Add a failing test.
105
- 3. Implement the behavior.
106
- 4. Run the target test command.
107
- 5. Run broader tests only when the behavior crosses module/provider boundaries.
108
- 6. Update recorded fixtures only through recording and sanitization scripts.
1
+ ---
2
+ title: antpath testing strategy
3
+ status: accepted
4
+ scope: SDK package
5
+ ---
6
+
7
+ # antpath SDK testing strategy
8
+
9
+ The SDK follows the repository taxonomy: unit, integration, and e2e only.
10
+
11
+ ## Unit
12
+
13
+ `pnpm test` and `pnpm test:unit` run deterministic unit tests. Unit tests may use fakes, generated data, and sanitized recorded snapshots, including expensive provider responses captured once and replayed later.
14
+
15
+ ```text
16
+ pnpm test
17
+ pnpm test:unit
18
+ pnpm test:property
19
+ pnpm test:unit:recorded
20
+ pnpm test:load:replay
21
+ ```
22
+
23
+ ## Integration
24
+
25
+ Integration tests run live external systems with no fakes and no skip flags. SDK package integration is currently covered through the workspace Supabase integration and worker provider integration commands.
26
+
27
+ ## E2E
28
+
29
+ `pnpm test:e2e:live` runs the live top-to-bottom Claude Managed Agents flow. The command itself is the opt-in and requires `ANTHROPIC_API_KEY`; missing credentials fail the command rather than skipping.