Skip to content

Releases

dgem v0.4.3

Choose a tag to compare

@github-actions github-actions released this 10 Nov 16:06
v0.4.3
8811ab2

Serving-image (deploy/cloudrun/), gateway, CLI, MCP, and policy-template release.

Changes in v0.4.3

  • Serving image /ready readiness probe and POST invoke probes (deploy/cloudrun/server/structured_server.py, scripts/deploy_vertex_endpoint.sh, deploy/cloudrun/service.yaml, scripts/deploy_cloudrun_vllm.sh, scripts/matrix/net.py, cmd/serve.go — #47, closes #46).
    Adds GET and POST /ready (/invoke/ready) plus /predict {"ready": true} returning 503 (with the _health_info() JSON payload) until the live upstream vLLM /health route answers 200, and 503 again if the upstream engine stops answering (even after warmup_state.json recorded an earlier ready state). GET and POST /health (/invoke/health) stay 200 unconditionally for cold-start telemetry (phase, bytes_staged_gb, vllm_ready, warmed), while Vertex healthRoute and Cloud Run startupProbe point at /ready so crash-looping deployments do not report healthy, and Vertex /invoke clients probe via POST.
  • Serving image self-warmup X-DGem-Key authentication (deploy/cloudrun/entrypoint.sh, deploy/cloudrun/server/test_server_key.py — #58, closes #57).
    Startup self-warmup requests (samples=1, samples=4, and vision warmup) now attach the first entry of DGEM_SERVER_KEY as X-DGem-Key (and API_KEY as Bearer, targeting SS_PORT), preventing silent HTTP 401 warmup failures when service-key authentication is enabled and recording warmed: false in warmup_state.json if any warmup request fails.
  • Template example sidecars, render-all validation, and dgem template render -d (pkg/template/, templates/, cmd/template.go, cmd/serve.go — #56, closes #55).
    Adds companion <template>.examples.json files (typical, edge, and minimal inputs plus unambiguous expected_answers) across all shipped .json.tmpl policies, ValidateRenderedPayload and TestAllShippedTemplatesRenderAndValidate schema/DAG/option-limit verification, -d / --data JSON variable file loading on dgem template render, and .examples.json-backed examples and sample_vars on GET /api/templates.
  • 8-slot trajectory context pruning policy and Genkit knapsack example (templates/agent_context_pruning.json.tmpl, examples/genkit-context-pruning/, cmd/serve.go — #59).
    Adds a starter 8-slot context retention policy (b0..b7 across full, stub, and drop with layout: "document_first" and isolate: "auto") and a runnable Genkit Go v1.14.0 example solving the Pareto-filtered Multiple-Choice Knapsack (SelectContextPruningActions) under TokenBudget and Pinned block constraints.
  • MCP local-only vision schema hints and dgemgenkit map allocation cleanup (cmd/mcp_schema.go, cmd/mcp.go, examples/dgemgenkit/bridge.go — #60, closes #33).
    Clears unavailable 'vertex_first' / 'vertex' / 'cloudrun' backend descriptions on locate_bounding_boxes and locate_object when running on a local-only server (dgem mcp --local / dgem serve --local), prepends an unavailability notice to vision tool descriptions while keeping enum omitted, and simplifies mergeDependsOn map initialization.
  • agy-safety-gate Stage-0 static pre-filter enabled by default (examples/agy-safety-gate/ — #54).
    Enables deterministic Stage-0 regex fast-allow/deny rules (--static-stage / DGEM_GATE_STATIC_STAGE=1) by default with --no-static-stage (DGEM_GATE_STATIC_STAGE=0) opt-out for Stage-1-only measurement.

dgem v0.4.2

Choose a tag to compare

@github-actions github-actions released this 09 Nov 19:30
v0.4.2
74f05b6

Gateway, CLI, policy-template, and agent-integration release (deploy/cloudrun/ serving container image is unchanged from v0.4.0).

Highlights

  • SecOps & Responsible AI (RAI) .json.tmpl policies and Genkit Go v1.14.0 examples (templates/, examples/, cmd/serve.go, cmd/mcp.go).
    Adds seven executable decision policies with deterministic slot seeding ("seed_token": "fixed", "samples": 1) — templates/secops_rag_quarantine.json.tmpl (4-tier use-vs-mention RAG prompt-injection posture), templates/secops_iam_change_audit.json.tmpl (IAM/RBAC/Terraform diff audit), templates/rai/prompt_safety_guardrail.json.tmpl (benign figurative/homonym context protection + jailbreak framing), templates/rai/response_safety_grader.json.tmpl (single-pass red-team grading), templates/rai/custom_content_policy.json.tmpl (configurable R1–R5 moderation), templates/rai/unbiased_context_qa.json.tmpl (cannot_be_determined abstention), and templates/rai/provenance_claim_check.json.tmpl (C2PA Content Credentials verification) — along with rai/ short-name resolution and Decision Studio / MCP sample variables. Extends examples/dgemgenkit with multi-stage conditional DAG execution (depends_on / ask_if, Passes, Skipped) and post-hoc (T, \tau) calibration helpers (ApplyTemperature, RawHesitation, CalibratedProb, ExceedsThreshold, CalibratedHesitation), adds standalone examples/genkit-secops-triage/ and examples/genkit-rai-guardrails/, and adds -preset secops_incident and -preset rai_redteam_grader to examples/genkit-bulk-synth/.
  • Google Antigravity (agy CLI & Python SDK) PreToolUse safety gate (examples/agy-safety-gate/, templates/tool_safety_gate.json.tmpl, cmd/serve.go).
    Adds a zero-dependency Python PreToolUse tool-call classifier (dgem_gate.py, sdk_demo.py, hooks.example.json) and 2-slot orthogonal policy (action_hazard + intent_origin with "isolate": "all"), use-vs-mention awareness, <untrusted_data> prompt-injection quarantine, Hesitation-gated (< 16%) Stage-2 Gemini escalation, fail-safe fallback to interactive "ask", and methodological evaluation-scope guidance.
  • Genkit EndpointConfig and Cloud Run / local gateway script ergonomics (examples/dgemgenkit/, scripts/, Makefile).
    Adds unified dgemgenkit.EndpointConfig (DGEM_GATEWAY_URL, -gateway-url, -backend, -url, -model) supporting both direct POST /v1/systemone gateway targets and in-process /v1 adapters across all Genkit Go examples, configurable service/SA/VPC environment bindings in scripts/setup_cloudrun_iam.sh, automatic Private Google Access enablement for VPC egress in scripts/deploy_cloudrun_vllm.sh, :latest image tagging alongside commit-SHA tags in scripts/build_cloudrun_image.sh, and make gateway-up / gateway-down / local-up / local-down / local-status targets.
  • Gateway tracing and signed release contributor guidance (AGENTS.md).
    Documents dgem.gateway.proxy child-span invariants, stale-while-revalidate :rawPredict health probing, and the SSH-signed annotated release tag workflow (make release VERSION=vX.Y.Z).

Install

Download a prebuilt archive below (dgem_v0.4.2_<os>_<arch>.tar.gz, verified against SHA256SUMS) or install with Go:

go install github.com/GoogleCloudPlatform/[email protected]

dgem v0.4.1

Choose a tag to compare

@github-actions github-actions released this 06 Nov 16:43
v0.4.1
db3fe33

Install the CLI

Download a prebuilt static archive (dgem, embedded Decision Studio, templates/, LICENSE, and README.md) and verify its SHA-256 checksum:

OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
ARCH="$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')"
curl -fsSLO "https://github.com/GoogleCloudPlatform/dgem/releases/download/v0.4.1/dgem_v0.4.1_${OS}_${ARCH}.tar.gz"
curl -fsSLO "https://github.com/GoogleCloudPlatform/dgem/releases/download/v0.4.1/SHA256SUMS"
tar -xzf "dgem_v0.4.1_${OS}_${ARCH}.tar.gz"
./dgem --version

Or install with Go 1.24+:

go install github.com/GoogleCloudPlatform/[email protected]
dgem --version

Serving image. No prebuilt images are published yet. Build the serving image from this tag in your own Google
Cloud project with GCP_PROJECT=<PROJECT> make cloudrun-build, then deploy it to Cloud Run GPU or Vertex AI (see
Build the Serving Image and the deploy guides).


  • Gateway /v1/systemone latency-tail instrumentation and connection pooling (cmd/serve.go, cmd/root.go).
    v1ProxyHandler (POST /v1/systemone and /v1/chat/completions) now emits sequential child spans under
    dgem.gateway.proxy (dgem.gateway.read_body, dgem.gateway.resolve_backend, dgem.gateway.prepare_body,
    dgem.gateway.auth_token, dgem.gpu.proxy_forward, and dgem.gateway.write_response) with request/response byte
    counts, Vertex status probe telemetry (dgem.vertex_status.cache_hit, dgem.vertex_status.source), token cache
    hit/miss (dgem.token.cache_hit), and httptrace upstream connection reuse (dgem.conn.reused, dgem.conn.was_idle,
    dgem.conn.idle_ms). Upstream proxy calls now share a pooled http.Transport (MaxIdleConns: 128,
    MaxIdleConnsPerHost: 64, IdleConnTimeout: 90s) instead of http.DefaultTransport (MaxIdleConnsPerHost: 2).
  • Stale-while-revalidate Vertex endpoint status and :rawPredict fast health probe (cmd/serve.go).
    inspectVertexEndpointState serves cached deployed status immediately within a 90s grace window after its 30s
    fresh TTL while refreshing asynchronously in the background (stale_cache), deduplicates concurrent refreshes per
    endpoint ID, extracts project/region directly from Vertex endpoint URLs before querying metadata, and probes fast
    data-plane {"health": true} on :rawPredict endpoints (sending X-DGem-Key when DGEM_SERVER_KEY is configured)
    before falling back to the Vertex endpoints.get control-plane API.
  • Prebuilt CLI release archives and go install version reporting (.github/workflows/release.yml, cmd/version.go).
    Pushing a v*.*.* release tag now builds Decision Studio (studio/dist), cross-compiles static CGO_ENABLED=0 dgem
    binaries for linux/amd64, linux/arm64, darwin/amd64, and darwin/arm64 stamped with the release tag and commit
    revision, packages dgem, templates/, LICENSE, and README.md with SHA256SUMS, and attaches them to the
    GitHub Release (creating a draft release if needed). Module-mode go install github.com/GoogleCloudPlatform/[email protected]
    builds also fall back to Go's embedded module BuildInfo version instead of reporting "dev".
  • Interactive documentation landing page and .github/CODEOWNERS (docs-site/src/pages/index.astro, docs-site/public/landing/).
    Adds an interactive GM3 documentation home page featuring a live slot-denoising simulator, Shannon hesitation lab,
    and copy-ready policy workbench, plus repository .github/CODEOWNERS.

dgem v0.4.0

Choose a tag to compare

@ghchinoy ghchinoy released this 06 Nov 06:17
4368d3c

Install the CLI

go install github.com/GoogleCloudPlatform/[email protected]

A go install build of v0.4.0 reports dgem version dev (the version is stamped by make build); build from a
checkout of the tag with make build to get dgem version v0.4.0 (revision 4368d3c, built <date>), or install
v0.4.1+ (go install github.com/GoogleCloudPlatform/dgem@latest
now reports the release version, and v0.4.1+ attaches prebuilt static CLI archives).

Serving image. No prebuilt images are published yet. Build the serving image from this tag in your own Google
Cloud project with GCP_PROJECT=<PROJECT> make cloudrun-build, then deploy it to Cloud Run GPU or Vertex AI (see
Build the Serving Image and the deploy guides).


Earlier versions were developed internally; this is the first release in this repository.

  • Pre-gated prior fusion and co-denoised evidence slots (pkg/decisionindex, dgem systemone serve).
    Questions on /v1/systemone accept optional prior_logits (log-linear Product-of-Experts fusion via
    --prior-weight, --hesitation-gate, and --prior-gate-mode confident|hesitant|proportional|always, preserving
    pre-fusion raw_entropy and raw_normalized_entropy for Stage 2 cascade gating) and evidence_prompt +
    evidence_criteria (co-denoising a companion <question>_evidence slot on the same diffusion canvas, plus
    templates/multimodal/contact_sheet_verify.json.tmpl).
  • Wide-option shortlist routing and cosine prior normalization (pkg/decisionindex, dgem systemone serve).
    --shortlist-topk (ShortlistFunc, PriorLogitsShortlist, LexicalOverlapShortlist) resolves wide choice
    questions ($K &gt; 26$) in a single forward pass over the top-$M$ options plus catch-all keys while preserving the
    shortlist's normalized_entropy when lifting probabilities to all $K$ options (falling back to 2-stage bracket
    tournaments when prior_logits is absent). NormalizeCosinePriorLogits converts bi-encoder cosine similarities
    into temperature-scaled log-softmax priors (DefaultCosinePriorTemperature = 0.07), and --shortlist-contrastive
    defaults to false.
  • Decision Models Practitioner Guide (docs/practitioners-guide.md). End-to-end architectural guide covering
    Stage-1 restricted-softmax readout, normalized epistemic entropy ($\tilde{H}_m$), graduated production patterns,
    empirical anti-patterns, and deployment topology selection across Apple Silicon, Cloud Run GPU, and Vertex AI.
  • Genkit Go v1.14.0 examples (examples/). Runnable standalone module (examples/go.mod) bridging .json.tmpl
    decision policies to Genkit's systemonex (POST /v1/systemone) plugin (examples/dgemgenkit/), including
    hesitation-gated tool-approval interrupts (examples/genkit-tool-approval/) and two-stage gemini-3.8-flash
    synthesis + concurrent bulk dgem evaluation (examples/genkit-bulk-synth/).
  • Private (PSC) Vertex AI :rawPredict and single-route serving. The serving image dispatches health
    ({"health": true}), /v1/systemone and OpenAI-shaped chat decisions on its single /predict and /rawPredict
    routes. The CLI, gateway, dgem systemone serve, regression matrix, synthetic probe and contract runner accept
    private PSC Vertex endpoint URLs (http(s)://<ID>-<REGION>-<NUM>.prediction.p.vertexai.goog/v1/projects/.../endpoints/<ID>:rawPredict,
    including plain HTTP on port 80 inside the VPC) and send every call to that single :rawPredict URL.
  • Experimental 52-option label sets (az_aa, az_lower). The serving image (DEFAULT_LABELS, request labels)
    and dgem systemone serve --labels support az_aa (A–Z then AA–AZ) and az_lower (A–Z then a–z,
    requests of up to 10 questions) to read up to 52 choice options in one pass and bracket in 52-wide groups above that.
    Default az (A–Z, 26 options) is unchanged.
  • Bulk / batch decision recipes and guide. deploy/batch/ adds ready-to-run Cloud Run Jobs, Dataflow (dgem_beam.py)
    and fan-out workers (batch_worker.py, sending X-DGem-Key from DGEM_SERVER_KEY in remote mode), documented in
    To batch or not to batch.
  • New policy template: templates/github_spam_triage.json.tmpl (single-pass spam gate + 9-way category classification
    for GitHub issues, PRs and discussions).
  • Adapter server time telemetry: evaluation_trace.server_ms sums diagnostics.timing.total_ms across passes; the
    matrix latency runner records server p90/p95/p99 alongside wall time.
  • /v1/systemone: per-caller pass-through for requests the serving image can answer as sent.
    --systemone-raw-users / DGEM_SYSTEMONE_RAW_USERS (comma-separated verified identities, * for all; default
    none) forwards a listed caller's adapter-mode request unchanged when it has at most 8 questions, every choice and
    score has 2-26 options or levels, and types are literally choice/noul/score (media is converted to images).
    Other requests still use the adapter. Why: the adapter builds a different prompt (a text state wrapped as JSON,
    questions and options sorted, its own instructions) and response shape (no yes/no probabilities, sorted keys, no
    model/usage) than the serving image, which changed a client's small-turn answers when score questions were added
    to the adapter. The span log records dgem.systemone.mode (passthrough or adapter).
  • Serving image: optional service key (X-DGem-Key). With DGEM_SERVER_KEY set (comma-separated to rotate),
    every POST needs a matching X-DGem-Key header; GET /health stays open. Unlike API_KEY it works on Vertex AI
    and Cloud Run, where Authorization carries the Google token. The dgem CLI, the gateway, dgem systemone serve,
    scripts/matrix, probe.py, serving_speed.py and contract_diff.py send the first entry of their own
    DGEM_SERVER_KEY; the gateway never forwards a caller's header. The Vertex AI, Cloud Run, gateway and probe deploy
    scripts set it from the Secret Manager secret dgem-server-key when it exists (SERVER_KEY_SECRET names another).
    Use it for any endpoint that more than your own services can reach, such as a Vertex AI dedicated endpoint
    (Vertex AI).
  • Gateway: caller authentication. dgem serve --iap-audience (DGEM_IAP_AUDIENCE) verifies the IAP JWT on every
    request (signature, audience, expiry) and takes the caller's identity from it, discarding identity headers sent by
    the client; --api-keys (DGEM_GATEWAY_KEYS, header X-DGem-Api-Key) serves self-hosted gateways without IAP.
    With either set, requests without valid credentials get 401, with the same body whatever is configured (the
    accepted methods are printed at startup). GET /health stays open and reports only liveness, the version and
    whether body logging is on. Behaviour change: it no longer lists default_backend, upstream_url or
    vertex_url; GET /api/backend-config reports them, the upstream URL as cloudrun_url.
    deploy_cloudrun_gateway.sh sets the Cloud Run IAP audience by default (VERIFY_IAP=0 to skip). Callers set
    DGEM_GATEWAY_KEY: the CLI sends it only to the gateway in DGEM_GATEWAY_URL (same scheme, host and port) and
    dgem mcp --remote to its remote. No dgem client keeps X-DGem-Api-Key or X-DGem-Key on a redirect to another
    origin, and the gateway never forwards a caller's key upstream. Without either option the gateway warns at startup
    when it listens on a non-loopback address.
  • Image URLs are fetched by dgem, never by the serving image. The gateway (/api/decide, MCP, /api/locate,
    /v1/systemone including ?raw=1, and the /v1/chat/completions proxy) fetches http(s) image URLs with its
    public-address-only client and forwards data: URIs (unfetchable or non-image URLs: 422); the CLI fetches from the
    caller's network and does the same. Behaviour change: the serving image refuses http(s) image URLs with 400 by
    default (DGEM_IMAGE_URLS=deny; allow restores the old behaviour), because vLLM runs with network egress and a URL
    that passed the gateway's check could rebind or redirect to the metadata server or internal hosts.
  • Audio and video are refused with 400 by the serving image, the gateway and dgem systemone serve (audio,
    video, input_audio, video_url and similar fields or chat content parts), instead of being answered as if they
    were absent. Send video as sampled frames in images and audio as a transcript.
  • Requests the model server refuses are 4xx, not 500/502. The serving image answers 422 (400 on the chat route)
    when vLLM refuses a request, such as an image it can't fetch or decode or a prompt over the context length; the
    gateway and dgem systemone serve pass such refusals on with the server's message. Behaviour change:
    /api/decide returns 422 instead of 502 for them and no longer retries them as cold starts; unreachable or failing
    servers stay 502. The gateway API reference documents the 400/401/422/502 meanings.
  • /v1/systemone adapter: score questions, one-option questions, media.
    • score questions (criteria an array of levels) are read with the rest in batches of at most 8; answers follow
      the serving image's form (score = sum(i·p_i), probabilities keyed "0".."n-1", legend). Every answer now
      carries confidence.
    • A choice with one option or a score with one level is answered without a model call.
    • media: [{mime_type, data}] with image/* (data: URI or raw base64) is an alias for images; other types get 400....
Read more