aihr 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aihr-0.2.0.data/data/share/aihr/configs/deployable.yaml +26 -0
- aihr-0.2.0.data/data/share/aihr/configs/fleet.yaml +56 -0
- aihr-0.2.0.data/data/share/aihr/configs/hr.toml.example +26 -0
- aihr-0.2.0.data/data/share/aihr/configs/knowledge.yaml +824 -0
- aihr-0.2.0.data/data/share/aihr/configs/models.yaml +81 -0
- aihr-0.2.0.data/data/share/aihr/configs/seats.yaml +206 -0
- aihr-0.2.0.data/data/share/aihr/configs/thresholds.yaml +78 -0
- aihr-0.2.0.dist-info/METADATA +299 -0
- aihr-0.2.0.dist-info/RECORD +130 -0
- aihr-0.2.0.dist-info/WHEEL +5 -0
- aihr-0.2.0.dist-info/entry_points.txt +2 -0
- aihr-0.2.0.dist-info/licenses/LICENSE +21 -0
- aihr-0.2.0.dist-info/top_level.txt +1 -0
- hr/__init__.py +3 -0
- hr/__main__.py +5 -0
- hr/adapters/__init__.py +127 -0
- hr/adapters/anthropic_compat.py +307 -0
- hr/adapters/anthropic_messages.py +43 -0
- hr/adapters/anthropic_stream.py +162 -0
- hr/adapters/base.py +115 -0
- hr/adapters/fleet.py +86 -0
- hr/adapters/openai_compat.py +253 -0
- hr/adapters/openai_endpoint.py +126 -0
- hr/adapters/openai_protocol.py +184 -0
- hr/apply.py +220 -0
- hr/assign/__init__.py +6 -0
- hr/assign/ranker.py +204 -0
- hr/bank_selection.py +253 -0
- hr/bank_versions.py +114 -0
- hr/bench/__init__.py +29 -0
- hr/bench/engine.py +295 -0
- hr/bench/engine_interactive.py +167 -0
- hr/bench/engine_results.py +58 -0
- hr/bench/engine_runners.py +142 -0
- hr/bench/engine_storage.py +134 -0
- hr/bench/livebench.py +163 -0
- hr/bench/manifest.py +57 -0
- hr/bench/prompt_image.py +47 -0
- hr/bench/prompts.py +301 -0
- hr/bench/scorer_attention.py +135 -0
- hr/bench/scorer_code.py +204 -0
- hr/bench/scorer_instruction.py +266 -0
- hr/bench/scorer_reasoning.py +255 -0
- hr/bench/scorer_runtime.py +76 -0
- hr/bench/scorer_shared.py +107 -0
- hr/bench/scorers.py +14 -0
- hr/bench/stress_prompts.py +94 -0
- hr/bench/truths.py +281 -0
- hr/benchmark_banks.py +300 -0
- hr/calibrate.py +14 -0
- hr/calibration_cli.py +177 -0
- hr/calibration_items.py +237 -0
- hr/calibration_models.py +157 -0
- hr/calibration_persistence.py +129 -0
- hr/calibration_runner.py +270 -0
- hr/cli.py +69 -0
- hr/cli_app.py +65 -0
- hr/cli_apply.py +170 -0
- hr/cli_inventory.py +221 -0
- hr/cli_knowledge.py +149 -0
- hr/cli_report_base.py +165 -0
- hr/cli_report_commands.py +125 -0
- hr/cli_report_verdict.py +165 -0
- hr/cli_selection.py +85 -0
- hr/config.py +305 -0
- hr/config_resources.py +73 -0
- hr/db.py +176 -0
- hr/db_schema.py +249 -0
- hr/decision.py +256 -0
- hr/deployable.py +130 -0
- hr/deployment_manager.py +1222 -0
- hr/discover.py +192 -0
- hr/fleet.py +228 -0
- hr/fleet_policy.py +91 -0
- hr/graders/__init__.py +32 -0
- hr/graders/base.py +150 -0
- hr/graders/citation.py +152 -0
- hr/graders/constraint.py +240 -0
- hr/graders/constraint_dsl.py +138 -0
- hr/graders/exact_match.py +234 -0
- hr/graders/llm_judge.py +117 -0
- hr/graders/schema_valid.py +244 -0
- hr/graders/unit_test.py +140 -0
- hr/health.py +253 -0
- hr/health_metrics.py +143 -0
- hr/items/__init__.py +43 -0
- hr/items/loader.py +287 -0
- hr/items/payloads.py +189 -0
- hr/items/schema.py +225 -0
- hr/keyscan.py +264 -0
- hr/models.py +32 -0
- hr/opencfg.py +107 -0
- hr/plugin_safety.py +845 -0
- hr/publish.py +151 -0
- hr/recommend.py +804 -0
- hr/recommendation_constraints.py +318 -0
- hr/reference.py +39 -0
- hr/registry.py +96 -0
- hr/release_manifest.py +308 -0
- hr/research.py +38 -0
- hr/sandbox.py +98 -0
- hr/scheduler/__init__.py +15 -0
- hr/scheduler/taxonomy.py +258 -0
- hr/schema_migration.py +78 -0
- hr/scorer_calibration.py +764 -0
- hr/seats/__init__.py +20 -0
- hr/seats/health_gates.py +210 -0
- hr/seats/health_policy.py +104 -0
- hr/seats/rolespec.py +217 -0
- hr/seats/seed.py +194 -0
- hr/stage0.py +264 -0
- hr/stage0_call.py +155 -0
- hr/stage0_cli.py +184 -0
- hr/stage0_loop.py +125 -0
- hr/stage0_plan.py +89 -0
- hr/stage0_selection.py +251 -0
- hr/stage0_stats.py +201 -0
- hr/stage0_storage.py +344 -0
- hr/stage1.py +265 -0
- hr/stage1_cli.py +210 -0
- hr/stage1_loop.py +301 -0
- hr/stage1_plan.py +103 -0
- hr/stage1_resume.py +148 -0
- hr/stage1_selection.py +163 -0
- hr/stage1_state.py +157 -0
- hr/stage1_stats.py +71 -0
- hr/stats/__init__.py +10 -0
- hr/stats/bootstrap.py +131 -0
- hr/stats/empirical_bernstein.py +230 -0
- hr/stats/sequential.py +183 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# deployable.yaml — the ONLY hand-maintained model list in this repo.
|
|
2
|
+
#
|
|
3
|
+
# Every model the opencode config declares (opencode.jsonc provider.*;
|
|
4
|
+
# models) is derived automatically — add/retire it there and it flows into
|
|
5
|
+
# stage sweep pools / discover / routing / the deployable set with ZERO
|
|
6
|
+
# edits here (hr/fleet.py resolves the fleet at runtime).
|
|
7
|
+
#
|
|
8
|
+
# `extra_deployable:` lists models served OUTSIDE the opencode config —
|
|
9
|
+
# registry-only providers (kimi-for-coding, deepseek) opencode loads from
|
|
10
|
+
# its own registry. This is user policy, not a mirror.
|
|
11
|
+
#
|
|
12
|
+
# Drift guard: an entry that duplicates a config-declared model is REJECTED
|
|
13
|
+
# at runtime (hr.fleet.merge_with_extras) — the model must be removed from
|
|
14
|
+
# this list, not duplicated. Add the provider's wire here and in the
|
|
15
|
+
# `wire_overrides:` map of configs/fleet.yaml.
|
|
16
|
+
# EXAMPLES ONLY — this tracked file ships with an EMPTY list. A live
|
|
17
|
+
# machine's extra models live in the gitignored configs/deployable.local.yaml
|
|
18
|
+
# overlay (deep-merged by hr.config.load_yaml; the overlay LIST REPLACES
|
|
19
|
+
# this one, it is not appended). First-install: `cp configs/deployable.yaml
|
|
20
|
+
# configs/deployable.local.yaml`, then fill the list with your registry-only
|
|
21
|
+
# models (provider/slug) and declare each provider's wire in the
|
|
22
|
+
# configs/fleet.local.yaml wire_overrides map. An extra duplicating a
|
|
23
|
+
# config-declared model is still REJECTED at runtime (drift guard).
|
|
24
|
+
extra_deployable: []
|
|
25
|
+
# example:
|
|
26
|
+
# - example-provider/example-model-a
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# fleet.yaml — OPTIONAL overrides for the dynamically derived model fleet.
|
|
2
|
+
#
|
|
3
|
+
# The fleet is NOT snapshotted here anymore (hr-unification todo 23's static
|
|
4
|
+
# manifest was rejected: fixed model names drift from opencode's live config).
|
|
5
|
+
# At RUNTIME hr derives the full inventory from the opencode config files
|
|
6
|
+
# themselves — every `provider.*.models` entry in opencode.jsonc (global +
|
|
7
|
+
# project, project merged over global) becomes a fleet model, its wire type
|
|
8
|
+
# derives from the provider's `npm` field via an explicit table, and new
|
|
9
|
+
# models flow into the stage sweep pools / `hr discover` / adapter routing
|
|
10
|
+
# with ZERO edits in this repo.
|
|
11
|
+
#
|
|
12
|
+
# This file exists only for the policy knobs a derivation cannot answer:
|
|
13
|
+
#
|
|
14
|
+
# wire_overrides: wire type for providers whose npm field is absent or
|
|
15
|
+
# unknown. Registry-only providers (kimi-for-coding,
|
|
16
|
+
# deepseek) are NOT declared in opencode.jsonc — their
|
|
17
|
+
# models live under configs/deployable.yaml
|
|
18
|
+
# `extra_deployable:`, and their wire MUST be declared
|
|
19
|
+
# here. The config-declared `azure` gateway carries no
|
|
20
|
+
# npm field either, so its wire is declared here too. A
|
|
21
|
+
# config-declared provider with a known npm needs nothing.
|
|
22
|
+
# Unknown npm + no override = fail loud at runtime (never
|
|
23
|
+
# a silent guess).
|
|
24
|
+
#
|
|
25
|
+
# scope_excludes: providers kept OUT of the default discover/sweep scope.
|
|
26
|
+
# Everything the opencode config declares is in scope by
|
|
27
|
+
# default (new providers auto-inherit); an explicit
|
|
28
|
+
# exclusion here is the ONLY way to opt a provider out.
|
|
29
|
+
#
|
|
30
|
+
# gateway_urls: per-provider gateway base URL used when a provider has
|
|
31
|
+
# NO options.baseURL in the opencode config (registry-only
|
|
32
|
+
# providers such as kimi-for-coding / deepseek, served via
|
|
33
|
+
# their own gateways) — the auth.json fallback in
|
|
34
|
+
# hr.config.get_provider_config and the anthropic adapter
|
|
35
|
+
# resolve through it. Endpoint URLs are routing data, not
|
|
36
|
+
# credentials. A provider with no config block, no gateway
|
|
37
|
+
# entry and no auth entry is a fail-loud config error.
|
|
38
|
+
|
|
39
|
+
# EXAMPLES ONLY — this tracked file ships with zero real deployment values.
|
|
40
|
+
# A live machine declares its real overrides in the gitignored
|
|
41
|
+
# configs/fleet.local.yaml overlay (deep-merged by hr.config.load_yaml:
|
|
42
|
+
# dicts merge per key, LIST VALUES ARE REPLACED, not merged). Keep the real
|
|
43
|
+
# wire_overrides / scope_excludes / gateway_urls entries there; wire
|
|
44
|
+
# overrides must cover every registry-only provider served via the
|
|
45
|
+
# deployable extra_deployable list, and gateway_urls covers providers with
|
|
46
|
+
# no options.baseURL in the opencode config. Unknown npm + no override =
|
|
47
|
+
# fail loud at runtime (never a silent guess).
|
|
48
|
+
|
|
49
|
+
wire_overrides:
|
|
50
|
+
example-provider: anthropic-compat
|
|
51
|
+
|
|
52
|
+
scope_excludes:
|
|
53
|
+
- example-excluded-provider
|
|
54
|
+
|
|
55
|
+
gateway_urls:
|
|
56
|
+
example-provider: https://gateway.example.invalid/v1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# HR v1 configuration template.
|
|
2
|
+
# Copy to hr.toml and adjust for your environment.
|
|
3
|
+
#
|
|
4
|
+
# Secrets (db_password, API keys) are NEVER stored here.
|
|
5
|
+
# Set them via environment variables instead:
|
|
6
|
+
# HR_DSN — full PostgreSQL connection string (preferred); overrides individual db_* fields
|
|
7
|
+
# HR_DB_PASSWORD — password for the wiki DB (required if HR_DSN is not set)
|
|
8
|
+
# HR_DB_USER — DB username (default: "wikijs")
|
|
9
|
+
# HR_BAILIAN_API_KEY — Bailian provider API key
|
|
10
|
+
# WIKI_API_KEY_FILE — path to Wiki.js JWT token file (default: ~/.wikijs-api-key)
|
|
11
|
+
|
|
12
|
+
# --- Database connection (non-secret fields) ---
|
|
13
|
+
db_host = "localhost"
|
|
14
|
+
db_port = 5432
|
|
15
|
+
db_name = "wiki"
|
|
16
|
+
db_user = "wikijs"
|
|
17
|
+
|
|
18
|
+
# Example HR_DSN (uncomment and fill in real values):
|
|
19
|
+
# dsn = "postgresql://username:PASSWORD@localhost:5432/wiki"
|
|
20
|
+
|
|
21
|
+
# --- Optional Wiki.js publish target for `hr publish` ---
|
|
22
|
+
# Without this [wiki] section the command prints "wiki not configured,
|
|
23
|
+
# skipping" and exits 0 — the wiki is an optional publish target.
|
|
24
|
+
# [wiki]
|
|
25
|
+
# graphql_url = "http://localhost:3000/graphql"
|
|
26
|
+
# api_key_file = "~/.wikijs-api-key"
|