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
package/README.md
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
# AI Capability Framework
|
|
1
|
+
# AI Capability Framework (AICF)
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="docs/assets/aicf-logo.svg" alt="AI Capability Framework logo" width="520">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
AI Capability Framework
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
prove the behavior with
|
|
7
|
+
AI Capability Framework (AICF) is a provider-agnostic AI capability framework: a
|
|
8
|
+
governed capability layer for AI-accessible application functionality. It helps
|
|
9
|
+
application teams describe what an AI system is allowed to do, expose only the right
|
|
10
|
+
tools to a model, validate every model tool call, and prove the behavior with
|
|
11
|
+
deterministic evals.
|
|
11
12
|
|
|
12
|
-
AICF is not an agent framework. It is a governed capability layer for AI-accessible
|
|
13
|
+
AICF is not an agent framework. It is a governed capability layer for AI-accessible
|
|
14
|
+
application functionality.
|
|
13
15
|
|
|
14
16
|
Models propose; applications validate, authorize, execute, and audit.
|
|
15
17
|
|
|
16
|
-
AICF supports OpenAI, Anthropic Claude, Google Gemini, Vercel AI SDK, Model
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
AICF supports OpenAI, Anthropic Claude, Google Gemini, Vercel AI SDK, Model Context
|
|
19
|
+
Protocol, LangChain/LangGraph, and Semantic Kernel-compatible MCP/OpenAPI workflows.
|
|
20
|
+
OpenAI is one adapter, not the architecture.
|
|
19
21
|
|
|
20
22
|
## How AICF Works
|
|
21
23
|
|
|
@@ -37,56 +39,74 @@ manifests
|
|
|
37
39
|
|
|
38
40
|
In plain terms:
|
|
39
41
|
|
|
40
|
-
1. You write public-safe manifests that describe capabilities, entities, and
|
|
41
|
-
eval cases.
|
|
42
|
+
1. You write public-safe manifests that describe capabilities, entities, and eval cases.
|
|
42
43
|
2. AICF validates those manifests and builds a registry.
|
|
43
|
-
3. Runtime routing picks the smallest safe slice of capabilities for a user
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
read-only, or enforce per-run budgets.
|
|
44
|
+
3. Runtime routing picks the smallest safe slice of capabilities for a user request.
|
|
45
|
+
4. Optional controls can deny, force approval, make matching capabilities read-only, or
|
|
46
|
+
enforce per-run budgets.
|
|
47
47
|
5. Provider adapters turn that slice into tool definitions for OpenAI or another
|
|
48
48
|
provider.
|
|
49
|
-
6. Tool calls map back to AICF capability IDs and are validated against the
|
|
50
|
-
|
|
49
|
+
6. Tool calls map back to AICF capability IDs and are validated against the original
|
|
50
|
+
schema.
|
|
51
51
|
7. The runtime can execute host-registered read and prepare handlers.
|
|
52
|
-
8. Commit remains host-controlled through prepared actions, approvals,
|
|
53
|
-
|
|
54
|
-
9. An optional self-hosted control plane can review capabilities, evidence,
|
|
55
|
-
|
|
52
|
+
8. Commit remains host-controlled through prepared actions, approvals, idempotency, and
|
|
53
|
+
optional audit ledger records.
|
|
54
|
+
9. An optional self-hosted control plane can review capabilities, evidence, approvals,
|
|
55
|
+
controls, and redacted replay metadata.
|
|
56
56
|
10. Eval fixtures prove selection, arguments, refusal, approval, and no-commit
|
|
57
|
-
|
|
58
|
-
11. Sanitized replay traces can be rerun or converted into review-required
|
|
59
|
-
|
|
60
|
-
12. Evidence packs summarize public-safe governance, eval, conformance,
|
|
61
|
-
|
|
57
|
+
boundaries without calling a model.
|
|
58
|
+
11. Sanitized replay traces can be rerun or converted into review-required regression
|
|
59
|
+
eval drafts.
|
|
60
|
+
12. Evidence packs summarize public-safe governance, eval, conformance, approval,
|
|
61
|
+
retention, and coverage status for review.
|
|
62
62
|
13. Optional provenance hooks attach refs-and-hashes metadata to generated
|
|
63
63
|
customer-facing content through host-owned publishing or signing pipelines.
|
|
64
64
|
|
|
65
65
|
## Start Here
|
|
66
66
|
|
|
67
|
+
- Supported Node.js versions: 20.x, 22.x, and 24.x. Package metadata uses
|
|
68
|
+
`engines.node >=20`.
|
|
67
69
|
- New to AICF: [Start here](docs/start-here.md)
|
|
70
|
+
- Provider-neutral quickstart:
|
|
71
|
+
[no-key path](docs/getting-started/provider-neutral-quickstart.md)
|
|
72
|
+
- Choose a runtime: [provider/runtime guide](docs/providers/choose-a-runtime.md)
|
|
73
|
+
- Optional provider quickstarts: [OpenAI](docs/getting-started/openai-quickstart.md),
|
|
74
|
+
[Anthropic](docs/getting-started/anthropic-quickstart.md), and
|
|
75
|
+
[Gemini](docs/getting-started/gemini-quickstart.md)
|
|
68
76
|
- Documentation index: [Docs](docs/index.md)
|
|
69
77
|
- Concrete OpenAI flow: [OpenAI walkthrough](docs/openai-walkthrough.md)
|
|
70
78
|
- Main terms: [Glossary](docs/glossary.md)
|
|
71
79
|
- Full API reference: [API](docs/api.md)
|
|
80
|
+
- Public API policy: [root and subpath exports](docs/api/public-api-policy.md)
|
|
81
|
+
- Agent skills package: [AICF Agent Skills](agent-skills/README.md)
|
|
82
|
+
- Security policy: [SECURITY.md](SECURITY.md)
|
|
83
|
+
- Release/certification:
|
|
84
|
+
[Final v1 certification](docs/public-framework/v1-certification.md)
|
|
85
|
+
- Final certification matrix:
|
|
86
|
+
[local release gate](docs/public-framework/final-certification-matrix.md)
|
|
87
|
+
- npm release preflight:
|
|
88
|
+
[package ownership and tags](docs/public/npm-release-preflight.md)
|
|
89
|
+
- License decision: [MIT for v1](docs/public-framework/license-decision.md)
|
|
90
|
+
- Dependency license exceptions:
|
|
91
|
+
[reviewed exception register](docs/public/license-exceptions.md)
|
|
72
92
|
|
|
73
93
|
## What AICF Does / What Your App Does
|
|
74
94
|
|
|
75
|
-
| AICF does
|
|
76
|
-
|
|
|
77
|
-
| Validates capability, entity, eval, context, decision, and result contracts.
|
|
78
|
-
| Routes a small model-facing capability slice.
|
|
79
|
-
| Exports provider tool definitions and binding maps.
|
|
80
|
-
| Parses provider tool calls back to capability IDs.
|
|
81
|
-
| Validates tool arguments with AICF schemas before execution.
|
|
82
|
-
| Returns model-safe envelopes for success, validation errors, denials, approval-required actions, and failures. | Shows approval UI, collects approvals, and commits side effects through host-controlled lifecycle APIs.
|
|
83
|
-
| Can write optional canonical audit ledger records with redacted refs and hashes.
|
|
84
|
-
| Can evaluate optional kill switches, circuit breakers, and per-run budgets.
|
|
85
|
-
| Can govern whether host-supplied memory summaries may become model context.
|
|
86
|
-
| Provides an optional self-hostable control-plane API and reference UI for public-safe review.
|
|
87
|
-
| Can export public-safe evidence packs with gaps and disclaimers.
|
|
88
|
-
| Can create public-safe generated-content provenance sidecars and adapter-hook inputs.
|
|
89
|
-
| Scores deterministic eval fixtures and provider conformance cases.
|
|
95
|
+
| AICF does | Your app does |
|
|
96
|
+
| -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| Validates capability, entity, eval, context, decision, and result contracts. | Owns production auth, account state, entitlements, and tenant boundaries. |
|
|
98
|
+
| Routes a small model-facing capability slice. | Decides which user request and host context to pass into AICF. |
|
|
99
|
+
| Exports provider tool definitions and binding maps. | Calls OpenAI or another provider with a caller-provided client. |
|
|
100
|
+
| Parses provider tool calls back to capability IDs. | Provides real data access and business logic handlers. |
|
|
101
|
+
| Validates tool arguments with AICF schemas before execution. | Performs durable storage, payment, email, ticketing, or other side effects. |
|
|
102
|
+
| Returns model-safe envelopes for success, validation errors, denials, approval-required actions, and failures. | Shows approval UI, collects approvals, and commits side effects through host-controlled lifecycle APIs. |
|
|
103
|
+
| Can write optional canonical audit ledger records with redacted refs and hashes. | Stores production audit evidence, retention policy, and compliance workflows in your own systems. |
|
|
104
|
+
| Can evaluate optional kill switches, circuit breakers, and per-run budgets. | Owns production control stores, authenticated operator workflows, and incident response. |
|
|
105
|
+
| Can govern whether host-supplied memory summaries may become model context. | Owns memory storage, consent, deletion, recall, identity resolution, and tenant scoping. |
|
|
106
|
+
| Provides an optional self-hostable control-plane API and reference UI for public-safe review. | Owns production access control, durable control-plane storage, approval identity, and evidence retention. |
|
|
107
|
+
| Can export public-safe evidence packs with gaps and disclaimers. | Owns compliance decisions, audit engagement, legal review, and production evidence systems. |
|
|
108
|
+
| Can create public-safe generated-content provenance sidecars and adapter-hook inputs. | Owns real content signing, document/media embedding, CMS integration, and authenticity claims. |
|
|
109
|
+
| Scores deterministic eval fixtures and provider conformance cases. | Produces candidate results from tests, mocks, or optional live runs. |
|
|
90
110
|
|
|
91
111
|
## Try It
|
|
92
112
|
|
|
@@ -133,10 +153,15 @@ Start and concepts:
|
|
|
133
153
|
- [Start here](docs/start-here.md)
|
|
134
154
|
- [Getting started checklist](docs/getting-started.md)
|
|
135
155
|
- [Installation](docs/getting-started/installation.md)
|
|
156
|
+
- [Provider-neutral quickstart](docs/getting-started/provider-neutral-quickstart.md)
|
|
136
157
|
- [Quickstart](docs/getting-started/quickstart.md)
|
|
137
158
|
- [Concepts](docs/getting-started/concepts.md)
|
|
159
|
+
- [OpenAI quickstart](docs/getting-started/openai-quickstart.md)
|
|
160
|
+
- [Anthropic quickstart](docs/getting-started/anthropic-quickstart.md)
|
|
161
|
+
- [Gemini quickstart](docs/getting-started/gemini-quickstart.md)
|
|
138
162
|
- [OpenAI walkthrough](docs/openai-walkthrough.md)
|
|
139
163
|
- [Glossary](docs/glossary.md)
|
|
164
|
+
- [Public API policy](docs/api/public-api-policy.md)
|
|
140
165
|
- [1.0 spec](docs/spec.md)
|
|
141
166
|
- [Host responsibilities](docs/host-responsibilities.md)
|
|
142
167
|
|
|
@@ -167,6 +192,7 @@ Evals and providers:
|
|
|
167
192
|
- [Evidence export](docs/evidence.md)
|
|
168
193
|
- [Content provenance hooks](docs/provenance.md)
|
|
169
194
|
- [Provider foundation](docs/providers.md)
|
|
195
|
+
- [Choose a provider/runtime](docs/providers/choose-a-runtime.md)
|
|
170
196
|
- [Provider conformance](docs/providers/conformance.md)
|
|
171
197
|
- [Anthropic Claude runtime](docs/anthropic-runtime.md)
|
|
172
198
|
- [Google Gemini runtime](docs/gemini-runtime.md)
|
|
@@ -187,6 +213,7 @@ Reference and release:
|
|
|
187
213
|
- [Migration 0.1 to 1.0](docs/migration-0.1-to-1.0.md)
|
|
188
214
|
- [Release checklist](docs/release.md)
|
|
189
215
|
- [Final v1.0 certification](docs/public-framework/v1-certification.md)
|
|
216
|
+
- [npm release preflight](docs/public/npm-release-preflight.md)
|
|
190
217
|
- [CHANGELOG](CHANGELOG.md)
|
|
191
218
|
- [CONTRIBUTING](CONTRIBUTING.md)
|
|
192
219
|
- [SECURITY](SECURITY.md)
|
|
@@ -195,21 +222,21 @@ Reference and release:
|
|
|
195
222
|
|
|
196
223
|
The public examples are synthetic:
|
|
197
224
|
|
|
198
|
-
- `examples/01-basic-read-capability/` through `examples/11-control-plane/`
|
|
199
|
-
|
|
225
|
+
- `examples/01-basic-read-capability/` through `examples/11-control-plane/` provide
|
|
226
|
+
numbered README-first tutorials.
|
|
200
227
|
- `examples/support/` describes a support ticket and refund workflow.
|
|
201
228
|
- `examples/scheduling/` describes scheduling capabilities.
|
|
202
|
-
- `examples/runtime-support-billing/` runs a mock route, read, prepare,
|
|
203
|
-
|
|
204
|
-
- `examples/control-plane/` runs a local governance control-plane reference app
|
|
205
|
-
|
|
206
|
-
- `examples/aws/` documents credential-free AWS adapter wiring and production
|
|
207
|
-
|
|
229
|
+
- `examples/runtime-support-billing/` runs a mock route, read, prepare, approval, and
|
|
230
|
+
commit flow without credentials.
|
|
231
|
+
- `examples/control-plane/` runs a local governance control-plane reference app with
|
|
232
|
+
synthetic seed state and ignored local mutations.
|
|
233
|
+
- `examples/aws/` documents credential-free AWS adapter wiring and production host
|
|
234
|
+
responsibilities.
|
|
208
235
|
- `examples/providers/` contains README-only provider examples.
|
|
209
236
|
|
|
210
|
-
Private drafts, raw prompts, traces, provider payloads, generated local docs,
|
|
211
|
-
|
|
212
|
-
|
|
237
|
+
Private drafts, raw prompts, traces, provider payloads, generated local docs, and
|
|
238
|
+
local-only artifacts are excluded from tracked files. See `AGENTS.md` for the workspace
|
|
239
|
+
boundary.
|
|
213
240
|
|
|
214
241
|
## Development Checks
|
|
215
242
|
|
|
@@ -233,29 +260,38 @@ npm run gate:examples
|
|
|
233
260
|
npm run check
|
|
234
261
|
```
|
|
235
262
|
|
|
236
|
-
Provider live tests are opt-in and require explicit environment variables.
|
|
237
|
-
|
|
238
|
-
live model calls.
|
|
263
|
+
Provider live tests are opt-in and require explicit environment variables. Normal checks
|
|
264
|
+
use mock clients, descriptor exports, synthetic fixtures, and no live model calls.
|
|
239
265
|
|
|
240
266
|
For artifact review:
|
|
241
267
|
|
|
242
268
|
```bash
|
|
243
269
|
npm run check:package
|
|
270
|
+
npm run skills:ci
|
|
271
|
+
npm run skills:check
|
|
272
|
+
npm run skills:pack:dry
|
|
244
273
|
npm pack
|
|
245
|
-
npm
|
|
274
|
+
npm run release:preflight:npm
|
|
275
|
+
npm run release:publish:dry
|
|
246
276
|
npm run archive:source
|
|
247
277
|
npm run check:source-archive
|
|
248
278
|
```
|
|
249
279
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
logs, prompts, or provider payloads.
|
|
280
|
+
Release tags publish two npm artifacts from the same commit and version:
|
|
281
|
+
`ai-capability-framework` and `@aicf/agent-skills`. For example, package version `1.0.0`
|
|
282
|
+
uses tag `v1.0.0` and the `latest` dist tag for both packages.
|
|
254
283
|
|
|
255
|
-
|
|
256
|
-
|
|
284
|
+
Use `npm pack` for npm package review and `npm run archive:source` for public source
|
|
285
|
+
review. Do not zip the working directory manually; raw workspace archives can include
|
|
286
|
+
`.git/`, dependencies, generated output, private notes, traces, logs, prompts, or
|
|
287
|
+
provider payloads.
|
|
288
|
+
|
|
289
|
+
CI also runs dedicated docs, security, release dry-run, package hygiene, conformance,
|
|
290
|
+
and governance-gate workflows. See
|
|
257
291
|
[Release process](docs/public-framework/release-process.md) and
|
|
258
|
-
[Release checklist](docs/release.md).
|
|
292
|
+
[Release checklist](docs/release.md). npm ownership and dist-tag checks are documented
|
|
293
|
+
in [npm release preflight](docs/public/npm-release-preflight.md). Final v1.0
|
|
294
|
+
certification is documented in
|
|
259
295
|
[Final v1.0 certification](docs/public-framework/v1-certification.md).
|
|
260
296
|
|
|
261
297
|
## License
|
package/ROADMAP.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# Roadmap
|
|
2
2
|
|
|
3
|
-
AICF 1.0 focuses on making governed capability exposure understandable,
|
|
4
|
-
|
|
3
|
+
AICF 1.0 focuses on making governed capability exposure understandable, portable,
|
|
4
|
+
testable, and release-ready.
|
|
5
5
|
|
|
6
6
|
## Current 1.0 Focus
|
|
7
7
|
|
|
8
|
-
- Public capability, entity, eval, governance, audit, security, evidence,
|
|
9
|
-
|
|
8
|
+
- Public capability, entity, eval, governance, audit, security, evidence, provenance,
|
|
9
|
+
replay, and provider-conformance contracts.
|
|
10
10
|
- No-model runtime primitives for routing, validation, read/prepare execution,
|
|
11
11
|
approvals, idempotency, and audit records.
|
|
12
|
-
- Optional provider/runtime bridges for OpenAI, Anthropic, Gemini, Vercel AI
|
|
13
|
-
|
|
12
|
+
- Optional provider/runtime bridges for OpenAI, Anthropic, Gemini, Vercel AI SDK,
|
|
13
|
+
LangChain/LangGraph, MCP, and Semantic Kernel-compatible hosts.
|
|
14
14
|
- Public docs, examples, package checks, and release readiness.
|
|
15
15
|
|
|
16
16
|
## Explicit Non-Goals
|
|
17
17
|
|
|
18
|
-
AICF is not an agent framework, model gateway, RAG framework, durable workflow
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
AICF is not an agent framework, model gateway, RAG framework, durable workflow engine,
|
|
19
|
+
production auth system, compliance product, hosted SaaS, or full content provenance
|
|
20
|
+
signing implementation.
|
|
21
21
|
|
|
22
22
|
## After 1.0
|
|
23
23
|
|
|
24
|
-
Future work should be driven by real adopter feedback and should preserve the
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
Future work should be driven by real adopter feedback and should preserve the same
|
|
25
|
+
architecture: AICF owns capability safety contracts and host applications own production
|
|
26
|
+
systems, credentials, side effects, and deployment.
|
package/SECURITY.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# Security Policy
|
|
2
2
|
|
|
3
|
-
AI Capability Framework is public. Please do not disclose secrets, customer
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
AI Capability Framework is public. Please do not disclose secrets, customer data, raw
|
|
4
|
+
prompts, raw traces, provider payloads, internal endpoints, or private documents in
|
|
5
|
+
public issues, pull requests, comments, docs, or examples.
|
|
6
6
|
|
|
7
7
|
## Supported Versions
|
|
8
8
|
|
|
9
|
-
Security support is provided for the latest published `1.x` release candidate or
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Security support is provided for the latest published `1.x` release candidate or stable
|
|
10
|
+
release on npm. Older prereleases may receive fixes when the maintainers decide the fix
|
|
11
|
+
is low-risk and useful for public migration.
|
|
12
12
|
|
|
13
13
|
## Reporting A Vulnerability
|
|
14
14
|
|
|
15
|
-
Use GitHub private vulnerability reporting if it is enabled for this repository.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
Use GitHub private vulnerability reporting if it is enabled for this repository. If
|
|
16
|
+
private reporting is unavailable, open a minimal public issue that describes the
|
|
17
|
+
affected area at a high level and asks for a private reporting path. Do not include
|
|
18
|
+
exploit details, credentials, real identifiers, raw prompts, traces, provider payloads,
|
|
19
|
+
or private data in that public issue.
|
|
20
20
|
|
|
21
21
|
## What To Include Privately
|
|
22
22
|
|
|
@@ -27,10 +27,10 @@ provider payloads, or private data in that public issue.
|
|
|
27
27
|
|
|
28
28
|
## Response Process
|
|
29
29
|
|
|
30
|
-
Maintainers will acknowledge valid private reports, assess severity and public
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
Maintainers will acknowledge valid private reports, assess severity and public exposure,
|
|
31
|
+
prepare a fix or mitigation, run release-readiness checks, and publish advisory or
|
|
32
|
+
release notes when appropriate. Reports that include unsafe public details may be
|
|
33
|
+
redacted or removed to protect users.
|
|
34
34
|
|
|
35
35
|
## High-Risk Areas
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../src/audit/ledger.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,yBAAyB;IACxC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED,qBAAa,kBAAmB,YAAW,yBAAyB;IAClE,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,mBAAmB,CAAC;IAC5C,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC;IAC7C,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;IAClD,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;gBAEtC,OAAO,GAAE,yBAA8B;IAQ7C,oBAAoB,CAAC,KAAK,EAAE,gCAAgC,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAe5F,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../src/audit/ledger.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,YAAY,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input.preview ?? input.preparedAction?.preview,
|
|
49
49
|
result: input.result,
|
|
50
50
|
runId: input.runId ?? input.preparedAction?.runId ?? "unknown",
|
|
51
|
-
traceRef: input.traceRef
|
|
51
|
+
traceRef: input.traceRef,
|
|
52
|
+
verificationStatus: input.verificationStatus
|
|
52
53
|
});
|
|
53
54
|
if (existing) {
|
|
54
55
|
return this.actionStore.updateAction(record.actionId, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/audit/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAQtD,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EAEd,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,+BAA+B,EAC/B,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,oBAAoB,CAoCvG;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/audit/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAQtD,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EAEd,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,+BAA+B,EAC/B,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,oBAAoB,CAoCvG;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,YAAY,CAiC/E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,cAAc,CAwBrF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,iBAAiB,CAiB9F;AAED,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAKnH;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAGjE;AAwBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,kBAAkB,CAgDrB"}
|
package/dist/audit/records.js
CHANGED
|
@@ -64,7 +64,8 @@ export function createActionRecord(input) {
|
|
|
64
64
|
runId: input.runId,
|
|
65
65
|
schemaVersion: "1.0",
|
|
66
66
|
traceRef: input.traceRef,
|
|
67
|
-
updatedAt: input.updatedAt ?? now
|
|
67
|
+
updatedAt: input.updatedAt ?? now,
|
|
68
|
+
verificationStatus: input.verificationStatus
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
export function createApprovalRecord(input) {
|
package/dist/audit/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AutonomyTier, CapabilityManifest, DecisionStatus, RiskTier } from "../types.js";
|
|
2
|
-
import type { AicfApprovalDecision, AicfPolicyDecision, AicfPreparedAction, AicfRuntimeContext } from "../runtime/types.js";
|
|
2
|
+
import type { AicfApprovalDecision, AicfActionVerificationState, AicfPolicyDecision, AicfPreparedAction, AicfRuntimeContext } from "../runtime/types.js";
|
|
3
3
|
export type AuditDiagnosticMode = "redacted" | "unsafe_unredacted";
|
|
4
4
|
export interface RedactionSummary {
|
|
5
5
|
fieldsRedacted: string[];
|
|
@@ -77,6 +77,7 @@ export interface ActionRecord {
|
|
|
77
77
|
schemaVersion: "1.0";
|
|
78
78
|
traceRef?: TraceRef;
|
|
79
79
|
updatedAt: string;
|
|
80
|
+
verificationStatus?: AicfActionVerificationState;
|
|
80
81
|
}
|
|
81
82
|
export interface ApprovalRecord {
|
|
82
83
|
approvalRecordId: string;
|
|
@@ -189,6 +190,7 @@ export interface CreateActionRecordInput {
|
|
|
189
190
|
runId: string;
|
|
190
191
|
traceRef?: TraceRef;
|
|
191
192
|
updatedAt?: string;
|
|
193
|
+
verificationStatus?: AicfActionVerificationState;
|
|
192
194
|
}
|
|
193
195
|
export interface CreateApprovalRecordInput {
|
|
194
196
|
approval?: AicfApprovalDecision;
|
|
@@ -236,6 +238,7 @@ export interface RuntimeActionLedgerInput {
|
|
|
236
238
|
result?: unknown;
|
|
237
239
|
runId: string;
|
|
238
240
|
traceRef?: TraceRef;
|
|
241
|
+
verificationStatus?: AicfActionVerificationState;
|
|
239
242
|
}
|
|
240
243
|
export interface RuntimeApprovalLedgerInput {
|
|
241
244
|
approval?: AicfApprovalDecision;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/audit/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAElB,cAAc,EACd,QAAQ,EACT,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,mBAAmB,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,QAAQ,CAAC;IACxB,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB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AC,GAAG,YAAY,CAAC;CACpG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AicfApprovalDecision, AicfApprovalStore, AicfAuditEvent, AicfAuditSink, AicfIdempotencyStore, AicfPreparedAction, AicfPreparedActionStore, AicfPreparedActionUpdateStateInput } from "../runtime/index.js";
|
|
2
2
|
import type { DynamoDbStoreOptions } from "./types.js";
|
|
3
3
|
export declare class DynamoDbPreparedActionStore implements AicfPreparedActionStore {
|
|
4
4
|
private client;
|
|
@@ -6,12 +6,7 @@ export declare class DynamoDbPreparedActionStore implements AicfPreparedActionSt
|
|
|
6
6
|
constructor(options: DynamoDbStoreOptions);
|
|
7
7
|
create(action: AicfPreparedAction): Promise<void>;
|
|
8
8
|
get(preparedActionId: string): Promise<AicfPreparedAction | undefined>;
|
|
9
|
-
updateState(input:
|
|
10
|
-
expectedState?: AicfActionState;
|
|
11
|
-
nextState: AicfActionState;
|
|
12
|
-
preparedActionId: string;
|
|
13
|
-
updatedAt: string;
|
|
14
|
-
}): Promise<void>;
|
|
9
|
+
updateState(input: AicfPreparedActionUpdateStateInput): Promise<void>;
|
|
15
10
|
}
|
|
16
11
|
export declare class DynamoDbApprovalStore implements AicfApprovalStore {
|
|
17
12
|
private client;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamodb-stores.d.ts","sourceRoot":"","sources":["../../src/aws/dynamodb-stores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"dynamodb-stores.d.ts","sourceRoot":"","sources":["../../src/aws/dynamodb-stores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,kCAAkC,EACnC,MAAM,qBAAqB,CAAC;AAa7B,OAAO,KAAK,EAAiB,oBAAoB,EAAE,MAAM,YAAY,CAAC;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,QAAQ,CAAC,KAAK,EAAE;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,IAAI,CAAC;CA+BlB;AAED,qBAAa,iBAAkB,YAAW,aAAa;IACrD,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,OAAO,CAAuB;gBAE1B,OAAO,EAAE,oBAAoB;IAKnC,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAMlD"}
|
|
@@ -24,25 +24,64 @@ export class DynamoDbPreparedActionStore {
|
|
|
24
24
|
if (!item) {
|
|
25
25
|
throw new Error("Prepared action was not found.");
|
|
26
26
|
}
|
|
27
|
+
const expressionAttributeNames = {
|
|
28
|
+
"#payload": "payload",
|
|
29
|
+
"#state": "state"
|
|
30
|
+
};
|
|
27
31
|
const expressionAttributeValues = {
|
|
28
32
|
":nextState": input.nextState,
|
|
29
33
|
":updatedAt": input.updatedAt
|
|
30
34
|
};
|
|
35
|
+
const setClauses = [
|
|
36
|
+
"#state = :nextState",
|
|
37
|
+
"updatedAt = :updatedAt",
|
|
38
|
+
"#payload.#state = :nextState",
|
|
39
|
+
"#payload.updatedAt = :updatedAt"
|
|
40
|
+
];
|
|
41
|
+
addOptionalPreparedActionUpdate({
|
|
42
|
+
expressionAttributeNames,
|
|
43
|
+
expressionAttributeValues,
|
|
44
|
+
input,
|
|
45
|
+
name: "committedActionId",
|
|
46
|
+
setClauses,
|
|
47
|
+
token: "committedActionId"
|
|
48
|
+
});
|
|
49
|
+
addOptionalPreparedActionUpdate({
|
|
50
|
+
expressionAttributeNames,
|
|
51
|
+
expressionAttributeValues,
|
|
52
|
+
input,
|
|
53
|
+
name: "committedAt",
|
|
54
|
+
setClauses,
|
|
55
|
+
token: "committedAt"
|
|
56
|
+
});
|
|
57
|
+
addOptionalPreparedActionUpdate({
|
|
58
|
+
expressionAttributeNames,
|
|
59
|
+
expressionAttributeValues,
|
|
60
|
+
input,
|
|
61
|
+
name: "commitResultHash",
|
|
62
|
+
setClauses,
|
|
63
|
+
token: "commitResultHash"
|
|
64
|
+
});
|
|
65
|
+
addOptionalPreparedActionUpdate({
|
|
66
|
+
expressionAttributeNames,
|
|
67
|
+
expressionAttributeValues,
|
|
68
|
+
input,
|
|
69
|
+
name: "verification",
|
|
70
|
+
setClauses,
|
|
71
|
+
token: "verification"
|
|
72
|
+
});
|
|
31
73
|
if (input.expectedState) {
|
|
32
74
|
expressionAttributeValues[":expectedState"] = input.expectedState;
|
|
33
75
|
}
|
|
34
76
|
const commandInput = {
|
|
35
|
-
ExpressionAttributeNames:
|
|
36
|
-
"#payload": "payload",
|
|
37
|
-
"#state": "state"
|
|
38
|
-
},
|
|
77
|
+
ExpressionAttributeNames: expressionAttributeNames,
|
|
39
78
|
ExpressionAttributeValues: expressionAttributeValues,
|
|
40
79
|
Key: {
|
|
41
80
|
PK: item.PK,
|
|
42
81
|
SK: item.SK
|
|
43
82
|
},
|
|
44
83
|
TableName: this.options.tableName,
|
|
45
|
-
UpdateExpression:
|
|
84
|
+
UpdateExpression: `SET ${setClauses.join(", ")}`
|
|
46
85
|
};
|
|
47
86
|
if (input.expectedState) {
|
|
48
87
|
commandInput.ConditionExpression = "#state = :expectedState";
|
|
@@ -50,6 +89,18 @@ export class DynamoDbPreparedActionStore {
|
|
|
50
89
|
await this.client.send(await dynamoDbCommand("UpdateCommand", commandInput));
|
|
51
90
|
}
|
|
52
91
|
}
|
|
92
|
+
function addOptionalPreparedActionUpdate(input) {
|
|
93
|
+
const value = input.input[input.name];
|
|
94
|
+
if (value === undefined) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const nameToken = `#${input.token}`;
|
|
98
|
+
const valueToken = `:${input.token}`;
|
|
99
|
+
input.expressionAttributeNames[nameToken] = input.name;
|
|
100
|
+
input.expressionAttributeValues[valueToken] = value;
|
|
101
|
+
input.setClauses.push(`${nameToken} = ${valueToken}`);
|
|
102
|
+
input.setClauses.push(`#payload.${nameToken} = ${valueToken}`);
|
|
103
|
+
}
|
|
53
104
|
export class DynamoDbApprovalStore {
|
|
54
105
|
client;
|
|
55
106
|
options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/aws/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE9D,qBAAa,kBAAkB;IAC7B,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,EAAE,CAAM;IACtD,OAAO,CAAC,SAAS,CAAgC;gBAErC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAM;IAM/C,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAK/C;AAED,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,QAAQ,CAAC,KAAK,uCAA8C;IAE7C,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/aws/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE9D,qBAAa,kBAAkB;IAC7B,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,EAAE,CAAM;IACtD,OAAO,CAAC,SAAS,CAAgC;gBAErC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAM;IAM/C,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAK/C;AAED,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,QAAQ,CAAC,KAAK,uCAA8C;IAE7C,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAsExD;AAED,qBAAa,uBAAwB,SAAQ,kBAAkB;IAC7D,OAAO,CAAC,gBAAgB,CAAK;IAEd,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAWxD;AAED,qBAAa,qBAAsB,SAAQ,kBAAkB;CAAG;AAEhE,qBAAa,oBAAqB,SAAQ,kBAAkB;CAAG;AAE/D,qBAAa,wBAAyB,SAAQ,kBAAkB;CAAG;AAEnE,qBAAa,aAAc,SAAQ,kBAAkB;IACpC,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAUxD"}
|
package/dist/aws/testing.js
CHANGED
|
@@ -55,6 +55,15 @@ export class FakeDynamoDbDocumentClient extends RecordingAwsClient {
|
|
|
55
55
|
item.payload.updatedAt = values[":updatedAt"];
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
for (const name of ["committedActionId", "committedAt", "commitResultHash", "verification"]) {
|
|
59
|
+
const value = values[`:${name}`];
|
|
60
|
+
if (value !== undefined) {
|
|
61
|
+
item[name] = clone(value);
|
|
62
|
+
if (isRecord(item.payload)) {
|
|
63
|
+
item.payload[name] = clone(value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
58
67
|
if (values[":result"]) {
|
|
59
68
|
item.result = clone(values[":result"]);
|
|
60
69
|
item.completedAt = values[":completedAt"];
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
interface WritableLike {
|
|
3
|
-
write(message: string): unknown;
|
|
4
|
-
}
|
|
5
2
|
export interface CliRunOptions {
|
|
6
|
-
stderr?:
|
|
7
|
-
|
|
3
|
+
stderr?: {
|
|
4
|
+
write(message: string): unknown;
|
|
5
|
+
};
|
|
6
|
+
stdout?: {
|
|
7
|
+
write(message: string): unknown;
|
|
8
|
+
};
|
|
8
9
|
}
|
|
9
10
|
export declare function runCli(argv: string[], options?: CliRunOptions): Promise<number>;
|
|
10
|
-
export {};
|
|
11
11
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAuGA,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAC7C,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAC9C;AA4BD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsRzF"}
|