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
4 changes: 2 additions & 2 deletions nodejs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/github/copilot-sdk.git"
},
"version": "0.1.8",
"version": "0.0.0-dev",
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
"main": "./dist/cjs/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -44,7 +44,7 @@
"generate": "cd ../scripts/codegen && npm run generate",
"update:protocol-version": "tsx scripts/update-protocol-version.ts",
"prepublishOnly": "npm run build",
"package": "npm run clean && npm run build && node scripts/set-version.js && npm pack && npm version 0.1.0 --no-git-tag-version --allow-same-version"
"package": "npm run clean && npm run build && node scripts/set-version.js && npm pack && npm version 0.0.0-dev --no-git-tag-version --allow-same-version"
},
"keywords": [
"github",
Expand Down
2 changes: 1 addition & 1 deletion nodejs/samples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nodejs/scripts/set-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { readFileSync, writeFileSync } from "fs";
import { dirname, join } from "path";
import { fileURLToPath } from "url";

const version = process.env.VERSION || "0.1.0-dev";
const version = process.env.VERSION || "0.0.0-dev";
const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");

const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
Expand Down
11 changes: 10 additions & 1 deletion python/copilot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
JSON-RPC based SDK for programmatic control of GitHub Copilot CLI
"""

from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _pkg_version

from ._mode import (
BUILTIN_TOOLS_ISOLATED,
CopilotClientMode,
Expand Down Expand Up @@ -145,7 +148,13 @@
define_tool,
)

__version__ = "0.1.0"
try:
__version__ = _pkg_version("github-copilot-sdk")
except PackageNotFoundError:
# No installed package metadata (e.g. running from a source checkout that
# was never installed). Use a sentinel that can never masquerade as a real
# release rather than a hardcoded version that would silently go stale.
__version__ = "0.0.0.dev0"

__all__ = [
"AutoModeSwitchHandler",
Expand Down
5 changes: 4 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ build-backend = "setuptools.build_meta"

[project]
name = "github-copilot-sdk"
version = "0.1.0"
# Placeholder; the real version is injected at publish time (see
# .github/workflows/publish.yml). Kept as a dev sentinel so source/editable
# installs never report a stale real version, matching the .NET and Rust SDKs.
version = "0.0.0.dev0"
description = "Python SDK for GitHub Copilot CLI"
readme = "README.md"
requires-python = ">=3.11"
Expand Down
Loading