Skip to content

Commit 0842f7b

Browse files
Add doc-approval app and component manifests (#112) (#154)
Author manifests/doc-approval for analyze + recommend with pipeline workflow reference, extend phase2_link_traverse for both apps, and gate structure checks. Validated with traverse-cli app validate. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ec61db9 commit 0842f7b

8 files changed

Lines changed: 171 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ coverage/
1818

1919
# Traverse checkout symlink for Phase 2 manifest validation
2020
manifests/traverse-starter/_traverse
21+
manifests/doc-approval/_traverse
2122
.traverse/
2223
apps/traverse-starter/TraverseCore/.build/
2324

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ gh project item-list 2 --owner traverse-framework --format json --limit 300 \
1212
### Blocked work summary
1313

1414
- **Phase 3 embedded runtime** ([#114](https://github.com/traverse-framework/reference-apps/issues/114)[#116](https://github.com/traverse-framework/reference-apps/issues/116)) — blocked on remaining consumable embedder SDKs: Traverse [#647](https://github.com/traverse-framework/Traverse/issues/647) (Swift), [#648](https://github.com/traverse-framework/Traverse/issues/648) (Kotlin), [#649](https://github.com/traverse-framework/Traverse/issues/649) (.NET). Rust (#650) and Web/TS (#646) embedder SDKs shipped; App-Refs [#117](https://github.com/traverse-framework/reference-apps/issues/117) Linux/CLI and [#113](https://github.com/traverse-framework/reference-apps/issues/113) web-react embed shipped.
15-
- **doc-approval multi-capability showcase** ([#111](https://github.com/traverse-framework/reference-apps/issues/111), [#112](https://github.com/traverse-framework/reference-apps/issues/112)) — Ready after Traverse [#555](https://github.com/traverse-framework/Traverse/issues/555) (`recommend`). Spec 069: pipeline is `analyze → recommend` (no extract).
15+
- **doc-approval multi-capability showcase** ([#111](https://github.com/traverse-framework/reference-apps/issues/111)) — Ready after Traverse [#555](https://github.com/traverse-framework/Traverse/issues/555) (`recommend`) and manifests [#112](https://github.com/traverse-framework/reference-apps/issues/112). Spec 069: pipeline is `analyze → recommend` (no extract).
1616

17-
Ready: [#111](https://github.com/traverse-framework/reference-apps/issues/111), [#112](https://github.com/traverse-framework/reference-apps/issues/112) (after #113 merges).
17+
Ready: [#111](https://github.com/traverse-framework/reference-apps/issues/111) (after #112 merges).
1818

1919
Update this section when a PR changes platform status (see PR template checklist).
2020

docs/embedded-runtime-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Until (1–2) exist, platform migration tickets stay **Blocked**.
130130
| [110](https://github.com/traverse-framework/reference-apps/issues/110) | traverse-starter.pipeline multi-capability workflow | Blocked |
131131
| [111](https://github.com/traverse-framework/reference-apps/issues/111) | doc-approval.pipeline multi-capability workflow | Blocked |
132132
| [112](https://github.com/traverse-framework/reference-apps/issues/112) | doc-approval manifests | Blocked |
133-
| [113](https://github.com/traverse-framework/reference-apps/issues/113) | Embed runtime — web-react | Done (this PR) |
133+
| [113](https://github.com/traverse-framework/reference-apps/issues/113) | Embed runtime — web-react | Done |
134134
| [114](https://github.com/traverse-framework/reference-apps/issues/114) | Embed runtime — Swift (iOS + macOS) | Blocked |
135135
| [115](https://github.com/traverse-framework/reference-apps/issues/115) | Embed runtime — Android | Blocked |
136136
| [116](https://github.com/traverse-framework/reference-apps/issues/116) | Embed runtime — Windows | Blocked |
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"app_id": "doc-approval",
3+
"version": "1.0.0",
4+
"schema_version": "1.0.0",
5+
"workspace_defaults": {
6+
"workspace_id": "local-default",
7+
"registry_scope": "private"
8+
},
9+
"components": [
10+
{
11+
"component_id": "doc-approval.analyze-component",
12+
"version": "1.0.0",
13+
"digest": "sha256:5647c39a1d25d8728350f9619025292a62e78a602068a2ad9b6f075751c93d99",
14+
"manifest_path": "components/analyze/component.manifest.json"
15+
},
16+
{
17+
"component_id": "doc-approval.recommend-component",
18+
"version": "1.0.0",
19+
"digest": "sha256:5647c39a1d25d8728350f9619025292a62e78a602068a2ad9b6f075751c93d99",
20+
"manifest_path": "components/recommend/component.manifest.json"
21+
}
22+
],
23+
"workflows": [
24+
{
25+
"workflow_id": "doc-approval.pipeline",
26+
"workflow_version": "1.0.0",
27+
"path": "_traverse/workflows/examples/doc-approval/pipeline/workflow.json"
28+
}
29+
],
30+
"model_dependencies": [],
31+
"config_schema": {
32+
"type": "object",
33+
"required": ["workspace_id"],
34+
"properties": {
35+
"workspace_id": { "type": "string" },
36+
"analysis_mode": {
37+
"type": "string",
38+
"enum": ["deterministic"]
39+
}
40+
},
41+
"additionalProperties": false
42+
},
43+
"default_config": {
44+
"workspace_id": "local-default",
45+
"analysis_mode": "deterministic"
46+
},
47+
"placement_policy": {
48+
"preferred_targets": ["local"],
49+
"allow_fallback": false
50+
},
51+
"public_surfaces": ["cli", "http_json"],
52+
"state_machine": {
53+
"initial_state": "idle",
54+
"list_context_fields": [
55+
"output.analysis.docType",
56+
"output.analysis.parties",
57+
"output.analysis.amounts",
58+
"output.analysis.confidence",
59+
"output.analysis.recommendation",
60+
"output.recommendation.recommendation",
61+
"output.recommendation.rationale",
62+
"output.recommendation.confidence"
63+
],
64+
"states": [
65+
{
66+
"id": "idle",
67+
"transitions": [{ "on": "submit", "to": "processing" }]
68+
},
69+
{
70+
"id": "processing",
71+
"invoke": {
72+
"capability_id": "doc-approval.analyze",
73+
"input_from": "command.payload"
74+
},
75+
"transitions": [
76+
{ "on": "capability_succeeded", "to": "results" },
77+
{ "on": "capability_failed", "to": "error" }
78+
]
79+
},
80+
{
81+
"id": "results",
82+
"transitions": [{ "on": "reset", "to": "idle" }]
83+
},
84+
{
85+
"id": "error",
86+
"transitions": [
87+
{ "on": "retry", "to": "processing", "with_last_payload": true },
88+
{ "on": "reset", "to": "idle" }
89+
]
90+
}
91+
]
92+
}
93+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"component_id": "doc-approval.analyze-component",
3+
"version": "1.0.0",
4+
"schema_version": "1.0.0",
5+
"capability_id": "doc-approval.analyze",
6+
"capability_version": "1.0.0",
7+
"contract_path": "../../_traverse/contracts/examples/doc-approval/capabilities/analyze/contract.json",
8+
"wasm_binary_path": "../../_traverse/examples/doc-approval/analyze-agent/artifacts/analyze-agent.wasm",
9+
"wasm_digest": "sha256:5647c39a1d25d8728350f9619025292a62e78a602068a2ad9b6f075751c93d99",
10+
"runtime_constraints": {
11+
"host_api_access": "none",
12+
"network_access": "forbidden",
13+
"filesystem_access": "none"
14+
},
15+
"permitted_targets": ["local", "device"],
16+
"dependencies": [],
17+
"connector_requirements": [],
18+
"validation_evidence": [
19+
{
20+
"evidence_type": "checked_in_fixture",
21+
"status": "passed",
22+
"produced_by": "doc_approval_example_smoke"
23+
}
24+
]
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"component_id": "doc-approval.recommend-component",
3+
"version": "1.0.0",
4+
"schema_version": "1.0.0",
5+
"capability_id": "doc-approval.recommend",
6+
"capability_version": "1.0.0",
7+
"contract_path": "../../_traverse/contracts/examples/doc-approval/capabilities/recommend/contract.json",
8+
"wasm_binary_path": "../../_traverse/examples/doc-approval/recommend-agent/artifacts/recommend-agent.wasm",
9+
"wasm_digest": "sha256:5647c39a1d25d8728350f9619025292a62e78a602068a2ad9b6f075751c93d99",
10+
"runtime_constraints": {
11+
"host_api_access": "none",
12+
"network_access": "forbidden",
13+
"filesystem_access": "none"
14+
},
15+
"permitted_targets": ["local", "device"],
16+
"dependencies": [],
17+
"connector_requirements": [],
18+
"validation_evidence": [
19+
{
20+
"evidence_type": "checked_in_fixture",
21+
"status": "passed",
22+
"produced_by": "doc_approval_example_smoke"
23+
}
24+
]
25+
}

scripts/ci/phase2_link_traverse.sh

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#!/usr/bin/env bash
2-
# Ensures manifests/traverse-starter/_traverse symlink points at TRAVERSE_REPO.
2+
# Ensures manifests/<app>/_traverse symlinks point at TRAVERSE_REPO.
33
# Required for app validate/register — WASM, contracts, and workflows live in Traverse.
44
set -euo pipefail
55

66
REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel)}"
7-
LINK="$REPO_ROOT/manifests/traverse-starter/_traverse"
87

98
if [ -z "${TRAVERSE_REPO:-}" ]; then
109
echo "FAIL: TRAVERSE_REPO is not set."
1110
echo ""
12-
echo "Clone Traverse v0.6.0+ (minimum v0.5.0 for Phase 2) with traverse-starter example and export:"
11+
echo "Clone Traverse main (with traverse-starter + doc-approval examples) and export:"
1312
echo " export TRAVERSE_REPO=/path/to/Traverse"
1413
exit 1
1514
fi
@@ -21,10 +20,22 @@ fi
2120

2221
if [ ! -f "$TRAVERSE_REPO/examples/traverse-starter/process-agent/artifacts/process-agent.wasm" ]; then
2322
echo "FAIL: traverse-starter WASM not found in TRAVERSE_REPO."
24-
echo " Ensure TRAVERSE_REPO is Traverse main with issue #499 merged."
2523
exit 1
2624
fi
2725

28-
mkdir -p "$(dirname "$LINK")"
29-
ln -sfn "$TRAVERSE_REPO" "$LINK"
30-
echo "OK: linked $LINK -> $TRAVERSE_REPO"
26+
if [ ! -f "$TRAVERSE_REPO/examples/doc-approval/analyze-agent/artifacts/analyze-agent.wasm" ]; then
27+
echo "FAIL: doc-approval WASM not found in TRAVERSE_REPO."
28+
echo " Ensure TRAVERSE_REPO includes issue #555 recommend + analyze agents."
29+
exit 1
30+
fi
31+
32+
link_app() {
33+
local app="$1"
34+
local link="$REPO_ROOT/manifests/$app/_traverse"
35+
mkdir -p "$(dirname "$link")"
36+
ln -sfn "$TRAVERSE_REPO" "$link"
37+
echo "OK: linked $link -> $TRAVERSE_REPO"
38+
}
39+
40+
link_app "traverse-starter"
41+
link_app "doc-approval"

scripts/ci/repository_checks.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ check "apps/doc-approval/DocApprovalCore/Package.swift" "doc-a
6464
check "apps/doc-approval/doc-approval-core-rs/Cargo.toml" "doc-approval-core-rs Cargo crate"
6565
check "apps/doc-approval/Cargo.toml" "doc-approval Cargo workspace"
6666

67+
# Application manifests
68+
check "manifests/traverse-starter/app.manifest.json" "traverse-starter app manifest"
69+
check "manifests/doc-approval/app.manifest.json" "doc-approval app manifest"
70+
check "manifests/doc-approval/components/analyze/component.manifest.json" "doc-approval analyze component"
71+
check "manifests/doc-approval/components/recommend/component.manifest.json" "doc-approval recommend component"
72+
6773
# meeting-notes clients
6874
check "apps/meeting-notes/web-react/package.json" "meeting-notes web-react package"
6975
check "apps/meeting-notes/web-react/README.md" "meeting-notes web-react README"

0 commit comments

Comments
 (0)