Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ jobs:
mkdir -p ~/.local/bin
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-aarch64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-aarch64'
elif [ "$ARCH" = "x86_64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-amd64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-amd64'
else
echo "Unsupported architecture: $ARCH" && exit 1
fi
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Install pkl on Windows
if: matrix.platform == 'windows-latest'
run: |
Invoke-WebRequest 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-windows-amd64.exe' -OutFile pkl.exe
Invoke-WebRequest 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-windows-amd64.exe' -OutFile pkl.exe
echo "PATH=$env:GITHUB_WORKSPACE;$env:PATH" >> $env:GITHUB_ENV
.\pkl.exe --version
shell: pwsh
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
# uses: Cyberboss/install-winget@v1
# - name: Install pkl
# run: |
# curl -L -o /c/Users/runneradmin/.local/bin/pkl.exe 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-windows-amd64.exe'
# curl -L -o /c/Users/runneradmin/.local/bin/pkl.exe 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-windows-amd64.exe'
# chmod +x /c/Users/runneradmin/.local/bin/pkl.exe
# /c/Users/runneradmin/.local/bin/pkl.exe --version
# shell: bash
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
ARCH=$(uname -m)
echo "Detected architecture: $ARCH"
if [ "$ARCH" = "arm64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-aarch64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-aarch64'
elif [ "$ARCH" = "x86_64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-amd64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-amd64'
else
echo "Unsupported architecture: $ARCH" && exit 1
fi
Expand All @@ -58,9 +58,9 @@ jobs:
ARCH=$(uname -m)
echo "Detected architecture: $ARCH"
if [ "$ARCH" = "arm64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-macos-aarch64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-macos-aarch64'
elif [ "$ARCH" = "x86_64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-macos-amd64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-macos-amd64'
else
echo "Unsupported architecture: $ARCH" && exit 1
fi
Expand All @@ -73,7 +73,7 @@ jobs:
if: matrix.platform == 'windows-latest'
run: |
Write-Host "Downloading PKL..."
Invoke-WebRequest 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-windows-amd64.exe' -OutFile pkl.exe
Invoke-WebRequest 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-windows-amd64.exe' -OutFile pkl.exe
if (!(Test-Path .\pkl.exe)) {
Write-Host "pkl.exe not found!"
exit 1
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
run: curl -LsSf https://raw.githubusercontent.com/kdeps/kdeps/refs/heads/main/install.sh | sh -s -- -d ${GITHUB_REF##*/}
- name: Install pkl
run: |
curl -L -o /c/Users/runneradmin/.local/bin/pkl.exe 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-windows-amd64.exe'
curl -L -o /c/Users/runneradmin/.local/bin/pkl.exe 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-windows-amd64.exe'
chmod +x /c/Users/runneradmin/.local/bin/pkl.exe
/c/Users/runneradmin/.local/bin/pkl.exe --version
shell: bash
Expand Down Expand Up @@ -315,9 +315,9 @@ jobs:
run: |
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-aarch64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-aarch64'
elif [ "$ARCH" = "x86_64" ]; then
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-amd64'
curl -L -o ~/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-amd64'
else
echo "Unsupported architecture: $ARCH" && exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ RUN curl -LsSf https://raw.githubusercontent.com/kdeps/kdeps/refs/heads/main/ins
# Determine architecture and install pkl accordingly
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "aarch64" ]; then \
curl -L -o /home/kdeps/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-aarch64'; \
curl -L -o /home/kdeps/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-aarch64'; \
elif [ "$ARCH" = "x86_64" ]; then \
curl -L -o /home/kdeps/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.0/pkl-linux-amd64'; \
curl -L -o /home/kdeps/.local/bin/pkl 'https://github.com/apple/pkl/releases/download/0.29.1/pkl-linux-amd64'; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi && \
Expand Down
4 changes: 2 additions & 2 deletions cmd/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestNewPackageCommandExecution(t *testing.T) {
require.NoError(t, fs.MkdirAll(filepath.Join(projectDir, "resources"), 0o755))

// Create a workflow file
wfContent := `amends "package://schema.kdeps.com/core@0.3.1-dev#/Workflow.pkl"
wfContent := `amends "package://schema.kdeps.com/core@0.4.0-dev#/Workflow.pkl"

Name = "test-agent"
Version = "1.0.0"
Expand All @@ -34,7 +34,7 @@ TargetActionID = "test-action"
require.NoError(t, afero.WriteFile(fs, filepath.Join(projectDir, "workflow.pkl"), []byte(wfContent), 0o644))

// Create a resource file
resourceContent := `amends "package://schema.kdeps.com/core@0.3.1-dev#/Resource.pkl"
resourceContent := `amends "package://schema.kdeps.com/core@0.4.0-dev#/Resource.pkl"

ActionID = "test-action"

Expand Down
8 changes: 4 additions & 4 deletions cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func UpgradeCommand(_ context.Context, fs afero.Fs, _ string, logger *logging.Lo
Long: `Upgrade schema versions and format in pkl files within a directory.

This command scans for pkl files and performs two types of upgrades:
1. Schema version references (e.g., @0.2.44 -> @0.3.1-dev)
1. Schema version references (e.g., @0.2.44 -> @0.4.0-dev)
2. Schema format migration (e.g., lowercase -> capitalized attributes/blocks)

The format upgrade converts older lowercase PKL syntax to the new capitalized format:
Expand All @@ -36,7 +36,7 @@ The format upgrade converts older lowercase PKL syntax to the new capitalized fo
Examples:
kdeps upgrade # Upgrade current directory to default version
kdeps upgrade ./my-agent # Upgrade specific directory to default version
kdeps upgrade --version 0.3.1-dev . # Upgrade to specific version
kdeps upgrade --version 0.4.0-dev . # Upgrade to specific version
kdeps upgrade --dry-run ./my-agent # Preview changes without applying
`,
Args: cobra.MaximumNArgs(1),
Expand Down Expand Up @@ -201,9 +201,9 @@ func upgradeVersionReferences(content, targetVersion string, logger *logging.Log

// Regex patterns to match schema version references
patterns := []string{
// Match: amends "package://schema.kdeps.com/core@0.3.1-dev#/Workflow.pkl"
// Match: amends "package://schema.kdeps.com/core@0.4.0-dev#/Workflow.pkl"
`(amends\s+"package://schema\.kdeps\.com/core@)([^"#]+)(#/[^"]+")`,
// Match: import "package://schema.kdeps.com/core@0.3.1-dev#/Resource.pkl"
// Match: import "package://schema.kdeps.com/core@0.4.0-dev#/Resource.pkl"
`(import\s+"package://schema\.kdeps\.com/core@)([^"#]+)(#/[^"]+")`,
// Match other similar patterns
`("package://schema\.kdeps\.com/core@)([^"#]+)(#/[^"]+")`,
Expand Down
51 changes: 29 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ require (
github.com/charmbracelet/log v0.4.2
github.com/charmbracelet/x/editor v0.1.0
github.com/cucumber/godog v0.14.1
github.com/docker/docker v28.4.0+incompatible
github.com/docker/docker v28.5.0+incompatible
github.com/docker/go-connections v0.6.0
github.com/dustin/go-humanize v1.0.1
github.com/gabriel-vasile/mimetype v1.4.10
github.com/gin-contrib/cors v1.7.6
github.com/gin-gonic/gin v1.10.1
github.com/gin-gonic/gin v1.11.0
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/joho/godotenv v1.5.1
github.com/kdeps/kartographer v0.0.0-20240808015651-b2afd5d97715
github.com/kdeps/schema v0.3.1-dev
github.com/kdeps/schema v0.4.0-dev
github.com/kr/pretty v0.3.1
github.com/mattn/go-sqlite3 v1.14.32
github.com/spf13/afero v1.14.0
github.com/spf13/afero v1.15.0
github.com/spf13/cobra v1.10.1
github.com/stretchr/testify v1.11.1
github.com/tmc/langchaingo v0.1.13
golang.org/x/text v0.28.0
golang.org/x/text v0.29.0
)

require (
Expand All @@ -43,12 +43,13 @@ require (
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/catppuccin/go v0.3.0 // indirect
github.com/charmbracelet/bubbles v0.21.0 // indirect
github.com/charmbracelet/bubbletea v1.3.6 // indirect
github.com/charmbracelet/bubbletea v1.3.10 // indirect
github.com/charmbracelet/colorprofile v0.3.2 // indirect
github.com/charmbracelet/x/ansi v0.10.1 // indirect
github.com/charmbracelet/x/ansi v0.10.2 // indirect
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
github.com/charmbracelet/x/exp/strings v0.0.0-20250904123553-b4e2667e5ad5 // indirect
github.com/charmbracelet/x/exp/strings v0.0.0-20251006100439-2151805163c8 // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/clipperhouse/uax29/v2 v2.2.0 // indirect
github.com/cloudwego/base64x v0.1.6 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
Expand All @@ -61,13 +62,14 @@ require (
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gin-contrib/sse v1.1.0 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logfmt/logfmt v0.6.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.27.0 // indirect
github.com/go-playground/validator/v10 v10.28.0 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/gofrs/uuid v4.3.1+incompatible // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-memdb v1.3.4 // indirect
Expand All @@ -77,10 +79,10 @@ require (
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/atomicwriter v0.1.0 // indirect
Expand All @@ -93,30 +95,35 @@ require (
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkoukk/tiktoken-go v0.1.7 // indirect
github.com/pkoukk/tiktoken-go v0.1.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.55.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.3.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
golang.org/x/arch v0.20.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.35.0 // indirect
google.golang.org/protobuf v1.36.8 // indirect
go.uber.org/mock v0.6.0 // indirect
golang.org/x/arch v0.21.0 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.45.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/tools v0.37.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.1 // indirect
)
Expand Down
Loading