ai-capability-framework 1.0.0-rc.3 → 1.0.0
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/CHANGELOG.md +97 -103
- package/CODE_OF_CONDUCT.md +11 -13
- package/CONTRIBUTING.md +40 -43
- package/GOVERNANCE.md +34 -35
- package/README.md +99 -63
- package/ROADMAP.md +12 -12
- package/SECURITY.md +15 -15
- package/dist/audit/ledger.d.ts.map +1 -1
- package/dist/audit/ledger.js +2 -1
- package/dist/audit/records.d.ts.map +1 -1
- package/dist/audit/records.js +2 -1
- package/dist/audit/types.d.ts +4 -1
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/aws/dynamodb-stores.d.ts +2 -7
- package/dist/aws/dynamodb-stores.d.ts.map +1 -1
- package/dist/aws/dynamodb-stores.js +56 -5
- package/dist/aws/testing.d.ts.map +1 -1
- package/dist/aws/testing.js +9 -0
- package/dist/cli.d.ts +6 -6
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +77 -7
- package/dist/evals-live/index.d.ts +2 -2
- package/dist/evals-live/index.d.ts.map +1 -1
- package/dist/evals-live/index.js +1 -1
- package/dist/evals-live/live-eval-runner.d.ts +49 -1
- package/dist/evals-live/live-eval-runner.d.ts.map +1 -1
- package/dist/evals-live/live-eval-runner.js +246 -4
- package/dist/evals-live/types.d.ts +62 -9
- package/dist/evals-live/types.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/runtime/actions.d.ts +2 -0
- package/dist/runtime/actions.d.ts.map +1 -1
- package/dist/runtime/actions.js +200 -55
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/stores.d.ts +2 -7
- package/dist/runtime/stores.d.ts.map +1 -1
- package/dist/runtime/stores.js +12 -0
- package/dist/runtime/types.d.ts +25 -6
- package/dist/runtime/types.d.ts.map +1 -1
- package/docs/action-lifecycle.md +38 -32
- package/docs/adapter-roadmap.md +51 -49
- package/docs/adapters.md +14 -15
- package/docs/ai-sdk-runtime.md +36 -39
- package/docs/anthropic-runtime.md +29 -32
- package/docs/api/public-api-policy.md +59 -0
- package/docs/api.md +354 -371
- package/docs/architecture/current-state.md +28 -31
- package/docs/audit/index.md +29 -29
- package/docs/aws/cloudwatch-telemetry.md +5 -7
- package/docs/aws/dynamodb-single-table.md +8 -9
- package/docs/aws/kms-redaction.md +5 -6
- package/docs/aws/overview.md +5 -5
- package/docs/aws/production-reference.md +13 -14
- package/docs/aws/step-functions-approval.md +7 -9
- package/docs/aws-runtime.md +24 -25
- package/docs/capability-manifests.md +17 -21
- package/docs/control-plane/overview.md +2 -2
- package/docs/control-plane.md +24 -27
- package/docs/controls/index.md +19 -22
- package/docs/core/capability-manifests.md +4 -5
- package/docs/core/entity-manifests.md +5 -5
- package/docs/eval-runner.md +29 -31
- package/docs/evalops.md +13 -14
- package/docs/evals/golden-tests.md +4 -5
- package/docs/evals/overview.md +3 -3
- package/docs/evals/replay-and-trace-to-golden.md +19 -20
- package/docs/evals.md +19 -20
- package/docs/evidence.md +22 -23
- package/docs/gemini-runtime.md +31 -33
- package/docs/getting-started/anthropic-quickstart.md +61 -0
- package/docs/getting-started/concepts.md +9 -10
- package/docs/getting-started/gemini-quickstart.md +62 -0
- package/docs/getting-started/installation.md +3 -3
- package/docs/getting-started/openai-quickstart.md +61 -0
- package/docs/getting-started/provider-neutral-quickstart.md +106 -0
- package/docs/getting-started/quickstart.md +2 -2
- package/docs/getting-started.md +23 -20
- package/docs/glossary.md +31 -48
- package/docs/governance/gate.md +28 -30
- package/docs/governance/impact-and-compatibility.md +2 -3
- package/docs/governance/index.md +53 -54
- package/docs/governance/lifecycle.md +4 -5
- package/docs/governance/overview.md +2 -3
- package/docs/governance/risk-compiler.md +4 -5
- package/docs/host-responsibilities.md +6 -8
- package/docs/implementation-notes/baseline-gaps.md +15 -18
- package/docs/index.md +21 -6
- package/docs/interoperability.md +9 -9
- package/docs/langchain-runtime.md +27 -31
- package/docs/live-evals.md +68 -32
- package/docs/mcp-server-runtime.md +36 -40
- package/docs/memory.md +35 -36
- package/docs/migration-0.1-to-1.0.md +14 -9
- package/docs/observability/overview.md +2 -3
- package/docs/observability-runtime.md +35 -39
- package/docs/openai-responses.md +36 -37
- package/docs/openai-runtime.md +41 -46
- package/docs/openai-walkthrough.md +24 -28
- package/docs/policy-broker.md +9 -10
- package/docs/provenance.md +30 -29
- package/docs/providers/anthropic.md +5 -5
- package/docs/providers/choose-a-runtime.md +37 -0
- package/docs/providers/conformance.md +14 -15
- package/docs/providers/gemini.md +5 -5
- package/docs/providers/mcp.md +2 -3
- package/docs/providers/openai.md +2 -2
- package/docs/providers/semantic-kernel.md +2 -2
- package/docs/providers.md +43 -38
- package/docs/public/license-exceptions.md +187 -0
- package/docs/public/npm-release-preflight.md +112 -0
- package/docs/public-framework/compatibility-policy.md +12 -13
- package/docs/public-framework/deprecation-policy.md +8 -8
- package/docs/public-framework/final-certification-matrix.md +104 -0
- package/docs/public-framework/license-decision.md +20 -0
- package/docs/public-framework/release-process.md +46 -16
- package/docs/public-framework/security-disclosure.md +4 -5
- package/docs/public-framework/v1-certification.md +102 -15
- package/docs/release.md +200 -122
- package/docs/runtime/action-lifecycle.md +3 -3
- package/docs/runtime/policy-broker.md +4 -4
- package/docs/runtime/runtime-overview.md +4 -5
- package/docs/runtime/tool-result-envelope.md +7 -7
- package/docs/runtime.md +90 -93
- package/docs/security/overview.md +4 -4
- package/docs/security/security-packs.md +24 -26
- package/docs/security/trust-taint-redaction.md +42 -47
- package/docs/semantic-kernel-runtime.md +35 -37
- package/docs/spec.md +95 -101
- package/docs/start-here.md +18 -20
- package/examples/01-basic-read-capability/README.md +3 -4
- package/examples/02-prepare-approve-commit/README.md +6 -6
- package/examples/03-multi-provider-tools/README.md +2 -2
- package/examples/04-mcp-server/README.md +4 -5
- package/examples/05-langchain-langgraph-bridge/README.md +4 -5
- package/examples/06-vercel-ai-sdk-bridge/README.md +5 -7
- package/examples/07-policy-broker-custom-auth/README.md +4 -4
- package/examples/08-aws-step-functions-approval/README.md +4 -5
- package/examples/09-security-packs-promptfoo/README.md +4 -4
- package/examples/10-trace-to-golden/README.md +2 -2
- package/examples/11-control-plane/README.md +4 -5
- package/examples/aws/README.md +5 -8
- package/examples/control-plane/README.md +8 -9
- package/examples/control-plane/fixtures/control-plane.seed.json +8 -32
- package/examples/control-plane/public/app.js +57 -18
- package/examples/control-plane/public/index.html +15 -6
- package/examples/control-plane/server.mjs +15 -3
- package/examples/eval-results/public.results.passing.json +6 -21
- package/examples/providers/ai-sdk-next/README.md +11 -8
- package/examples/providers/anthropic-claude/README.md +5 -6
- package/examples/providers/gemini/README.md +6 -6
- package/examples/providers/langchain-agent/README.md +3 -4
- package/examples/providers/langgraph-tool-node/README.md +7 -7
- package/examples/providers/mcp/README.md +8 -8
- package/examples/providers/provider-conformance/README.md +3 -3
- package/examples/providers/semantic-kernel-mcp/README.md +6 -6
- package/examples/providers/semantic-kernel-openapi/README.md +6 -7
- package/examples/runtime-support-billing/README.md +8 -9
- package/examples/runtime-support-billing/support-billing-runtime.mjs +8 -4
- package/examples/scheduling/capabilities/scheduling.availability.get.yaml +2 -2
- package/examples/scheduling/capabilities/scheduling.invite.prepare.yaml +2 -2
- package/examples/scheduling/capabilities/scheduling.invite.send.yaml +2 -2
- package/examples/scheduling/entities/AvailabilitySlot.yaml +2 -2
- package/examples/scheduling/entities/MeetingInvite.yaml +2 -2
- package/examples/scheduling/evals/scheduling.invite.prepare.valid.yaml +3 -1
- package/examples/semantic-kernel-mcp/README.md +11 -12
- package/examples/semantic-kernel-openapi/README.md +8 -8
- package/examples/support/capabilities/support.refund.commit_case.yaml +3 -3
- package/examples/support/capabilities/support.refund.prepare_case.yaml +2 -2
- package/examples/support/capabilities/support.ticket.get.yaml +2 -2
- package/examples/support/entities/Ticket.yaml +0 -1
- package/examples/support/eval-results/support.results.passing.json +3 -12
- package/examples/support/evals/support.refund.prepare_case.approval_required.yaml +3 -1
- package/examples/support/evals/support.refund.prepare_case.valid.yaml +3 -2
- package/examples/support/memory/support.agent.preferences.json +2 -6
- package/examples/support/openai/context.support_agent.json +1 -4
- package/examples/support/provenance/support.refund.summary.provenance.json +2 -6
- package/examples/support/replay/support.refund.approval_required.trace.json +4 -14
- package/package.json +22 -5
- package/schemas/audit/action-record.schema.json +4 -1
- package/schemas/aws/approval-task.schema.json +8 -1
- package/schemas/conformance/conformance-case.schema.json +18 -2
- package/schemas/conformance/conformance-report.schema.json +17 -2
- package/schemas/conformance/provider-target-matrix.schema.json +35 -4
- package/schemas/controls/control-decision.schema.json +7 -1
- package/schemas/eval-case.schema.json +8 -1
- package/schemas/eval-result.schema.json +8 -1
- package/schemas/evidence/evidence-pack.schema.json +34 -5
- package/schemas/governance/compatibility-diff.schema.json +8 -1
- package/schemas/governance/lifecycle-transition.schema.json +10 -1
- package/schemas/governance/risk-compilation-result.schema.json +9 -1
- package/schemas/provenance/generated-content-provenance.schema.json +3 -1
- package/schemas/replay/replay-result.schema.json +16 -2
- package/schemas/replay/replay-trace.schema.json +11 -2
- package/schemas/security/context-segment.schema.json +21 -12
- package/schemas/security/redaction-policy.schema.json +4 -1
- package/schemas/security-packs/coverage-report.schema.json +17 -2
- package/schemas/security-packs/security-case-suite.schema.json +11 -1
- package/schemas/tool-result-envelope.schema.json +9 -1
- package/security-packs/approval_bypass.yaml +12 -2
- package/security-packs/capability_spoofing.yaml +17 -3
- package/security-packs/cost_amplification.yaml +21 -4
- package/security-packs/cross_tenant_access.yaml +16 -3
- package/security-packs/insecure_output_rendering.yaml +15 -4
- package/security-packs/mcp_tool_abuse.yaml +17 -3
- package/security-packs/memory_scope_violation.yaml +19 -4
- package/security-packs/prompt_injection_direct.yaml +19 -4
- package/security-packs/prompt_injection_indirect.yaml +18 -3
- package/security-packs/provider_payload_exposure.yaml +26 -4
- package/security-packs/retrieval_poisoning.yaml +5 -2
- package/security-packs/schema_confusion.yaml +17 -3
- package/security-packs/sensitive_data_disclosure.yaml +22 -5
- package/security-packs/tool_exfiltration.yaml +20 -4
- package/security-packs/tool_result_poisoning.yaml +19 -4
- package/security-packs/unsafe_commit_attempt.yaml +6 -3
|
@@ -1,49 +1,46 @@
|
|
|
1
1
|
# Current Architecture State
|
|
2
2
|
|
|
3
|
-
This document records the public baseline used for the F0 reconciliation gate.
|
|
4
|
-
|
|
5
|
-
work begins.
|
|
3
|
+
This document records the public baseline used for the F0 reconciliation gate. It
|
|
4
|
+
describes the current repository shape before later governance-completion work begins.
|
|
6
5
|
|
|
7
6
|
## Core Package Boundary
|
|
8
7
|
|
|
9
8
|
The package root is the provider-neutral Core API. It loads and validates public
|
|
10
|
-
manifests, builds registries, selects capability slices, exports descriptor-only
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
manifests, builds registries, selects capability slices, exports descriptor-only adapter
|
|
10
|
+
tools, parses provider tool calls back to AICF capability IDs, scores deterministic eval
|
|
11
|
+
fixtures, and formats model-safe tool results.
|
|
13
12
|
|
|
14
|
-
The package root must not call model providers, execute host side effects,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
The package root must not call model providers, execute host side effects, persist
|
|
14
|
+
approvals, or require optional provider SDKs. Host applications remain responsible for
|
|
15
|
+
authentication, authorization, provider clients, durable storage, approval UI, audit
|
|
16
|
+
retention, and final side-effect execution.
|
|
18
17
|
|
|
19
18
|
## Runtime And Provider Subpaths
|
|
20
19
|
|
|
21
|
-
The runtime subpath provides deterministic host-controlled runtime utilities:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
to model-facing tools.
|
|
20
|
+
The runtime subpath provides deterministic host-controlled runtime utilities: context
|
|
21
|
+
building, policy brokering, capability routing, redaction, handler registration,
|
|
22
|
+
read/prepare execution, action lifecycle stores, audit events, and runtime envelopes. It
|
|
23
|
+
does not call model providers or expose commit execution to model-facing tools.
|
|
26
24
|
|
|
27
|
-
The provider-specific APIs live behind optional subpaths. OpenAI, Anthropic,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
The provider-specific APIs live behind optional subpaths. OpenAI, Anthropic, Gemini, AI
|
|
26
|
+
SDK, LangChain, MCP, Semantic Kernel, AWS, observability, live eval, Promptfoo,
|
|
27
|
+
Langfuse, and MCP server integrations are imported only by their dedicated subpaths.
|
|
28
|
+
Optional SDKs are peer dependencies and are loaded only when a host uses the relevant
|
|
29
|
+
integration.
|
|
32
30
|
|
|
33
31
|
## Validation And Release Gates
|
|
34
32
|
|
|
35
|
-
The repository baseline includes schema validation, generated type freshness,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
consumer install smoke tests.
|
|
33
|
+
The repository baseline includes schema validation, generated type freshness, TypeScript
|
|
34
|
+
build/typechecking, deterministic tests, manifest validation, package contents checks,
|
|
35
|
+
public hygiene checks, workspace hygiene checks, and clean consumer install smoke tests.
|
|
39
36
|
|
|
40
|
-
The public hygiene checks keep private drafts, raw prompts, traces, provider
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
The public hygiene checks keep private drafts, raw prompts, traces, provider payloads,
|
|
38
|
+
generated local artifacts, credentials, archives, and local-only material out of tracked
|
|
39
|
+
and package-published paths.
|
|
43
40
|
|
|
44
41
|
## Public Examples
|
|
45
42
|
|
|
46
|
-
Public examples are synthetic. They demonstrate support and scheduling
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
Public examples are synthetic. They demonstrate support and scheduling capability
|
|
44
|
+
manifests, eval fixtures, decision fixtures, provider exports, and a mock runtime flow
|
|
45
|
+
without using real tenants, customers, credentials, provider payloads, raw prompts, or
|
|
46
|
+
production endpoints.
|
package/docs/audit/index.md
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
# Audit Ledger
|
|
2
2
|
|
|
3
|
-
The audit subpath defines canonical ledger records for AICF runtime evidence.
|
|
4
|
-
|
|
3
|
+
The audit subpath defines canonical ledger records for AICF runtime evidence. It is
|
|
4
|
+
optional and additive:
|
|
5
5
|
|
|
6
6
|
```ts
|
|
7
7
|
import { DefaultAuditLedger } from "ai-capability-framework/audit";
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
The ledger records policy decisions, action state, approvals, commit outcomes,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
The ledger records policy decisions, action state, approvals, commit outcomes, and
|
|
11
|
+
idempotency reservations in a public-safe JSON shape. It does not replace host audit
|
|
12
|
+
systems, production storage, authorization, approval UI, payment systems, or
|
|
13
|
+
business-side effects.
|
|
14
14
|
|
|
15
15
|
## What Gets Recorded
|
|
16
16
|
|
|
17
17
|
The canonical records are:
|
|
18
18
|
|
|
19
|
-
- `PolicyDecisionRecord`: capability, operation, decision, reasons, autonomy,
|
|
20
|
-
|
|
19
|
+
- `PolicyDecisionRecord`: capability, operation, decision, reasons, autonomy, risk,
|
|
20
|
+
input hash, trace reference, and redacted subject/account/tenant refs.
|
|
21
21
|
- `ActionRecord`: lifecycle state from `proposed` through `prepared`,
|
|
22
|
-
`approval_required`, `approved`, `committing`, `committed`, `failed`,
|
|
23
|
-
`
|
|
22
|
+
`approval_required`, `approved`, `committing`, `committed`, `failed`, `expired`, or
|
|
23
|
+
`cancelled`. Verification is tracked separately with optional `verificationStatus` so
|
|
24
|
+
committed side effects are not reclassified after a verification check fails.
|
|
24
25
|
- `ApprovalRecord`: pending, approved, rejected, expired, or cancelled approval
|
|
25
26
|
decisions with redacted requester and decider refs.
|
|
26
|
-
- `IdempotencyRecord`: scoped idempotency reservations and completions with a
|
|
27
|
-
|
|
27
|
+
- `IdempotencyRecord`: scoped idempotency reservations and completions with a safe
|
|
28
|
+
result reference.
|
|
28
29
|
|
|
29
|
-
Records store hashes and summaries, not raw input, raw previews, raw result
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
Records store hashes and summaries, not raw input, raw previews, raw result payloads,
|
|
31
|
+
raw prompts, provider payloads, stack traces, secrets, user IDs, account IDs, or tenant
|
|
32
|
+
IDs.
|
|
32
33
|
|
|
33
34
|
## Runtime Integration
|
|
34
35
|
|
|
@@ -56,21 +57,21 @@ const executor = new AicfToolExecutor({
|
|
|
56
57
|
});
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
Without `ledger`, runtime behavior is unchanged. With `ledger`, AICF records
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
Without `ledger`, runtime behavior is unchanged. With `ledger`, AICF records evidence
|
|
61
|
+
when tool calls are proposed, policy decisions are made, prepare succeeds, approval is
|
|
62
|
+
required, approvals are recorded, commits start, commits succeed, commits fail, and
|
|
63
|
+
idempotency keys are reserved or completed.
|
|
63
64
|
|
|
64
|
-
The in-memory ledger stores are reference utilities for tests and local
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
The in-memory ledger stores are reference utilities for tests and local examples.
|
|
66
|
+
Production applications should implement the store interfaces using their own durable,
|
|
67
|
+
access-controlled audit system.
|
|
67
68
|
|
|
68
69
|
## Redaction Defaults
|
|
69
70
|
|
|
70
|
-
`hashAuditValue()` uses deterministic SHA-256 hashes over stable JSON. The
|
|
71
|
-
|
|
72
|
-
`diagnosticMode: "unsafe_unredacted"` exists for isolated tests only and should
|
|
73
|
-
|
|
71
|
+
`hashAuditValue()` uses deterministic SHA-256 hashes over stable JSON. The redaction
|
|
72
|
+
helpers hash subject, account, and tenant identifiers by default.
|
|
73
|
+
`diagnosticMode: "unsafe_unredacted"` exists for isolated tests only and should not be
|
|
74
|
+
used in production or public examples.
|
|
74
75
|
|
|
75
76
|
## Schemas
|
|
76
77
|
|
|
@@ -81,6 +82,5 @@ Strict JSON Schemas live under `schemas/audit/`:
|
|
|
81
82
|
- `approval-record.schema.json`
|
|
82
83
|
- `idempotency-record.schema.json`
|
|
83
84
|
|
|
84
|
-
They are intended for validation, storage contracts, and source review. Host
|
|
85
|
-
|
|
86
|
-
contracts.
|
|
85
|
+
They are intended for validation, storage contracts, and source review. Host systems may
|
|
86
|
+
add their own private storage metadata outside these public record contracts.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# CloudWatch Telemetry
|
|
2
2
|
|
|
3
|
-
`CloudWatchTelemetryPublisher` emits sanitized AICF trace and audit events to
|
|
4
|
-
|
|
5
|
-
configured.
|
|
3
|
+
`CloudWatchTelemetryPublisher` emits sanitized AICF trace and audit events to CloudWatch
|
|
4
|
+
metrics and CloudWatch Logs when caller-provided clients are configured.
|
|
6
5
|
|
|
7
6
|
```ts
|
|
8
7
|
import { CloudWatchTelemetryPublisher } from "ai-capability-framework/aws";
|
|
@@ -16,7 +15,6 @@ const telemetry = new CloudWatchTelemetryPublisher({
|
|
|
16
15
|
});
|
|
17
16
|
```
|
|
18
17
|
|
|
19
|
-
The helper publishes count metrics and metadata-mode log entries. It should not
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
The helper publishes count metrics and metadata-mode log entries. It should not be used
|
|
19
|
+
to capture raw prompts, raw provider payloads, secrets, tokens, cookies, payment data,
|
|
20
|
+
or private diagnostics.
|
|
@@ -7,9 +7,9 @@ The AWS reference stores use one DynamoDB table with:
|
|
|
7
7
|
- `GSI2PK` and `GSI2SK` for entity-type and relationship lookups;
|
|
8
8
|
- `schemaVersion`, `entityType`, timestamps, and optional `ttlEpochSeconds`.
|
|
9
9
|
|
|
10
|
-
Supported item families include prepared actions, runtime approvals,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Supported item families include prepared actions, runtime approvals, idempotency
|
|
11
|
+
reservations, audit events, canonical ledger records, controls, budget usage, Step
|
|
12
|
+
Functions approval tasks, and sanitized replay metadata.
|
|
13
13
|
|
|
14
14
|
Example CDK-style table shape:
|
|
15
15
|
|
|
@@ -21,10 +21,9 @@ new dynamodb.Table(this, "AicfRuntimeState", {
|
|
|
21
21
|
});
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Add GSIs named `GSI1` and `GSI2` with string partition and sort keys matching
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Use least-privilege IAM scoped to the table and the operations your host
|
|
28
|
-
actually enables: `dynamodb:PutItem`, `dynamodb:Query`, `dynamodb:UpdateItem`,
|
|
29
|
-
and `dynamodb:DeleteItem`.
|
|
24
|
+
Add GSIs named `GSI1` and `GSI2` with string partition and sort keys matching the field
|
|
25
|
+
names above.
|
|
30
26
|
|
|
27
|
+
Use least-privilege IAM scoped to the table and the operations your host actually
|
|
28
|
+
enables: `dynamodb:PutItem`, `dynamodb:Query`, `dynamodb:UpdateItem`, and
|
|
29
|
+
`dynamodb:DeleteItem`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# KMS Redaction References
|
|
2
2
|
|
|
3
|
-
`KmsRedactionProvider` creates deterministic redaction references with AWS KMS
|
|
4
|
-
|
|
3
|
+
`KmsRedactionProvider` creates deterministic redaction references with AWS KMS HMAC
|
|
4
|
+
keys. It returns a redacted ref and never returns the raw input value.
|
|
5
5
|
|
|
6
6
|
```ts
|
|
7
7
|
import { KmsRedactionProvider } from "ai-capability-framework/aws";
|
|
@@ -15,7 +15,6 @@ const redaction = new KmsRedactionProvider({
|
|
|
15
15
|
const ref = await redaction.redact({ tenantId: "tenant_example" });
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Use KMS key policies and IAM conditions to limit who can generate redaction
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
Use KMS key policies and IAM conditions to limit who can generate redaction refs. Host
|
|
19
|
+
applications remain responsible for key rotation, retention policy, and secure handling
|
|
20
|
+
of the original values.
|
package/docs/aws/overview.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# AWS Overview
|
|
2
2
|
|
|
3
|
-
AWS support is an optional reference integration under
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
AWS support is an optional reference integration under `ai-capability-framework/aws`.
|
|
4
|
+
Root, runtime, provider, governance, control, and evidence imports do not require AWS
|
|
5
|
+
SDK modules.
|
|
6
6
|
|
|
7
7
|
Read:
|
|
8
8
|
|
|
@@ -13,5 +13,5 @@ Read:
|
|
|
13
13
|
- [CloudWatch telemetry](cloudwatch-telemetry.md)
|
|
14
14
|
- [KMS redaction](kms-redaction.md)
|
|
15
15
|
|
|
16
|
-
Host applications own AWS credentials, IAM, deployment, table provisioning,
|
|
17
|
-
|
|
16
|
+
Host applications own AWS credentials, IAM, deployment, table provisioning, retention,
|
|
17
|
+
and cleanup.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# AWS Production Reference
|
|
2
2
|
|
|
3
|
-
AICF AWS support is optional. Import it from `ai-capability-framework/aws`
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
AICF AWS support is optional. Import it from `ai-capability-framework/aws` when a host
|
|
4
|
+
application wants AWS-backed reference adapters for durable runtime state, audit
|
|
5
|
+
evidence, approvals, controls, telemetry, and redaction.
|
|
6
6
|
|
|
7
|
-
The package root, runtime, provider, governance, audit, controls, and
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
The package root, runtime, provider, governance, audit, controls, and control-plane
|
|
8
|
+
subpaths do not import AWS SDK packages. AWS clients are provided by the host
|
|
9
|
+
application or constructed by host code outside AICF.
|
|
10
10
|
|
|
11
11
|
## Supported v1 Adapter
|
|
12
12
|
|
|
@@ -21,17 +21,16 @@ import {
|
|
|
21
21
|
} from "ai-capability-framework/aws";
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
These adapters store public-safe evidence: hashes, redacted refs, summaries,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
These adapters store public-safe evidence: hashes, redacted refs, summaries, states,
|
|
25
|
+
reasons, coverage metadata, and sanitized events. They do not store raw prompts, raw
|
|
26
|
+
provider payloads, raw transcripts, secrets, stack traces, or unredacted account,
|
|
27
|
+
tenant, or user identifiers by default.
|
|
28
28
|
|
|
29
29
|
## Host Responsibilities
|
|
30
30
|
|
|
31
|
-
The host application owns AWS credentials, IAM roles, table provisioning,
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
The host application owns AWS credentials, IAM roles, table provisioning, tenant/account
|
|
32
|
+
authorization, approval identity, workflow definitions, evidence retention, backups,
|
|
33
|
+
monitoring, and cleanup.
|
|
34
34
|
|
|
35
35
|
Default tests use fake clients only. Live AWS tests are skipped unless
|
|
36
36
|
`RUN_AWS_INTEGRATION=1` and the required resource environment variables are set.
|
|
37
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Step Functions Approval Handoff
|
|
2
2
|
|
|
3
|
-
`StepFunctionsApprovalAdapter` starts and resumes host-owned approval workflows.
|
|
4
|
-
|
|
3
|
+
`StepFunctionsApprovalAdapter` starts and resumes host-owned approval workflows. It
|
|
4
|
+
sends a safe prepared-action summary, not raw args or provider payloads.
|
|
5
5
|
|
|
6
6
|
```ts
|
|
7
7
|
import {
|
|
@@ -22,11 +22,9 @@ const approvals = new StepFunctionsApprovalAdapter({
|
|
|
22
22
|
});
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
The adapter can record task correlation metadata, send success for approved
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
approvers, or own production auth.
|
|
29
|
-
|
|
30
|
-
Hosts should store task tokens securely. AICF task records store token hashes,
|
|
31
|
-
not raw task tokens.
|
|
25
|
+
The adapter can record task correlation metadata, send success for approved decisions,
|
|
26
|
+
send failure for rejected decisions, and mark tasks expired or cancelled. It does not
|
|
27
|
+
build approval UI, send email, decide policy, verify approvers, or own production auth.
|
|
32
28
|
|
|
29
|
+
Hosts should store task tokens securely. AICF task records store token hashes, not raw
|
|
30
|
+
task tokens.
|
package/docs/aws-runtime.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AWS Runtime Reference
|
|
2
2
|
|
|
3
|
-
AICF AWS support is an optional reference integration for host applications that
|
|
4
|
-
|
|
3
|
+
AICF AWS support is an optional reference integration for host applications that already
|
|
4
|
+
run durable runtime state or approval workflows on AWS.
|
|
5
5
|
|
|
6
6
|
Import AWS APIs from:
|
|
7
7
|
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
The package root, `ai-capability-framework/runtime`, and
|
|
17
17
|
`ai-capability-framework/openai` do not import AWS SDK modules.
|
|
18
18
|
|
|
19
|
-
The AWS subpath itself can be imported in a clean install without AWS SDK
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
The AWS subpath itself can be imported in a clean install without AWS SDK packages.
|
|
20
|
+
DynamoDB, Step Functions, and EventBridge operations dynamically require the relevant
|
|
21
|
+
optional AWS SDK peer only when those operations run.
|
|
22
22
|
|
|
23
23
|
## DynamoDB Stores
|
|
24
24
|
|
|
25
|
-
The AWS subpath provides DynamoDB implementations for runtime, audit, controls,
|
|
26
|
-
|
|
25
|
+
The AWS subpath provides DynamoDB implementations for runtime, audit, controls, and
|
|
26
|
+
control-plane state:
|
|
27
27
|
|
|
28
28
|
- `DynamoDbPreparedActionStore`
|
|
29
29
|
- `DynamoDbApprovalStore`
|
|
@@ -48,13 +48,13 @@ const preparedActionStore = new DynamoDbPreparedActionStore({
|
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
The reference shape uses one table with `PK` and `SK`, lookup index fields, a
|
|
51
|
-
`schemaVersion`, an `entityType`, timestamps, and optional `ttlEpochSeconds`.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
`schemaVersion`, an `entityType`, timestamps, and optional `ttlEpochSeconds`. Prepared
|
|
52
|
+
actions are partitioned by tenant and account. Approval and idempotency records use
|
|
53
|
+
runtime metadata added by the lifecycle manager so the existing store interfaces do not
|
|
54
|
+
need AWS-specific arguments.
|
|
55
55
|
|
|
56
|
-
Prepared action payloads store redacted args and public runtime summaries, not
|
|
57
|
-
|
|
56
|
+
Prepared action payloads store redacted args and public runtime summaries, not raw user
|
|
57
|
+
prompts, provider payloads, or private traces.
|
|
58
58
|
|
|
59
59
|
See [DynamoDB single-table shape](aws/dynamodb-single-table.md) for the
|
|
60
60
|
production-reference item model.
|
|
@@ -75,17 +75,16 @@ await approvals.startApproval({
|
|
|
75
75
|
});
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
The adapter sends safe prepared-action summaries to Step Functions. It does not
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
The adapter sends safe prepared-action summaries to Step Functions. It does not build
|
|
79
|
+
approval screens, send notifications, own identity, verify approvers, or decide policy.
|
|
80
|
+
Host applications remain responsible for approval UI, auth, workflow definitions, and
|
|
81
|
+
task-token handling.
|
|
82
82
|
|
|
83
83
|
See [Step Functions approval handoff](aws/step-functions-approval.md).
|
|
84
84
|
|
|
85
85
|
## EventBridge Publishing
|
|
86
86
|
|
|
87
|
-
`EventBridgeRuntimeEventPublisher` publishes sanitized AICF trace or audit
|
|
88
|
-
events:
|
|
87
|
+
`EventBridgeRuntimeEventPublisher` publishes sanitized AICF trace or audit events:
|
|
89
88
|
|
|
90
89
|
```ts
|
|
91
90
|
const publisher = new EventBridgeRuntimeEventPublisher({
|
|
@@ -97,8 +96,8 @@ await publisher.publish(event);
|
|
|
97
96
|
```
|
|
98
97
|
|
|
99
98
|
Trace content is emitted in metadata mode by default. Raw prompts, raw provider
|
|
100
|
-
payloads, secrets, tokens, cookies, and payment data should not be included in
|
|
101
|
-
|
|
99
|
+
payloads, secrets, tokens, cookies, and payment data should not be included in runtime
|
|
100
|
+
events.
|
|
102
101
|
|
|
103
102
|
`CloudWatchTelemetryPublisher` and `KmsRedactionProvider` are also available for
|
|
104
103
|
sanitized AWS telemetry and deterministic redaction refs. See
|
|
@@ -108,8 +107,8 @@ sanitized AWS telemetry and deterministic redaction refs. See
|
|
|
108
107
|
## Production Reference
|
|
109
108
|
|
|
110
109
|
The full AWS production-reference guide is in
|
|
111
|
-
[docs/aws/production-reference.md](aws/production-reference.md). DynamoDB is the
|
|
112
|
-
|
|
110
|
+
[docs/aws/production-reference.md](aws/production-reference.md). DynamoDB is the only
|
|
111
|
+
durable database adapter implemented for v1; RDS is deferred.
|
|
113
112
|
|
|
114
113
|
## Testing
|
|
115
114
|
|
|
@@ -119,5 +118,5 @@ The AWS subpath exports fake clients for deterministic tests:
|
|
|
119
118
|
- `FakeStepFunctionsClient`
|
|
120
119
|
- `FakeEventBridgeClient`
|
|
121
120
|
|
|
122
|
-
Default package tests use these fakes only. No AWS credentials, network calls,
|
|
123
|
-
|
|
121
|
+
Default package tests use these fakes only. No AWS credentials, network calls, CDK,
|
|
122
|
+
CloudFormation, Terraform, or live AWS resources are required.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Capability Manifests
|
|
2
2
|
|
|
3
|
-
A capability manifest is the contract between model-facing intent and
|
|
4
|
-
|
|
3
|
+
A capability manifest is the contract between model-facing intent and application-owned
|
|
4
|
+
execution.
|
|
5
5
|
|
|
6
6
|
See [the 1.0 spec](spec.md) for the shared vocabulary.
|
|
7
7
|
|
|
@@ -12,36 +12,32 @@ See [the 1.0 spec](spec.md) for the shared vocabulary.
|
|
|
12
12
|
- `version`: Semantic version for the capability contract.
|
|
13
13
|
- `status`: Lifecycle state such as `draft`, `active`, or `deprecated`.
|
|
14
14
|
- `name` and `summary`: Human-readable labels for operators and maintainers.
|
|
15
|
-
- `model_description`: Short model-facing description of when to use the
|
|
16
|
-
|
|
17
|
-
- `capability_type`: The broad action class, such as read, compute, prepare, or
|
|
18
|
-
commit.
|
|
15
|
+
- `model_description`: Short model-facing description of when to use the capability.
|
|
16
|
+
- `capability_type`: The broad action class, such as read, compute, prepare, or commit.
|
|
19
17
|
- `autonomy_tier`: Maximum autonomy level allowed for the capability.
|
|
20
18
|
- `risk_tier`: Safety and business risk tier.
|
|
21
19
|
- `input_schema` and `output_schema`: JSON Schema contracts.
|
|
22
|
-
- `side_effects`: Explicit flags for data reads, writes, money movement,
|
|
23
|
-
|
|
20
|
+
- `side_effects`: Explicit flags for data reads, writes, money movement, external
|
|
21
|
+
messages, permission changes, and irreversible actions.
|
|
24
22
|
- `authorization`: Required permissions and scoping rules.
|
|
25
23
|
- `policy`: Deny, approval, and review rules.
|
|
26
|
-
- `lifecycle`: Explicit prepare, preview, approve, commit, verify, and audit
|
|
27
|
-
flags.
|
|
24
|
+
- `lifecycle`: Explicit prepare, preview, approve, commit, verify, and audit flags.
|
|
28
25
|
- `idempotency`: Optional commit idempotency requirements.
|
|
29
26
|
- `observability`: Logging and trace expectations.
|
|
30
27
|
|
|
31
28
|
## Lifecycle Guidance
|
|
32
29
|
|
|
33
|
-
Use `write_prepare_only` for capabilities that assemble a proposed action but do
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
Use `write_prepare_only` for capabilities that assemble a proposed action but do not
|
|
31
|
+
execute it. Use `write_commit` only when the application can enforce authorization,
|
|
32
|
+
idempotency, approval state, verification, and audit.
|
|
36
33
|
|
|
37
34
|
High-risk capabilities should require explicit approval before commit. Critical
|
|
38
|
-
capabilities should usually be split into separate prepare and commit
|
|
39
|
-
capabilities.
|
|
35
|
+
capabilities should usually be split into separate prepare and commit capabilities.
|
|
40
36
|
|
|
41
|
-
Commit capabilities should be excluded from normal model tool sets until
|
|
42
|
-
|
|
37
|
+
Commit capabilities should be excluded from normal model tool sets until application
|
|
38
|
+
code has verified approval and idempotency state.
|
|
43
39
|
|
|
44
|
-
AICF tooling loads and validates capability manifests, builds registries,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
AICF tooling loads and validates capability manifests, builds registries, evaluates
|
|
41
|
+
deterministic select, prepare, and commit decisions, exports adapter metadata, and
|
|
42
|
+
scores eval fixtures. It does not execute capabilities, persist actions, collect
|
|
43
|
+
approvals, or perform side effects.
|
|
@@ -10,5 +10,5 @@ Read:
|
|
|
10
10
|
- [Governance gate](../governance/gate.md)
|
|
11
11
|
- [Evidence export](../evidence.md)
|
|
12
12
|
|
|
13
|
-
The reference app does not provide production auth, production persistence,
|
|
14
|
-
|
|
13
|
+
The reference app does not provide production auth, production persistence, hosted SaaS
|
|
14
|
+
behavior, model calls, or side-effect execution.
|
package/docs/control-plane.md
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# Control Plane
|
|
2
2
|
|
|
3
|
-
The AICF control plane is an optional self-hostable review surface for
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
The AICF control plane is an optional self-hostable review surface for capabilities and
|
|
4
|
+
their runtime evidence. It is for local or host-owned governance workflows, not a hosted
|
|
5
|
+
SaaS dashboard.
|
|
6
6
|
|
|
7
|
-
The control plane does not call models, run provider SDKs, execute handlers,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
execution.
|
|
7
|
+
The control plane does not call models, run provider SDKs, execute handlers, commit side
|
|
8
|
+
effects, enforce production auth, or provide durable production storage. Host
|
|
9
|
+
applications must supply real authentication, tenant/account authorization, approval
|
|
10
|
+
identity, storage, retention, and side-effect execution.
|
|
12
11
|
|
|
13
12
|
## What It Reviews
|
|
14
13
|
|
|
@@ -24,10 +23,10 @@ The control plane composes existing AICF evidence:
|
|
|
24
23
|
- redacted replay metadata;
|
|
25
24
|
- evidence exports made only from summaries, hashes, and redacted refs.
|
|
26
25
|
|
|
27
|
-
It must not display raw prompts, raw provider payloads, raw transcripts,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
It must not display raw prompts, raw provider payloads, raw transcripts, secrets, stack
|
|
27
|
+
traces, tenant IDs, account IDs, or sensitive tool outputs. The evidence endpoint
|
|
28
|
+
preserves the control-plane response shape and also includes the canonical evidence pack
|
|
29
|
+
documented in [Evidence export](evidence.md).
|
|
31
30
|
|
|
32
31
|
## TypeScript
|
|
33
32
|
|
|
@@ -56,9 +55,9 @@ const response = await routeControlPlaneRequest({
|
|
|
56
55
|
});
|
|
57
56
|
```
|
|
58
57
|
|
|
59
|
-
`routeControlPlaneRequest()` returns a JSON-serializable response with
|
|
60
|
-
`
|
|
61
|
-
|
|
58
|
+
`routeControlPlaneRequest()` returns a JSON-serializable response with `status`,
|
|
59
|
+
`headers`, and `body`. It does not start a server. Bind it to Express, Fastify, a Node
|
|
60
|
+
HTTP server, a worker, or another host-owned transport.
|
|
62
61
|
|
|
63
62
|
## Local Reference App
|
|
64
63
|
|
|
@@ -71,9 +70,9 @@ node examples/control-plane/server.mjs
|
|
|
71
70
|
|
|
72
71
|
Then open `http://localhost:4127`.
|
|
73
72
|
|
|
74
|
-
The example uses a tracked synthetic seed fixture and writes local mutable state
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
The example uses a tracked synthetic seed fixture and writes local mutable state to
|
|
74
|
+
`.aicf/control-plane-state.json`, which is ignored. It uses a fake local dev operator
|
|
75
|
+
only to demonstrate approve/reject and kill-switch interactions.
|
|
77
76
|
|
|
78
77
|
## API Paths
|
|
79
78
|
|
|
@@ -113,14 +112,12 @@ Stack traces and private diagnostics are not returned.
|
|
|
113
112
|
`InMemoryControlPlaneStore` is for tests and examples.
|
|
114
113
|
|
|
115
114
|
`FileControlPlaneStore` is for local development. It defaults to
|
|
116
|
-
`.aicf/control-plane-state.json` and should not be used as production durable
|
|
117
|
-
storage.
|
|
115
|
+
`.aicf/control-plane-state.json` and should not be used as production durable storage.
|
|
118
116
|
|
|
119
|
-
Production hosts can wire `DynamoDbControlPlaneStore` from
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
or evidence retention policy.
|
|
117
|
+
Production hosts can wire `DynamoDbControlPlaneStore` from `ai-capability-framework/aws`
|
|
118
|
+
to the same service/router API when they want AWS backed audit, controls, approval, and
|
|
119
|
+
replay metadata. The AWS adapter remains optional and does not provide production auth,
|
|
120
|
+
deployment, tenant enforcement, or evidence retention policy.
|
|
124
121
|
|
|
125
|
-
Production hosts should implement `AicfControlPlaneStore` with their own
|
|
126
|
-
|
|
122
|
+
Production hosts should implement `AicfControlPlaneStore` with their own authorization,
|
|
123
|
+
audit, retention, and tenant isolation.
|