Repository navigation
Expand file tree
/
Copy pathJustfile
More file actions
135 lines (101 loc) · 4.14 KB
/
Copy pathJustfile
File metadata and controls
135 lines (101 loc) · 4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
BIN_NAME := "agent-tools"
_help:
@just -l
build:
cargo build --locked
build-release:
cargo build --locked --release
build-sq: build-release
mkdir -p sqbin
cp target/release/{{BIN_NAME}} sqbin/{{BIN_NAME}}.exoskeleton
build-bl-release:
cargo build --locked --release --bin bl
# Download protos from schema-registry and generate Rust code
protos:
#!/usr/bin/env bash
set -euo pipefail
echo "📥 Downloading proto files..."
rm -rf protos
mkdir -p protos
# Download all protos without transitive deps (-i) to avoid pulling in
# ~250 arcade/UI/franklin protos via client_renderable.proto
if ! command -v schema-registry >/dev/null 2>&1; then
echo "schema-registry is not a public Hermit package; install the internal CLI separately to refresh protos." >&2
exit 1
fi
schema-registry get --save-to=protos -i \
google/api/annotations.proto \
google/api/http.proto \
squareup/cash/kgoose/api/v3/tool_endpoint_service.proto \
squareup/cash/kgoose/api/v3/tool_endpoint_messages.proto \
squareup/cash/kgoose/api/v3/agent_config_messages.proto \
squareup/cash/kgoose/api/v3/extension_selection_config.proto \
squareup/cash/kgoose/api/v3/extension_messages.proto \
squareup/cash/kgoose/api/v3/chat_messages.proto \
squareup/cash/kgoose/api/v3/activity_messages.proto \
squareup/cash/kgoose/api/v3/profile_messages.proto \
squareup/cash/kgoose/api/v3/common_messages.proto \
squareup/cash/kgoosememorystore/api/v1beta1/memory.proto \
squareup/common/pii.proto \
squareup/common/governance/v0/semantic_types.proto \
squareup/common/governance/v0/common.proto \
squareup/common/governance/v0/consumer_personal_data.proto \
squareup/common/governance/v0/merchant_data.proto \
squareup/common/governance/v0/payment_card_data.proto \
squareup/common/governance/v0/employee_personal_data.proto
# Remove imports and messages we don't need to avoid lots of proto imports
echo "🔧 Cleaning up proto files..."
PROTO_FILES_TO_CLEAN=(
"protos/squareup/cash/kgoose/api/v3/chat_messages.proto"
"protos/squareup/cash/kgoose/api/v3/activity_messages.proto"
)
cleanup_proto_file() {
local proto_file="$1"
if [[ -f "$proto_file" ]]; then
echo " 🔧 Cleaning up $(basename "$proto_file")..."
# Remove specific imports
sed -i '' '/import "squareup\/cash\/kgoose\/api\/v3\/client_renderable.proto";/d' "$proto_file"
sed -i '' '/import "squareup\/cash\/kgoose\/api\/v3\/customer_context.proto";/d' "$proto_file"
# Comment out ClientRenderable lines (optional or required, any field number)
sed -i '' -E 's/^[[:space:]]*(optional )?(squareup\.cash\.kgoose\.api\.v3\.)?ClientRenderable.*=.*[0-9]*.*;/ \/\/ &/' "$proto_file"
# Comment out CustomerContext lines (optional or required, any field number)
sed -i '' -E 's/^[[:space:]]*(optional )?(squareup\.cash\.kgoose\.api\.v3\.)?CustomerContext.*=.*[0-9]*.*;/ \/\/ &/' "$proto_file"
echo " ✅ Successfully cleaned up $(basename "$proto_file")"
else
echo " ⚠️ $(basename "$proto_file") not found, skipping cleanup"
fi
}
for proto_file in "${PROTO_FILES_TO_CLEAN[@]}"; do
cleanup_proto_file "$proto_file"
done
echo "✅ Proto cleanup complete"
cargo build --locked
run *args:
cargo run -- {{args}}
describe-commands:
cargo run -- --describe-commands
update-extensions-catalog: build-sq
bash script/update-extensions-catalog
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
lint: fmt-check
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
test:
cargo test --locked --workspace --all-features
package-smoke: build-sq
./sqbin/{{BIN_NAME}}.exoskeleton --version
./target/release/bl --version
./target/release/bl --help
# Build and run the isolated, deterministic Docker acceptance harness for bl skills.
bl-cli-docker-acceptance:
docker build --tag bl-cli-acceptance --file docker/acceptance/Dockerfile .
docker run --rm bl-cli-acceptance
check: fmt-check lint test
ci-lint: fmt-check lint
ci-test: test package-smoke
ci: ci-lint ci-test
setup: install-hooks
install-hooks:
lefthook install