@ccdd/core 2.0.2 → 3.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.
|
@@ -11,6 +11,8 @@ export interface ToolMetadata {
|
|
|
11
11
|
observation: 'content' | 'none';
|
|
12
12
|
artifactKind?: 'file' | 'directory' | 'any';
|
|
13
13
|
timeoutMs?: number;
|
|
14
|
+
/** Project-relative runtime files or directories whose bytes affect this tool. */
|
|
15
|
+
executionPaths?: string[];
|
|
14
16
|
}
|
|
15
17
|
export interface ToolContext {
|
|
16
18
|
artifactId: string;
|
|
@@ -20,6 +22,8 @@ export interface ToolContext {
|
|
|
20
22
|
tmpDir: string;
|
|
21
23
|
signal: AbortSignal;
|
|
22
24
|
resolvePath(path?: string): Promise<string>;
|
|
25
|
+
/** Resolve only paths explicitly registered in metadata.executionPaths. */
|
|
26
|
+
resolveExecutionPath?(path: string): Promise<string>;
|
|
23
27
|
}
|
|
24
28
|
export type ToolContent = {
|
|
25
29
|
type: 'text';
|
|
@@ -61,10 +65,19 @@ export interface ArtifactToolsConfig {
|
|
|
61
65
|
agentTools?: Record<string, ToolDefinition<any>>;
|
|
62
66
|
humanTools?: Record<string, ToolDefinition<any>>;
|
|
63
67
|
}
|
|
68
|
+
export interface EnvironmentRequirement {
|
|
69
|
+
description: string;
|
|
70
|
+
/** Project-relative Node script; a zero exit status confirms readiness. */
|
|
71
|
+
script: string;
|
|
72
|
+
timeoutMs?: number;
|
|
73
|
+
/** Additional project files or directories used by the check. */
|
|
74
|
+
inputs?: string[];
|
|
75
|
+
}
|
|
64
76
|
export interface Config {
|
|
65
77
|
artifacts: Record<string, ArtifactEntryDefinition>;
|
|
66
78
|
artifactTypes: Record<string, ArtifactToolsConfig>;
|
|
67
79
|
critics: CriticDefinition[];
|
|
80
|
+
envRequirements?: Record<string, EnvironmentRequirement>;
|
|
68
81
|
}
|
|
69
82
|
export type ConfigFactory = () => Config | Promise<Config>;
|
|
70
83
|
export interface ConfigManifest {
|
|
@@ -78,6 +91,15 @@ export interface ConfigManifest {
|
|
|
78
91
|
agentTools: Record<string, ToolMetadata>;
|
|
79
92
|
humanTools: Record<string, ToolMetadata>;
|
|
80
93
|
}>;
|
|
94
|
+
envRequirements?: Record<string, EnvironmentRequirement>;
|
|
95
|
+
environmentInputs?: {
|
|
96
|
+
path: string;
|
|
97
|
+
hash: string;
|
|
98
|
+
}[];
|
|
99
|
+
executionInputs?: {
|
|
100
|
+
path: string;
|
|
101
|
+
hash: string;
|
|
102
|
+
}[];
|
|
81
103
|
}
|
|
82
104
|
type Properties<S> = S extends {
|
|
83
105
|
properties: infer P;
|
|
@@ -10,7 +10,7 @@ In a full Run, both group Critics must wait for the image review to pass because
|
|
|
10
10
|
|
|
11
11
|
## Running the example
|
|
12
12
|
|
|
13
|
-
Install the three
|
|
13
|
+
Install the three v3.0.0 packages on Node 24 or later. The following command works after npm publication; before that, use the local source build below. Start in the CCDD source repository and copy the example into a new project outside it.
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
CCDD_EXAMPLE_ROOT=$(mktemp -d /tmp/ccdd-groups.XXXXXX)
|
|
@@ -18,7 +18,7 @@ cp -R examples/artifact-groups "$CCDD_EXAMPLE_ROOT/project"
|
|
|
18
18
|
cd "$CCDD_EXAMPLE_ROOT/project"
|
|
19
19
|
npm init -y
|
|
20
20
|
npm pkg set type=module
|
|
21
|
-
npm install --ignore-scripts @ccdd/core@
|
|
21
|
+
npm install --ignore-scripts @ccdd/core@3.0.0 @ccdd/project@3.0.0 @ccdd/default-tools@3.0.0
|
|
22
22
|
|
|
23
23
|
# Check group member tool readiness without calling a Provider.
|
|
24
24
|
npx ccdd tools check --artifact explosion --for agent
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This example directly registers `{ metadata, execute }` without the default tool library. `customTextReader()` creates a definition; actual file reading occurs when an Agent calls `read_spec` or `read_why`.
|
|
4
4
|
|
|
5
|
-
Each project must include its own dependencies. Copy this folder into a new project outside the repository, then install core and Project. The commands below work after npm
|
|
5
|
+
Each project must include its own dependencies. Copy this folder into a new project outside the repository, then install core and Project. The commands below work after npm v3.0.0 publication; before that, use the local tarballs described below. The example is included in the source repository and the core package's `examples/custom-text-reader`. It does not rely on CCDD installed in a parent repository.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
# Copy the example from the CCDD source repository.
|
|
@@ -10,13 +10,13 @@ cp -R examples/custom-text-reader /tmp/ccdd-custom-reader
|
|
|
10
10
|
cd /tmp/ccdd-custom-reader
|
|
11
11
|
npm init -y
|
|
12
12
|
npm pkg set type=module
|
|
13
|
-
npm install --ignore-scripts @ccdd/core@
|
|
13
|
+
npm install --ignore-scripts @ccdd/core@3.0.0 @ccdd/project@3.0.0
|
|
14
14
|
npx ccdd tools check --artifact spec --for agent --tool read
|
|
15
15
|
npx ccdd tools check --artifact spec --for agent --tool read --execute --args '{"startLine":1,"lineCount":20}'
|
|
16
16
|
npx ccdd run --copy --critic spec-why --codex-auth-file "$HOME/.codex/auth.json" --wait
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
This example installs core and Project without the default tool library. Alternatively, in the source repository run `npm run release:npm -- --commit <40-character SHA> --dry-run` to verify and generate matching `ccdd-core-
|
|
19
|
+
This example installs core and Project without the default tool library. Alternatively, in the source repository run `npm run release:npm -- --commit <40-character SHA> --dry-run` to verify and generate matching `ccdd-core-3.0.0.tgz` and `ccdd-project-3.0.0.tgz` files, then install with `npm install --ignore-scripts <core.tgz> <project.tgz>`. This local verification requires no GitHub authentication. If CCDD is already installed, change the first `cp` source to `node_modules/@ccdd/core/examples/custom-text-reader`.
|
|
20
20
|
|
|
21
21
|
The tool omits `preflight`. The default check distinguishes confirmed registration from unverified execution; `--execute` actually reads the file. Agent review requires valid Provider authentication.
|
|
22
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccdd/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
|
|
5
5
|
"repository": { "type": "git", "url": "git+https://github.com/lhj6102/ccdd.git" },
|
|
6
6
|
"description": "Artifact, Critic, relationship and tool definitions for CCDD",
|