ai-capability-framework 1.1.0-rc.1 → 1.1.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 +14 -0
- package/README.md +21 -37
- package/ROADMAP.md +10 -7
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +7 -1
- package/dist/discovery/index.d.ts +1 -1
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/index.js +1 -1
- package/docs/api/public-api-policy.md +9 -6
- package/docs/api/stable-workflow.md +58 -0
- package/docs/development.md +22 -0
- package/docs/discovery.md +9 -14
- package/docs/evals/discovery-qualification.md +5 -0
- package/docs/getting-started/installation.md +11 -12
- package/docs/getting-started/openai-quickstart.md +16 -5
- package/docs/getting-started/provider-neutral-quickstart.md +247 -88
- package/docs/getting-started/quickstart.md +8 -30
- package/docs/index.md +5 -4
- package/docs/release.md +13 -9
- package/docs/runtime.md +5 -0
- package/docs/start-here.md +23 -134
- package/examples/12-capability-discovery-selection/README.md +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable public changes to AI Capability Framework are documented here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 1.1.0 - 2026-10-17
|
|
8
|
+
|
|
9
|
+
- Fixed the installed CLI's POSIX symlink entrypoint so `npx aicf` runs commands instead
|
|
10
|
+
of silently returning. Programmatic CLI imports remain side-effect-free.
|
|
11
|
+
|
|
12
|
+
- Stabilized the recommended lexical/native search-to-tool workflow and its named
|
|
13
|
+
runtime/provider contracts. Advanced APIs retain their documented maturity; hybrid
|
|
14
|
+
remains experimental and dedicated selection optional.
|
|
15
|
+
- Made installed-package onboarding primary, with a complete manifest and mock app
|
|
16
|
+
checked directly from the published documentation in fresh consumers.
|
|
17
|
+
- Corrected obsolete checkout-only guidance and a nonexistent registry-helper import.
|
|
18
|
+
Retrieval behavior, authorization, approval boundaries and model configuration are
|
|
19
|
+
unchanged. Frozen qualification evidence is reused without new live trials.
|
|
20
|
+
|
|
7
21
|
## 1.1.0-rc.1 - 2026-10-17
|
|
8
22
|
|
|
9
23
|
- Published discovery as release-candidate public, with lexical retrieval and ordinary
|
package/README.md
CHANGED
|
@@ -110,40 +110,23 @@ In plain terms:
|
|
|
110
110
|
|
|
111
111
|
## Try It
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
Start in a new project:
|
|
114
114
|
|
|
115
|
-
```
|
|
116
|
-
npm
|
|
117
|
-
npm
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Build the CLI and inspect the example registry:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
npm run build
|
|
124
|
-
node dist/cli.js inspect examples
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Export OpenAI Responses function tools without calling a model:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
node dist/cli.js openai-tools examples --context examples/support/openai/context.support_agent.json
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Run the public mock runtime flow:
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
node examples/runtime-support-billing/run-mock.mjs
|
|
115
|
+
```sh
|
|
116
|
+
npm init -y
|
|
117
|
+
npm install ai-capability-framework
|
|
118
|
+
node node_modules/ai-capability-framework/examples/12-capability-discovery-selection/run-customer-mock.mjs
|
|
137
119
|
```
|
|
138
120
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
node dist/cli.js eval examples --results examples/eval-results/public.results.passing.json
|
|
143
|
-
```
|
|
121
|
+
The mock flow reads a ticket, carries its order ID into refund preparation, and returns
|
|
122
|
+
a preview awaiting approval. It exposes no commit and makes no real provider calls. No
|
|
123
|
+
repository checkout, framework build or optional provider SDK is required.
|
|
144
124
|
|
|
145
|
-
|
|
146
|
-
[
|
|
125
|
+
Follow the
|
|
126
|
+
[complete first-app walkthrough](docs/getting-started/provider-neutral-quickstart.md) to
|
|
127
|
+
author a capability, load a registry, register a handler and use the stable
|
|
128
|
+
lexical/native workflow. [Repository development](docs/development.md) has separate
|
|
129
|
+
build and validation commands.
|
|
147
130
|
|
|
148
131
|
## Documentation Map
|
|
149
132
|
|
|
@@ -300,10 +283,10 @@ MIT
|
|
|
300
283
|
|
|
301
284
|
## Find capabilities for a task
|
|
302
285
|
|
|
303
|
-
Install the
|
|
286
|
+
Install the stable framework:
|
|
304
287
|
|
|
305
288
|
```sh
|
|
306
|
-
npm install ai-capability-framework
|
|
289
|
+
npm install ai-capability-framework
|
|
307
290
|
```
|
|
308
291
|
|
|
309
292
|
Lexical retrieval with the ordinary model/tool loop is the recommended default. The
|
|
@@ -311,11 +294,12 @@ Lexical retrieval with the ordinary model/tool loop is the recommended default.
|
|
|
311
294
|
results and the unmet hybrid incremental-gain gate. Hybrid remains experimental and
|
|
312
295
|
opt-in; dedicated selection remains optional.
|
|
313
296
|
|
|
314
|
-
Use the
|
|
315
|
-
application AI decomposes a customer
|
|
316
|
-
|
|
317
|
-
registry, task IDs/text, and
|
|
318
|
-
|
|
297
|
+
Use the [stable lexical/native workflow](docs/api/stable-workflow.md) and optional
|
|
298
|
+
[discovery API](docs/discovery.md) when your application AI decomposes a customer
|
|
299
|
+
request into tasks. Search each ready task and pass its result-bound router to the
|
|
300
|
+
ordinary model/tool loop. Lexical search needs only a registry, task IDs/text, and
|
|
301
|
+
existing runtime context. Hybrid retrieval and dedicated selection are optional and
|
|
302
|
+
require caller-supplied model access and budgets.
|
|
319
303
|
|
|
320
304
|
Run the
|
|
321
305
|
[complete customer-request example](examples/12-capability-discovery-selection/README.md)
|
package/ROADMAP.md
CHANGED
|
@@ -27,11 +27,14 @@ systems, credentials, side effects, and deployment.
|
|
|
27
27
|
|
|
28
28
|
## Capability Discovery
|
|
29
29
|
|
|
30
|
-
The
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
The stable lexical/native workflow supports application-produced tasks, eligible
|
|
31
|
+
shortlists, and ordinary model tool selection. Hybrid retrieval and dedicated selection
|
|
32
|
+
remain explicit. No-key examples, a frozen synthetic dataset, and packed consumer checks
|
|
33
|
+
cover integration. The tested synthetic configuration qualifies both lexical modes after
|
|
34
|
+
an offline wording correction. Lexical/native is recommended; hybrid remains
|
|
35
|
+
experimental because incremental benefit was not qualified. See the
|
|
36
36
|
[qualification report](docs/evals/discovery-qualification.md). Application-specific
|
|
37
|
-
qualification and adoption remain separate from
|
|
37
|
+
qualification and adoption remain separate from framework publication. Normal npm
|
|
38
|
+
installation includes the stable workflow; advanced features retain their own maturity
|
|
39
|
+
labels. The active framework roadmap is complete when installed-package usability and
|
|
40
|
+
verified stable publication pass; application migrations are outside its scope.
|
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":";AAwGA,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,CA+SzF"}
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { realpathSync } from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
5
6
|
import YAML from "yaml";
|
|
@@ -2165,5 +2166,10 @@ function isDirectCliRun() {
|
|
|
2165
2166
|
if (!invokedPath) {
|
|
2166
2167
|
return false;
|
|
2167
2168
|
}
|
|
2168
|
-
|
|
2169
|
+
try {
|
|
2170
|
+
return realpathSync(invokedPath) === realpathSync(fileURLToPath(import.meta.url));
|
|
2171
|
+
}
|
|
2172
|
+
catch {
|
|
2173
|
+
return false;
|
|
2174
|
+
}
|
|
2169
2175
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Stable lexical/native facade; advanced APIs retain their documented maturity. */
|
|
2
2
|
export { ModelCapabilitySelector } from "./selection.js";
|
|
3
3
|
export { buildCapabilitySelectionTasks } from "./selection-cards.js";
|
|
4
4
|
export type { BuildCapabilitySelectionTasksRequest } from "./selection-cards.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,YAAY,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AACjF,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACpF,YAAY,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,mCAAmC,EAChG,uBAAuB,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,gCAAgC,EAAE,iCAAiC,EAAE,6BAA6B,EAClG,4BAA4B,EAAE,+BAA+B,EAC9D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EACV,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,8BAA8B,EAC9B,oCAAoC,EACpC,mCAAmC,EACnC,6BAA6B,EAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,+BAA+B,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC/G,YAAY,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACzH,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACxG,YAAY,EACV,eAAe,EACf,6BAA6B,EAC7B,4BAA4B,EAC5B,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,qCAAqC,EACrC,oCAAoC,EACpC,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,4BAA4B,EAC5B,aAAa,EACb,eAAe,EACf,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,8BAA8B,EAC9B,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AACxI,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC1G,YAAY,EAAE,gCAAgC,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAEpH,OAAO,EAAE,2BAA2B,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AACnG,YAAY,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,kCAAkC,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/discovery/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Stable lexical/native facade; advanced APIs retain their documented maturity. */
|
|
2
2
|
export { ModelCapabilitySelector } from "./selection.js";
|
|
3
3
|
export { buildCapabilitySelectionTasks } from "./selection-cards.js";
|
|
4
4
|
export { createCapabilityDiscovery, DISCOVERY_STANDARD_PROFILE } from "./facade.js";
|
|
@@ -47,12 +47,15 @@ cloud, tracing, or CLI implementation dependencies.
|
|
|
47
47
|
| CLI implementation helpers other than `runCli` and `CliRunOptions` | should move to subpath | Keep private to the CLI module unless a future release documents a narrow public contract. |
|
|
48
48
|
| Undocumented source files, generated internals, and private helper functions | should be removed before v1 | Do not expose through package exports. |
|
|
49
49
|
|
|
50
|
-
The
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
The [named lexical/native workflow](stable-workflow.md) is **stable public from 1.1.0**,
|
|
51
|
+
including its documented runtime/provider dependencies. Member-specific classifications
|
|
52
|
+
override the broad subpath rows above; they do not stabilize every export in those
|
|
53
|
+
modules. Advanced discovery remains **release-candidate public** and hybrid remains
|
|
54
|
+
experimental. It contains the documented facade, advanced
|
|
55
|
+
retrieval/index/selection/replay contracts, budget helper, and evaluation API. Provider
|
|
56
|
+
adapters stay in their existing subpaths. Discovery is optional and adds no
|
|
57
|
+
implementation dependency to root/runtime imports. Its interface classification does not
|
|
58
|
+
establish real-model retrieval quality. See [capability discovery](../discovery.md).
|
|
56
59
|
|
|
57
60
|
## Migration Note For Release-Candidate Users
|
|
58
61
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Stable search-to-tool workflow
|
|
2
|
+
|
|
3
|
+
Starting with 1.1.0, the recommended lexical/native integration is a **stable public
|
|
4
|
+
contract**. Compatible updates preserve the documented imports, request/result fields
|
|
5
|
+
and behavior below. Removing or incompatibly changing these contracts requires a major
|
|
6
|
+
version. Additive fields and new diagnostics may appear; consumers should tolerate them.
|
|
7
|
+
|
|
8
|
+
This commitment applies to the named members and configurations, not every export in a
|
|
9
|
+
mixed-maturity subpath. It does not guarantee retrieval accuracy for your application.
|
|
10
|
+
See the [tested qualification and limits](../evals/discovery-qualification.md).
|
|
11
|
+
|
|
12
|
+
## Stable members
|
|
13
|
+
|
|
14
|
+
| Surface | Stable members and supported use |
|
|
15
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| Core | Existing manifest loading, validation, registry and descriptor contracts, including `loadManifests`, `validateManifests`, `buildRegistry` and `toOpenAIResponsesToolName`. |
|
|
17
|
+
| Discovery | `createCapabilityDiscovery` in lexical mode; `search`; `routerFor(result)` using the issued discovery result. |
|
|
18
|
+
| Discovery types | The lexical fields of `CapabilityDiscoveryOptions`; `CapabilitySearchRequest`, `CapabilityDiscoveryEligibility`, `CapabilityDiscoveryResult`, `RankedCapabilityCandidate`, `CapabilityResultRouter` and their documented standard diagnostics, usage and binding fields. Advanced fields/overloads retain the status below. |
|
|
19
|
+
| Runtime context and routing | `AicfRuntimeContext`, `DefaultContextBuilder`, `AicfContextBuilder`, `AicfCapabilityRouter`, `CapabilityRouteRequest`, `CapabilitySlice` and the tool-execution request/result contracts used by the walkthrough. |
|
|
20
|
+
| Runtime execution | Construction and the demonstrated `register`, `get`, `execute`, `evaluate` and `prepare` operations on `AicfHandlerRegistry`, `AicfToolExecutor`, `AicfActionLifecycleManager` and `DefaultPolicyBroker`; preparation/preview and approval requirements remain supported. Commit/approval administration is outside this newly stabilized subset. |
|
|
21
|
+
| Reference stores | The approval, idempotency and prepared-action interfaces and `InMemoryApprovalStore`, `InMemoryIdempotencyStore`, `InMemoryPreparedActionStore` used by the read/prepare recipe. These implementations are single-process examples, not durable production storage. |
|
|
22
|
+
| Ordinary OpenAI-compatible runner | `runOpenAIResponses` with the lexical result router and the basic fields of `AicfOpenAIRunRequest`, `AicfOpenAIRunResult`, `AicfOpenAIResponsesClient`; `MockOpenAIResponsesClient`, `mockFunctionCallResponse` and `mockTextResponse` for deterministic tests. Other provider adapters keep their existing classification. |
|
|
23
|
+
|
|
24
|
+
## Behavior you can rely on
|
|
25
|
+
|
|
26
|
+
- The minimal discovery configuration needs only a registry. Search accepts ordered task
|
|
27
|
+
IDs/text and existing runtime context, with the documented context-builder,
|
|
28
|
+
eligibility, controls, cancellation and earlier-deadline options.
|
|
29
|
+
- Default retrieval is lexical, bounded to eight candidates with positive-score
|
|
30
|
+
admission, no alias bonus/diversity and a 30-second deadline shortened by the caller.
|
|
31
|
+
Search purchases no provider work and never enables hybrid or dedicated selection.
|
|
32
|
+
- Results preserve task identity and input order. `matched`, `no_match`, `unavailable`
|
|
33
|
+
and `cancelled` remain distinct. Invalid caller input produces `DiscoveryError`;
|
|
34
|
+
operational outcomes do not choose a fallback candidate automatically.
|
|
35
|
+
- Result-bound routers reuse the issued shortlist without ranking or embedding again.
|
|
36
|
+
They reject foreign/reconstructed results and revalidate task, invocation, source,
|
|
37
|
+
eligibility, controls, cancellation and deadline before export and dispatch.
|
|
38
|
+
- Runtime validation and authorization govern execution. Preparation can produce a
|
|
39
|
+
preview requiring approval; model-facing routers never expose commit operations.
|
|
40
|
+
- Unknown usage remains distinguishable from zero. Fingerprints are opaque, versioned
|
|
41
|
+
compatibility bindings, not confidence estimates or durable request handles.
|
|
42
|
+
|
|
43
|
+
Applications own decomposition, dependencies, argument completion, authentication,
|
|
44
|
+
handler resource access checks and customer responses. No model, credentials, prices,
|
|
45
|
+
production database or authorization service is supplied.
|
|
46
|
+
|
|
47
|
+
## Advanced features retain their boundaries
|
|
48
|
+
|
|
49
|
+
Dedicated selection is optional and its advanced selector contracts remain
|
|
50
|
+
release-candidate public. Hybrid retrieval is **experimental and opt-in**, including
|
|
51
|
+
index/client configuration; its incremental-gain qualification gate was not met. Custom
|
|
52
|
+
rankers, low-level discovery/index APIs, selection-batch routing, shared provider runs,
|
|
53
|
+
tracing, replay and evaluation retain their existing documented maturity. Their presence
|
|
54
|
+
on the same facade or subpath does not promote them automatically.
|
|
55
|
+
|
|
56
|
+
Start with the
|
|
57
|
+
[installed-package walkthrough](../getting-started/provider-neutral-quickstart.md). The
|
|
58
|
+
[API policy](public-api-policy.md) describes the remaining surfaces.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Repository development
|
|
2
|
+
|
|
3
|
+
Package users should start with the
|
|
4
|
+
[installed-package quickstart](getting-started/provider-neutral-quickstart.md). You do
|
|
5
|
+
not need a checkout, TypeScript compiler or provider SDK to run its mock flow.
|
|
6
|
+
|
|
7
|
+
For work on the framework itself, clone the public repository and run from its root:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm ci
|
|
11
|
+
npm run check:generated
|
|
12
|
+
npm run build
|
|
13
|
+
npm run validate
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Use `VITEST_MAX_WORKERS=2` when running `npm run check` or certification, as configured
|
|
17
|
+
in CI. Framework development checks are provider-free; live evaluation requires an
|
|
18
|
+
explicit opt-in and separate model access/budget. See [release checks](release.md).
|
|
19
|
+
|
|
20
|
+
The repository currently validates 16 manifests and 21 recognized fixtures. Additional
|
|
21
|
+
capabilities inside evaluation fixtures do not expand the normal manifest inventory.
|
|
22
|
+
Generated docs, tarballs and local evidence belong in ignored or temporary paths.
|
package/docs/discovery.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Find capabilities for a task
|
|
2
2
|
|
|
3
|
-
Install
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Install with `npm install ai-capability-framework`. The lexical/native workflow is
|
|
4
|
+
[stable public from 1.1.0](api/stable-workflow.md) and is the recommended default. For a
|
|
5
|
+
complete first app, use the
|
|
6
|
+
[installed-package quickstart](getting-started/provider-neutral-quickstart.md).
|
|
6
7
|
|
|
7
8
|
```ts
|
|
8
9
|
import { createCapabilityDiscovery } from "ai-capability-framework/discovery";
|
|
@@ -27,14 +28,14 @@ returns a shortlist → ordinary model/tool loop chooses → runtime validates a
|
|
|
27
28
|
executes**. Applications own decomposition, task dependencies, argument completion, and
|
|
28
29
|
customer responses. Search each dependent task when its context is ready.
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
The named lexical/native facade is **stable public**. Advanced discovery APIs retain
|
|
32
|
+
their [individual maturity labels](api/stable-workflow.md). Discovery does not change
|
|
31
33
|
`DefaultCapabilityRouter`. Results contain eligible candidates, scores, diagnostics,
|
|
32
34
|
usage, and version bindings. A useful shortlist is the goal; neither ranking first nor a
|
|
33
35
|
high score authorizes execution or guarantees a suitable tool.
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
new npm version.
|
|
37
|
+
The stable npm package includes this subpath; no checkout, framework build or locally
|
|
38
|
+
packed tarball is required.
|
|
38
39
|
|
|
39
40
|
## Defaults and result handling
|
|
40
41
|
|
|
@@ -62,13 +63,7 @@ operations are never exposed through discovery routers.
|
|
|
62
63
|
|
|
63
64
|
## Complete no-key example
|
|
64
65
|
|
|
65
|
-
Run from
|
|
66
|
-
|
|
67
|
-
```sh
|
|
68
|
-
node examples/12-capability-discovery-selection/run-customer-mock.mjs
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
For an installed package, run the packaged example from your project directory:
|
|
66
|
+
Run the packaged example from your project directory after installation:
|
|
72
67
|
|
|
73
68
|
```sh
|
|
74
69
|
node node_modules/ai-capability-framework/examples/12-capability-discovery-selection/run-customer-mock.mjs
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Discovery qualification for 1.1.0-rc.1
|
|
2
2
|
|
|
3
|
+
Stable 1.1.0 reuses these frozen observations without new live trials or retrieval
|
|
4
|
+
changes. The [named lexical/native workflow](../api/stable-workflow.md) now has a stable
|
|
5
|
+
compatibility commitment; the historical prerelease classification below describes the
|
|
6
|
+
assessed release. Hybrid qualification is unchanged.
|
|
7
|
+
|
|
3
8
|
Lexical retrieval with ordinary model tool selection (**lexical/native**) is the
|
|
4
9
|
recommended default. Lexical/dedicated also qualified for the tested configuration; it
|
|
5
10
|
remains an optional additional model call. Hybrid/native and hybrid/dedicated remain
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
# Installation
|
|
2
2
|
|
|
3
|
-
Install the
|
|
3
|
+
Use Node.js 20, 22 or 24. Install the stable package in your application:
|
|
4
4
|
|
|
5
|
-
```
|
|
5
|
+
```sh
|
|
6
6
|
npm install ai-capability-framework
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Version 1.1.0 includes the stable lexical/native search-to-tool workflow. The
|
|
10
|
+
[complete quickstart](provider-neutral-quickstart.md) runs with deterministic mocks,
|
|
11
|
+
without a provider SDK, API key, repository checkout or framework build.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
npm run build
|
|
14
|
-
npm run validate
|
|
15
|
-
```
|
|
13
|
+
Live calls require caller-supplied model access and explicit configuration. Optional
|
|
14
|
+
SDKs are installed only when your chosen provider integration needs them.
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
guides.
|
|
16
|
+
For reproducible deployments, pin the tested version in your lockfile. Existing
|
|
17
|
+
prereleases remain available by explicit version; `next` is a separate channel.
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
[Framework repository development](../development.md) has separate install/build/check
|
|
20
|
+
commands.
|
|
@@ -20,28 +20,39 @@ npm install openai
|
|
|
20
20
|
Root and runtime imports remain lightweight:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
loadManifests,
|
|
25
|
+
validateManifests,
|
|
26
|
+
buildRegistry
|
|
27
|
+
} from "ai-capability-framework";
|
|
24
28
|
import { runOpenAIResponses } from "ai-capability-framework/openai";
|
|
25
29
|
```
|
|
26
30
|
|
|
31
|
+
Load and validate your manifests with `loadManifests` and `validateManifests`, then pass
|
|
32
|
+
them to `buildRegistry`; the [complete quickstart](provider-neutral-quickstart.md) shows
|
|
33
|
+
runnable code.
|
|
34
|
+
|
|
27
35
|
## Mock-Tested Flow
|
|
28
36
|
|
|
29
|
-
Run the
|
|
37
|
+
Run the installed no-key customer flow:
|
|
30
38
|
|
|
31
39
|
```bash
|
|
32
|
-
|
|
40
|
+
node node_modules/ai-capability-framework/examples/12-capability-discovery-selection/run-customer-mock.mjs
|
|
33
41
|
```
|
|
34
42
|
|
|
35
43
|
Expected output excerpt:
|
|
36
44
|
|
|
37
45
|
```text
|
|
38
|
-
|
|
46
|
+
"ordinaryModelTurns": 4
|
|
39
47
|
```
|
|
40
48
|
|
|
41
49
|
The OpenAI runtime exports only routed read/prepare tools. Commit tools remain
|
|
42
50
|
host-controlled through AICF action lifecycle APIs.
|
|
43
51
|
|
|
44
|
-
##
|
|
52
|
+
## Repository development and live opt-in
|
|
53
|
+
|
|
54
|
+
The commands below are for an optional [framework source checkout](../development.md).
|
|
55
|
+
Normal package consumers supply their own configured client and explicit model.
|
|
45
56
|
|
|
46
57
|
Live tests are skipped unless you explicitly opt in:
|
|
47
58
|
|
|
@@ -1,106 +1,265 @@
|
|
|
1
1
|
# Provider-Neutral Quickstart
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Start in an empty project with Node.js 20, 22 or 24 and npm. This walkthrough uses
|
|
4
|
+
synthetic data and a deterministic mock model: no API key, provider SDK, source checkout
|
|
5
|
+
or framework build is required.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 1. Install
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## 1. Install And Build
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npm ci
|
|
18
|
-
npm run build
|
|
9
|
+
```sh
|
|
10
|
+
mkdir aicf-example
|
|
11
|
+
cd aicf-example
|
|
12
|
+
npm init -y
|
|
13
|
+
npm install ai-capability-framework
|
|
19
14
|
```
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
The stable package includes discovery. Your ordinary model/tool loop chooses among
|
|
17
|
+
eligible tools; lexical discovery makes no model or embedding calls.
|
|
18
|
+
|
|
19
|
+
## 2. Describe your capability
|
|
20
|
+
|
|
21
|
+
Create a `capabilities` directory. Save this as `capabilities/ticket.json`:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"schema_version": "1.0",
|
|
26
|
+
"id": "support.ticket.get",
|
|
27
|
+
"version": "1.0.0",
|
|
28
|
+
"status": "active",
|
|
29
|
+
"name": "Read support ticket",
|
|
30
|
+
"summary": "Read a support ticket by ticket ID.",
|
|
31
|
+
"model_description": "Read a synthetic ticket the current user is allowed to view. Does not change data.",
|
|
32
|
+
"capability_type": "read_data",
|
|
33
|
+
"autonomy_tier": "A1",
|
|
34
|
+
"risk_tier": "low",
|
|
35
|
+
"input_schema": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["ticket_id"],
|
|
39
|
+
"properties": { "ticket_id": { "type": "string", "pattern": "^TCK-[0-9]+$" } }
|
|
40
|
+
},
|
|
41
|
+
"output_schema": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["ticket_id", "status"],
|
|
45
|
+
"properties": { "ticket_id": { "type": "string" }, "status": { "type": "string" } }
|
|
46
|
+
},
|
|
47
|
+
"side_effects": {
|
|
48
|
+
"reads_data": true,
|
|
49
|
+
"writes_data": false,
|
|
50
|
+
"creates_records": false,
|
|
51
|
+
"updates_records": false,
|
|
52
|
+
"deletes_records": false,
|
|
53
|
+
"sends_external_messages": false,
|
|
54
|
+
"charges_money": false,
|
|
55
|
+
"refunds_money": false,
|
|
56
|
+
"changes_permissions": false,
|
|
57
|
+
"triggers_external_workflow": false,
|
|
58
|
+
"irreversible": false
|
|
59
|
+
},
|
|
60
|
+
"authorization": {
|
|
61
|
+
"permissions": ["ticket.read"],
|
|
62
|
+
"tenant_scoped": true,
|
|
63
|
+
"requires_user_context": true
|
|
64
|
+
},
|
|
65
|
+
"policy": { "approval_required": false, "max_autonomy_tier": "A1" },
|
|
66
|
+
"lifecycle": {
|
|
67
|
+
"prepare": false,
|
|
68
|
+
"preview": false,
|
|
69
|
+
"approve": false,
|
|
70
|
+
"commit": false,
|
|
71
|
+
"verify": false,
|
|
72
|
+
"audit": true
|
|
73
|
+
},
|
|
74
|
+
"observability": { "log_inputs": "redacted", "log_outputs": "summary" }
|
|
75
|
+
}
|
|
26
76
|
```
|
|
27
77
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
78
|
+
The manifest describes the contract; your handler supplies the implementation.
|
|
79
|
+
Production identity and permissions must come from trusted host authentication. Handlers
|
|
80
|
+
must enforce access to the requested resource within that tenant.
|
|
81
|
+
|
|
82
|
+
## 3. Load, discover and execute
|
|
83
|
+
|
|
84
|
+
Save this as `app.mjs`:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
import {
|
|
88
|
+
buildRegistry,
|
|
89
|
+
loadManifests,
|
|
90
|
+
validateManifests,
|
|
91
|
+
toOpenAIResponsesToolName
|
|
92
|
+
} from "ai-capability-framework";
|
|
93
|
+
import { createCapabilityDiscovery } from "ai-capability-framework/discovery";
|
|
94
|
+
import {
|
|
95
|
+
AicfHandlerRegistry,
|
|
96
|
+
AicfToolExecutor,
|
|
97
|
+
AicfActionLifecycleManager,
|
|
98
|
+
DefaultContextBuilder,
|
|
99
|
+
DefaultPolicyBroker,
|
|
100
|
+
InMemoryApprovalStore,
|
|
101
|
+
InMemoryIdempotencyStore,
|
|
102
|
+
InMemoryPreparedActionStore
|
|
103
|
+
} from "ai-capability-framework/runtime";
|
|
104
|
+
import {
|
|
105
|
+
MockOpenAIResponsesClient,
|
|
106
|
+
mockFunctionCallResponse,
|
|
107
|
+
mockTextResponse,
|
|
108
|
+
runOpenAIResponses
|
|
109
|
+
} from "ai-capability-framework/openai";
|
|
110
|
+
|
|
111
|
+
const loaded = await loadManifests({ path: "capabilities" });
|
|
112
|
+
if (loaded.errors.length || !validateManifests(loaded.manifests).valid) {
|
|
113
|
+
throw new Error("Invalid capability manifests.");
|
|
114
|
+
}
|
|
115
|
+
const registry = buildRegistry(loaded.manifests);
|
|
116
|
+
// Synthetic identity for this mock only. Production identity comes from your host.
|
|
117
|
+
const runtimeContext = {
|
|
118
|
+
environment: "test",
|
|
119
|
+
runId: "run_example",
|
|
120
|
+
requestId: "request_example",
|
|
121
|
+
startedAt: new Date().toISOString(),
|
|
122
|
+
account: { accountId: "account_example", tenantId: "tenant_example" },
|
|
123
|
+
subject: {
|
|
124
|
+
actorType: "user",
|
|
125
|
+
userId: "user_example",
|
|
126
|
+
roles: [],
|
|
127
|
+
permissions: ["ticket.read"]
|
|
128
|
+
},
|
|
129
|
+
autonomy: {
|
|
130
|
+
autonomyTier: "A1",
|
|
131
|
+
maxRiskTier: "low",
|
|
132
|
+
allowSideEffects: false,
|
|
133
|
+
allowExternalMessages: false,
|
|
134
|
+
allowMoneyMovement: false,
|
|
135
|
+
allowPermissionChanges: false
|
|
136
|
+
},
|
|
137
|
+
facts: {},
|
|
138
|
+
metadata: {}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
// Set up the existing runtime once. These example stores live in one process.
|
|
142
|
+
const handlers = new AicfHandlerRegistry({ registry });
|
|
143
|
+
let reads = 0;
|
|
144
|
+
handlers.register({
|
|
145
|
+
capabilityId: "support.ticket.get",
|
|
146
|
+
read: ({ args }) => {
|
|
147
|
+
reads += 1;
|
|
148
|
+
return { ticket_id: args.ticket_id, status: "open" };
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
const policyBroker = new DefaultPolicyBroker();
|
|
152
|
+
const actionLifecycle = new AicfActionLifecycleManager({
|
|
153
|
+
registry,
|
|
154
|
+
handlers,
|
|
155
|
+
policyBroker,
|
|
156
|
+
approvalStore: new InMemoryApprovalStore(),
|
|
157
|
+
idempotencyStore: new InMemoryIdempotencyStore(),
|
|
158
|
+
preparedActionStore: new InMemoryPreparedActionStore()
|
|
159
|
+
});
|
|
160
|
+
const executor = new AicfToolExecutor({
|
|
161
|
+
registry,
|
|
162
|
+
handlers,
|
|
163
|
+
policyBroker,
|
|
164
|
+
actionLifecycle
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
const task = { id: "read-ticket", text: "Read ticket TCK-100." };
|
|
168
|
+
const discovery = createCapabilityDiscovery({ registry });
|
|
169
|
+
const [result] = await discovery.search({ tasks: [task], runtimeContext });
|
|
170
|
+
if (result.status !== "matched")
|
|
171
|
+
throw new Error("No actionable shortlist; clarify or handle the failure.");
|
|
172
|
+
const client = new MockOpenAIResponsesClient([
|
|
173
|
+
mockFunctionCallResponse({
|
|
174
|
+
name: toOpenAIResponsesToolName("support.ticket.get"),
|
|
175
|
+
callId: "read_example",
|
|
176
|
+
args: { ticket_id: "TCK-100" }
|
|
177
|
+
}),
|
|
178
|
+
mockTextResponse("Ticket TCK-100 is open.")
|
|
179
|
+
]);
|
|
180
|
+
const loop = await runOpenAIResponses({
|
|
181
|
+
registry,
|
|
182
|
+
executor,
|
|
183
|
+
client,
|
|
184
|
+
model: "mock-model",
|
|
185
|
+
runtimeContext,
|
|
186
|
+
contextBuilder: new DefaultContextBuilder(),
|
|
187
|
+
userInput: { text: task.text },
|
|
188
|
+
router: discovery.routerFor(result),
|
|
189
|
+
maxToolCalls: 1,
|
|
190
|
+
maxTurns: 2
|
|
191
|
+
});
|
|
192
|
+
if (
|
|
193
|
+
loop.status !== "completed" ||
|
|
194
|
+
reads !== 1 ||
|
|
195
|
+
loop.toolResults[0]?.status !== "success"
|
|
196
|
+
) {
|
|
197
|
+
throw new Error("The mock read did not complete.");
|
|
198
|
+
}
|
|
199
|
+
console.log(
|
|
200
|
+
JSON.stringify(
|
|
201
|
+
{
|
|
202
|
+
queryId: result.queryId,
|
|
203
|
+
capabilityId: loop.toolCalls[0].capabilityId,
|
|
204
|
+
toolStatus: loop.toolResults[0].status,
|
|
205
|
+
data: loop.toolResults[0].data,
|
|
206
|
+
reads,
|
|
207
|
+
ordinaryModelTurns: client.requests.length,
|
|
208
|
+
discoveryProviderCalls: result.usage.totals.providerAttempts
|
|
209
|
+
},
|
|
210
|
+
null,
|
|
211
|
+
2
|
|
212
|
+
)
|
|
213
|
+
);
|
|
41
214
|
```
|
|
42
215
|
|
|
43
|
-
|
|
216
|
+
Run the installed CLI and app:
|
|
44
217
|
|
|
45
|
-
```
|
|
46
|
-
|
|
218
|
+
```sh
|
|
219
|
+
npx aicf validate capabilities
|
|
220
|
+
node app.mjs
|
|
47
221
|
```
|
|
48
222
|
|
|
49
|
-
|
|
223
|
+
The CLI validates one manifest. The app reports `queryId: "read-ticket"`,
|
|
224
|
+
`capabilityId: "support.ticket.get"`, `toolStatus: "success"`, one read, two mocked
|
|
225
|
+
ordinary-model turns and zero discovery-provider calls. The ticket is `TCK-100` with
|
|
226
|
+
status `open`. No real provider calls occur.
|
|
50
227
|
|
|
51
|
-
|
|
52
|
-
node dist/cli.js inspect examples
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Expected output excerpt:
|
|
56
|
-
|
|
57
|
-
```text
|
|
58
|
-
Capabilities:
|
|
59
|
-
- support.ticket.get
|
|
60
|
-
- support.refund.prepare_case
|
|
61
|
-
- support.refund.commit_case
|
|
62
|
-
```
|
|
228
|
+
## 4. Try the complete customer request
|
|
63
229
|
|
|
64
|
-
|
|
230
|
+
Run the packaged example from this same project:
|
|
65
231
|
|
|
66
|
-
```
|
|
67
|
-
node
|
|
232
|
+
```sh
|
|
233
|
+
node node_modules/ai-capability-framework/examples/12-capability-discovery-selection/run-customer-mock.mjs
|
|
68
234
|
```
|
|
69
235
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
[
|
|
100
|
-
routed AICF capability slice, but AICF validation and policy remain the authority.
|
|
101
|
-
|
|
102
|
-
Useful next steps:
|
|
103
|
-
|
|
104
|
-
- [OpenAI quickstart](openai-quickstart.md)
|
|
105
|
-
- [Anthropic quickstart](anthropic-quickstart.md)
|
|
106
|
-
- [Gemini quickstart](gemini-quickstart.md)
|
|
236
|
+
It models “Read ticket TCK-100 and prepare a refund for its order.” Application code
|
|
237
|
+
searches each ready task once, carries the authorized order ID to its dependent task,
|
|
238
|
+
then prepares a preview requiring approval. Expect one mocked planning turn, four
|
|
239
|
+
ordinary-model turns, one read, one preparation and zero commits. The customer response
|
|
240
|
+
explains that approval is still pending. Dependencies and response assembly belong to
|
|
241
|
+
the example application, not a framework workflow engine.
|
|
242
|
+
|
|
243
|
+
## Connect your model and application
|
|
244
|
+
|
|
245
|
+
Keep the same task text and invocation context when passing a result-bound router to
|
|
246
|
+
your ordinary runner. Do not reconstruct, persist or reuse results across requests.
|
|
247
|
+
Permissions, controls, source changes, cancellation and expiry are rechecked before
|
|
248
|
+
export and execution. A retrieval score never authorizes an action.
|
|
249
|
+
|
|
250
|
+
Replace the mock with your configured Responses-compatible client and an explicit model
|
|
251
|
+
when using `runOpenAIResponses`; the framework supplies no account, credentials or model
|
|
252
|
+
default. Existing configured clients need no additional discovery model. The optional
|
|
253
|
+
OpenAI SDK is needed only if your application chooses it. See the
|
|
254
|
+
[OpenAI quickstart](openai-quickstart.md) or
|
|
255
|
+
[choose another runtime](../providers/choose-a-runtime.md).
|
|
256
|
+
|
|
257
|
+
For `no_match`, clarify; for `unavailable` or `cancelled`, handle the operational
|
|
258
|
+
outcome. Do not execute the first candidate automatically. Lexical/native is
|
|
259
|
+
recommended. [Dedicated selection](../discovery.md#optional-dedicated-selection) is
|
|
260
|
+
optional; hybrid is experimental with
|
|
261
|
+
[qualification limits](../evals/discovery-qualification.md).
|
|
262
|
+
|
|
263
|
+
The [stable workflow contract](../api/stable-workflow.md) defines compatibility for this
|
|
264
|
+
path. Production authentication, resource access checks and durable stores remain
|
|
265
|
+
host-owned. [Repository development](../development.md) is separate from package use.
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
node examples/runtime-support-billing/run-mock.mjs
|
|
12
|
-
node dist/cli.js eval examples --results examples/eval-results/public.results.passing.json
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Expected output excerpts:
|
|
16
|
-
|
|
17
|
-
```text
|
|
18
|
-
Validated 16 manifest(s) and 18 fixture(s).
|
|
19
|
-
Manifests: 16 (6 capabilities, 4 entities, 6 evals)
|
|
20
|
-
approval_required
|
|
21
|
-
Eval suite passed
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
What this proves:
|
|
25
|
-
|
|
26
|
-
- manifests and fixtures validate;
|
|
27
|
-
- read/prepare tools can be exported without exposing commit tools;
|
|
28
|
-
- the runtime can read, prepare, require approval, and commit through host lifecycle
|
|
29
|
-
APIs;
|
|
30
|
-
- evals prove expected behavior without calling a model.
|
|
31
|
-
|
|
32
|
-
Full command explanations are in [Start here](../start-here.md).
|
|
3
|
+
Start with the [installed-package walkthrough](provider-neutral-quickstart.md). From an
|
|
4
|
+
empty project it shows a complete manifest, registry loading, runtime context, handler,
|
|
5
|
+
lexical discovery and ordinary mocked tool execution. No checkout or provider key is
|
|
6
|
+
required.
|
|
7
|
+
|
|
8
|
+
The same guide runs the complete dependent read/prepare customer example and explains
|
|
9
|
+
approval requirements. See [repository development](../development.md) only when
|
|
10
|
+
changing the framework itself.
|
package/docs/index.md
CHANGED
|
@@ -76,9 +76,10 @@ Models propose; applications validate, authorize, execute, and audit.
|
|
|
76
76
|
|
|
77
77
|
## Capability discovery
|
|
78
78
|
|
|
79
|
-
The optional
|
|
80
|
-
|
|
81
|
-
and
|
|
82
|
-
[finding capabilities for a task](discovery.md).
|
|
79
|
+
The optional `ai-capability-framework/discovery` API provides a
|
|
80
|
+
[stable lexical/native workflow](api/stable-workflow.md), a simple search facade,
|
|
81
|
+
result-bound routers, explicit hybrid retrieval and dedicated selection, and
|
|
82
|
+
provider-free evaluation. Start with [finding capabilities for a task](discovery.md).
|
|
83
|
+
For opt-in provider evaluation, see the
|
|
83
84
|
[discovery live evaluation guide](evals/discovery-live.md) and the
|
|
84
85
|
[qualification results and limits](evals/discovery-qualification.md).
|
package/docs/release.md
CHANGED
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
This checklist prepares an AICF public release for GitHub and npm distribution.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Stable discovery workflow
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
The [named lexical/native workflow](api/stable-workflow.md) is stable public in 1.1.0.
|
|
8
|
+
Advanced APIs retain their individual maturity labels. Recommend lexical retrieval with
|
|
9
|
+
ordinary model tool selection; dedicated selection is optional and hybrid remains
|
|
10
|
+
experimental. Link the [qualification report](evals/discovery-qualification.md) in
|
|
11
|
+
release notes. Its qualified lexical results apply to a tested synthetic configuration,
|
|
12
|
+
and the revised workflow assessment is an offline checker correction rather than new
|
|
13
|
+
live trials.
|
|
12
14
|
|
|
13
15
|
Use a reviewed pull request, passing hosted Linux Node 20/22/24 checks, merge, and an
|
|
14
|
-
exact-commit manual release dry-run before pushing the matching
|
|
15
|
-
checks do not replace hosted checks.
|
|
16
|
-
`latest
|
|
16
|
+
exact-commit manual release dry-run before pushing the matching version tag. Local
|
|
17
|
+
checks do not replace hosted checks. Prereleases publish both packages to `next`,
|
|
18
|
+
preserving `latest` for prereleases. Stable 1.1.0 publishes to `latest` while preserving
|
|
19
|
+
the existing `next` tag and prerelease versions. Verify normal installation as well as
|
|
20
|
+
exact-version registry installs.
|
|
17
21
|
|
|
18
22
|
The publication and dry-run workflows run `npm run check` plus certification with
|
|
19
23
|
`VITEST_MAX_WORKERS=2`. Publication is serialized; registry failures fail closed unless
|
package/docs/runtime.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Runtime Contracts
|
|
2
2
|
|
|
3
|
+
The [named lexical/native workflow](api/stable-workflow.md) and its required runtime
|
|
4
|
+
members are stable public from 1.1.0. Other runtime APIs retain their existing maturity;
|
|
5
|
+
this does not promote every export. Start with the
|
|
6
|
+
[installed-package walkthrough](getting-started/provider-neutral-quickstart.md).
|
|
7
|
+
|
|
3
8
|
AICF Runtime is an additive TypeScript subpath for host applications that want
|
|
4
9
|
deterministic runtime context, capability routing, policy brokering, handler execution,
|
|
5
10
|
action lifecycle control, and model-safe tool result envelopes.
|
package/docs/start-here.md
CHANGED
|
@@ -1,136 +1,25 @@
|
|
|
1
1
|
# Start Here
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
runtime
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
```text
|
|
27
|
-
Validated 16 manifest(s) and 18 fixture(s).
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
This proves the public manifests and fixture files are parseable, schema-valid,
|
|
31
|
-
cross-referenced, and public-safe enough for the validation rules.
|
|
32
|
-
|
|
33
|
-
## 3. Inspect The Registry
|
|
34
|
-
|
|
35
|
-
Build the CLI, then inspect the examples:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm run build
|
|
39
|
-
node dist/cli.js inspect examples
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Expected excerpt:
|
|
43
|
-
|
|
44
|
-
```text
|
|
45
|
-
AICF Registry
|
|
46
|
-
Manifests: 16
|
|
47
|
-
Capabilities by type:
|
|
48
|
-
- read_data: scheduling.availability.get, support.ticket.get
|
|
49
|
-
- write_prepare_only: scheduling.invite.prepare, support.refund.prepare_case
|
|
50
|
-
- write_commit: scheduling.invite.send, support.refund.commit_case
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
This shows the validated registry AICF uses for routing, provider export, policy
|
|
54
|
-
decisions, and eval scoring.
|
|
55
|
-
|
|
56
|
-
## 4. Export OpenAI Tools
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
node dist/cli.js openai-tools examples --context examples/support/openai/context.support_agent.json
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Expected excerpt:
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"tools": [
|
|
67
|
-
{
|
|
68
|
-
"type": "function",
|
|
69
|
-
"name": "aicf_support_refund_prepare_case",
|
|
70
|
-
"strict": true
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"type": "function",
|
|
74
|
-
"name": "aicf_support_ticket_get",
|
|
75
|
-
"strict": true
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
"excluded": [
|
|
79
|
-
{
|
|
80
|
-
"capabilityId": "support.refund.commit_case"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
This proves safe tool export. The model can see read and prepare tools, but the commit
|
|
87
|
-
capability is not exposed as a normal model tool.
|
|
88
|
-
|
|
89
|
-
## 5. Run The Mock Runtime Flow
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
node examples/runtime-support-billing/run-mock.mjs
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Expected excerpt:
|
|
96
|
-
|
|
97
|
-
```json
|
|
98
|
-
{
|
|
99
|
-
"readStatus": "success",
|
|
100
|
-
"prepareStatus": "approval_required",
|
|
101
|
-
"commitStatus": "committed"
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
This runs route, read, prepare, approval, and lifecycle commit with mock handlers and
|
|
106
|
-
in-memory reference stores. The model-facing path still cannot commit. Commit happens
|
|
107
|
-
only after the host records approval and calls the lifecycle manager.
|
|
108
|
-
|
|
109
|
-
## 6. Run Deterministic Evals
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
node dist/cli.js eval examples --results examples/eval-results/public.results.passing.json
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Expected excerpt:
|
|
116
|
-
|
|
117
|
-
```text
|
|
118
|
-
Eval suite passed: 6/6 passed.
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
This proves the candidate fixture matches the eval manifests for tool selection,
|
|
122
|
-
arguments, policy decisions, refusals, response text, and no unapproved commit
|
|
123
|
-
boundaries.
|
|
124
|
-
|
|
125
|
-
## What You Just Proved
|
|
126
|
-
|
|
127
|
-
- Public manifests validate and build a registry.
|
|
128
|
-
- OpenAI tool export is safe and does not expose commit tools by default.
|
|
129
|
-
- Provider SDK validation does not replace AICF validation.
|
|
130
|
-
- The runtime can execute read and prepare handlers with model-safe envelopes.
|
|
131
|
-
- Approval-required prepare pauses before side effects.
|
|
132
|
-
- Host-controlled lifecycle commit works after approval and idempotency checks.
|
|
133
|
-
- Evals score behavior without calling models.
|
|
134
|
-
|
|
135
|
-
Next, read the [OpenAI walkthrough](openai-walkthrough.md) for the same flow from the
|
|
136
|
-
model/tool-call perspective, then use the [glossary](glossary.md) for the main terms.
|
|
3
|
+
Install with `npm install ai-capability-framework`, then follow the
|
|
4
|
+
[complete installed-package quickstart](getting-started/provider-neutral-quickstart.md).
|
|
5
|
+
It needs no checkout, provider SDK or API key.
|
|
6
|
+
|
|
7
|
+
You will author one capability, load its registry, create runtime context, register a
|
|
8
|
+
handler, search a task and execute the ordinary mock model/tool loop. The packaged
|
|
9
|
+
customer example then shows an authorized read followed by an approval-required preview.
|
|
10
|
+
|
|
11
|
+
Lexical/native is the recommended [stable workflow](api/stable-workflow.md). Dedicated
|
|
12
|
+
selection is optional; hybrid remains experimental with
|
|
13
|
+
[qualification limits](evals/discovery-qualification.md). Applications own
|
|
14
|
+
decomposition, dependencies, arguments, authentication, resource access and customer
|
|
15
|
+
responses.
|
|
16
|
+
|
|
17
|
+
The model can see read and prepare tools, but the commit capability is not exposed.
|
|
18
|
+
Runtime validation, authorization and approval policy remain the authority for actions.
|
|
19
|
+
|
|
20
|
+
- [Installation](getting-started/installation.md)
|
|
21
|
+
- [Capability manifests](capability-manifests.md)
|
|
22
|
+
- [Choose a runtime](providers/choose-a-runtime.md)
|
|
23
|
+
- [Discovery details](discovery.md)
|
|
24
|
+
- [API policy](api/public-api-policy.md)
|
|
25
|
+
- [Repository development](development.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# From a customer request to a tool
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install `ai-capability-framework` (stable 1.1.0 or later). Lexical/native is the
|
|
4
4
|
recommended default. Hybrid is experimental and opt-in; the
|
|
5
5
|
[qualification report](../../docs/evals/discovery-qualification.md) explains its limits.
|
|
6
6
|
|
|
@@ -155,8 +155,9 @@ construction.
|
|
|
155
155
|
The selector returns decisions; application argument completion and runtime execution
|
|
156
156
|
remain separate. Native search and `routerFor` never call the dedicated selector.
|
|
157
157
|
Selected-result routers, the optional Responses adapter, and managed full-run accounting
|
|
158
|
-
are available; see the shared-run integration below. Imports use the public
|
|
159
|
-
|
|
158
|
+
are available; see the shared-run integration below. Imports use the public discovery
|
|
159
|
+
subpath; the [named lexical/native workflow](../../docs/api/stable-workflow.md) is
|
|
160
|
+
stable.
|
|
160
161
|
|
|
161
162
|
Run the explicit selector companion:
|
|
162
163
|
|
package/package.json
CHANGED