create-windy 0.4.1 → 0.5.0
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.
- package/dist/cli.js +258 -121
- package/package.json +1 -1
- package/template/.windy-template.json +2 -2
- package/template/apps/agent-server/adk_web_agents/canonical_debug/agent.py +29 -9
- package/template/apps/agent-server/adk_web_agents/services.py +25 -0
- package/template/apps/agent-server/src/southwind_agent_server/adk_adapter.py +40 -11
- package/template/apps/agent-server/src/southwind_agent_server/adk_debug_sessions.py +325 -0
- package/template/apps/agent-server/src/southwind_agent_server/adk_model.py +70 -6
- package/template/apps/agent-server/src/southwind_agent_server/adk_tools.py +1 -1
- package/template/apps/agent-server/src/southwind_agent_server/app.py +16 -4
- package/template/apps/agent-server/src/southwind_agent_server/approval_resolution.py +30 -0
- package/template/apps/agent-server/src/southwind_agent_server/contracts.py +9 -0
- package/template/apps/agent-server/src/southwind_agent_server/deterministic.py +2 -1
- package/template/apps/agent-server/src/southwind_agent_server/engine.py +3 -1
- package/template/apps/agent-server/src/southwind_agent_server/openai_engine.py +95 -130
- package/template/apps/agent-server/src/southwind_agent_server/openai_engine_validation.py +133 -0
- package/template/apps/agent-server/src/southwind_agent_server/openai_provider.py +89 -20
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_insert.py +34 -0
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_queries.py +234 -0
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_replay.py +44 -0
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_status.py +83 -0
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_store.py +331 -0
- package/template/apps/agent-server/src/southwind_agent_server/postgres_report_summary.py +304 -0
- package/template/apps/agent-server/src/southwind_agent_server/report_lifecycle.py +217 -0
- package/template/apps/agent-server/src/southwind_agent_server/report_metrics.py +149 -0
- package/template/apps/agent-server/src/southwind_agent_server/report_presenter.py +280 -0
- package/template/apps/agent-server/src/southwind_agent_server/report_routes.py +126 -0
- package/template/apps/agent-server/src/southwind_agent_server/report_store.py +344 -0
- package/template/apps/agent-server/src/southwind_agent_server/report_types.py +111 -0
- package/template/apps/agent-server/src/southwind_agent_server/runtime_factory.py +31 -2
- package/template/apps/agent-server/src/southwind_agent_server/service.py +56 -51
- package/template/apps/agent-server/src/southwind_agent_server/signal_events.py +18 -1
- package/template/apps/agent-server/tests/test_adk_adapter.py +7 -9
- package/template/apps/agent-server/tests/test_adk_debug_sessions.py +215 -0
- package/template/apps/agent-server/tests/test_adk_web_canonical_debug.py +48 -1
- package/template/apps/agent-server/tests/test_openai_provider.py +58 -6
- package/template/apps/agent-server/tests/test_postgres_report_status.py +59 -0
- package/template/apps/agent-server/tests/test_postgres_report_summary.py +298 -0
- package/template/apps/agent-server/tests/test_provider_attempt_reporting.py +152 -0
- package/template/apps/agent-server/tests/test_report_attempt_lifecycle.py +126 -0
- package/template/apps/agent-server/tests/test_report_resilience.py +181 -0
- package/template/apps/agent-server/tests/test_report_store.py +286 -0
- package/template/apps/agent-server/tests/test_report_summary_parity.py +115 -0
- package/template/apps/agent-server/tests/test_report_terminal_sync.py +177 -0
- package/template/apps/server/src/agent/debug-session-facade-provider-failure.test.ts +269 -0
- package/template/apps/server/src/agent/debug-session-facade.test.ts +335 -0
- package/template/apps/server/src/agent/debug-session-facade.ts +302 -0
- package/template/apps/server/src/agent/debug-session-id.test.ts +37 -0
- package/template/apps/server/src/agent/debug-session-id.ts +37 -0
- package/template/apps/server/src/agent/debug-session-provider-reader.ts +54 -0
- package/template/apps/server/src/agent/debug-session-routes.test.ts +64 -0
- package/template/apps/server/src/agent/debug-session-routes.ts +73 -0
- package/template/apps/server/src/agent/debug-session-validation.ts +106 -0
- package/template/apps/server/src/agent/drizzle-run-binding-repository.ts +2 -0
- package/template/apps/server/src/agent/provider-input-governance.test.ts +18 -0
- package/template/apps/server/src/agent/provider-input-governance.ts +37 -1
- package/template/apps/server/src/agent/remote-runtime.test.ts +7 -0
- package/template/apps/server/src/agent/remote-runtime.ts +1 -0
- package/template/apps/server/src/agent/run-authorization.test.ts +98 -0
- package/template/apps/server/src/agent/run-authorization.ts +32 -1
- package/template/apps/server/src/agent/run-binding-repository.ts +1 -0
- package/template/apps/server/src/agent/run-contracts.ts +5 -0
- package/template/apps/server/src/agent/run-facade-adk-debug.test.ts +39 -0
- package/template/apps/server/src/agent/run-facade.test.ts +78 -0
- package/template/apps/server/src/agent/run-facade.ts +33 -3
- package/template/apps/server/src/agent/run-input-commitment.ts +50 -0
- package/template/apps/server/src/agent/run-input-verification.ts +41 -0
- package/template/apps/server/src/agent/runtime-bootstrap-report.test.ts +136 -0
- package/template/apps/server/src/agent/runtime-bootstrap.ts +66 -1
- package/template/apps/server/src/agent/tool-host.test.ts +1 -0
- package/template/apps/server/src/agent/unavailable-routes.ts +4 -0
- package/template/apps/server/src/ai-runtime-report/actor-directory.ts +94 -0
- package/template/apps/server/src/ai-runtime-report/actor-handle.test.ts +27 -0
- package/template/apps/server/src/ai-runtime-report/actor-handle.ts +81 -0
- package/template/apps/server/src/ai-runtime-report/contracts.ts +91 -0
- package/template/apps/server/src/ai-runtime-report/remote-parser.ts +212 -0
- package/template/apps/server/src/ai-runtime-report/remote-port.ts +138 -0
- package/template/apps/server/src/ai-runtime-report/routes.ts +172 -0
- package/template/apps/server/src/ai-runtime-report/scope.ts +63 -0
- package/template/apps/server/src/ai-runtime-report/service.test.ts +271 -0
- package/template/apps/server/src/ai-runtime-report/service.ts +206 -0
- package/template/apps/server/src/license/runtime-audit-reliability.test.ts +2 -0
- package/template/apps/server/src/license/runtime-service.test.ts +6 -0
- package/template/apps/server/src/module-host/ai-operation-port.test.ts +63 -0
- package/template/apps/server/src/module-host/ai-operation-port.ts +30 -5
- package/template/apps/server/src/module-host/debug-session-provider-registration.test.ts +162 -0
- package/template/apps/server/src/module-host/debug-session-provider-registration.ts +84 -0
- package/template/apps/server/src/module-host/initialize-contracts.ts +7 -0
- package/template/apps/server/src/module-host/initialize.ts +6 -197
- package/template/apps/server/src/module-host/request-context.ts +1 -0
- package/template/apps/server/src/module-host/scoped-host.ts +214 -0
- package/template/apps/server/src/module-host.ts +1 -0
- package/template/apps/server/src/runtime-adk-debug.test.ts +25 -1
- package/template/apps/server/src/runtime-adk-debug.ts +8 -2
- package/template/apps/server/src/system/operations.test.ts +54 -0
- package/template/apps/server/src/system/operations.ts +23 -1
- package/template/apps/server/src/system/seed.test.ts +4 -0
- package/template/apps/server/src/system/system-resource-monitoring.test.ts +82 -0
- package/template/apps/server/src/system/system-resource-monitoring.ts +300 -0
- package/template/apps/web/src/layout/AppSidebar.vue +6 -1
- package/template/apps/web/src/layout/AppSidebar.webtest.ts +2 -0
- package/template/apps/web/src/pages/auth/LoginPage.vue +6 -1
- package/template/apps/web/src/pages/settings/BrandingSettingsSection.vue +20 -3
- package/template/apps/web/src/pages/settings/BrandingSettingsSection.webtest.ts +80 -0
- package/template/apps/web/src/pages/system/AiRuntimePage.vue +129 -0
- package/template/apps/web/src/pages/system/SystemOperationsPage.vue +2 -1
- package/template/apps/web/src/pages/system/ai-runtime-presenter.ts +60 -0
- package/template/apps/web/src/pages/system/ai-runtime-presenter.webtest.ts +48 -0
- package/template/apps/web/src/pages/system/audit-time-range.ts +34 -2
- package/template/apps/web/src/pages/system/components/AuditLogFilters.vue +4 -3
- package/template/apps/web/src/pages/system/components/AuditLogFilters.webtest.ts +26 -1
- package/template/apps/web/src/pages/system/components/OperationGpuMonitor.vue +98 -0
- package/template/apps/web/src/pages/system/components/OperationGpuMonitor.webtest.ts +61 -0
- package/template/apps/web/src/pages/system/components/OperationServiceMonitor.vue +53 -0
- package/template/apps/web/src/pages/system/components/OperationServiceMonitor.webtest.ts +20 -1
- package/template/apps/web/src/pages/system/components/SystemResourcePage.webtest.ts +14 -1
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeActivityChart.vue +85 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeCharts.webtest.ts +82 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeFilters.vue +98 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeFilters.webtest.ts +27 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeRunDetailDialog.vue +168 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeRunTable.vue +130 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeSummaryCards.vue +82 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeSummaryCards.webtest.ts +102 -0
- package/template/apps/web/src/pages/system/components/ai-runtime/AiRuntimeTokenByModelChart.vue +101 -0
- package/template/apps/web/src/pages/system/composables/useAiRuntimeReport.ts +185 -0
- package/template/apps/web/src/pages/system/composables/useAiRuntimeReport.webtest.ts +158 -0
- package/template/apps/web/src/pages/system/composables/useSystemResource.ts +21 -7
- package/template/apps/web/src/router/error-navigation.ts +22 -0
- package/template/apps/web/src/router/index.ts +12 -23
- package/template/apps/web/src/router/platform-admin-route-bindings.ts +4 -0
- package/template/apps/web/src/services/ai-runtime-api.ts +164 -0
- package/template/apps/web/src/services/ai-runtime-api.webtest.ts +111 -0
- package/template/apps/web/src/services/operations-api.ts +28 -0
- package/template/docker-compose.agent-debug.yml +1 -1
- package/template/docs/architecture/ai-runtime.md +2 -1
- package/template/docs/architecture/module-host.md +3 -0
- package/template/docs/platform/agent-run-attestation.md +65 -0
- package/template/docs/platform/agent-runtime-observability.md +135 -0
- package/template/docs/platform/agent-runtime.md +47 -3
- package/template/docs/platform/operations-overview.md +13 -0
- package/template/docs/platform/platform-authentication.md +4 -3
- package/template/packages/config/package.json +1 -1
- package/template/packages/database/drizzle/0045_tiny_cassandra_nova.sql +65 -0
- package/template/packages/database/drizzle/0046_tranquil_living_mummy.sql +6 -0
- package/template/packages/database/drizzle/0047_oval_luke_cage.sql +18 -0
- package/template/packages/database/drizzle/meta/0045_snapshot.json +8814 -0
- package/template/packages/database/drizzle/meta/0046_snapshot.json +8820 -0
- package/template/packages/database/drizzle/meta/0047_snapshot.json +8835 -0
- package/template/packages/database/drizzle/meta/_journal.json +21 -0
- package/template/packages/database/package.json +1 -1
- package/template/packages/database/src/agent-runtime-schema.test.ts +54 -0
- package/template/packages/database/src/schema/agent-runtime.ts +114 -0
- package/template/packages/jobs/package.json +1 -1
- package/template/packages/modules/package.json +1 -1
- package/template/packages/modules/src/system-admin-routes.ts +10 -0
- package/template/packages/modules/src/system-admin-ui-catalog.ts +1 -1
- package/template/packages/modules/src/system-api-control-plane.ts +17 -1
- package/template/packages/modules/src/system-audit-actions.ts +10 -0
- package/template/packages/modules/src/system-features.ts +8 -0
- package/template/packages/modules/src/system-module-catalog.test.ts +35 -0
- package/template/packages/modules/src/system-module-catalog.ts +15 -4
- package/template/packages/modules/src/system-modules-access.test.ts +69 -0
- package/template/packages/modules/src/system-modules.ts +13 -0
- package/template/packages/modules/src/system-permissions.ts +2 -0
- package/template/packages/server-sdk/index.ts +11 -0
- package/template/packages/server-sdk/package.json +2 -1
- package/template/packages/server-sdk/src/ai-operation-port.ts +5 -0
- package/template/packages/server-sdk/src/debug-session-provider.ts +63 -0
- package/template/packages/server-sdk/src/module-host.ts +5 -0
- package/template/packages/shared/index.ts +3 -0
- package/template/packages/shared/package.json +1 -1
- package/template/packages/shared/src/ai-runtime-report.ts +134 -0
- package/template/scripts/lib/postgres-regression.ts +201 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
CREATE TABLE "agent_runtime_report_attempts" (
|
|
2
|
+
"attempt_id" varchar(80) PRIMARY KEY NOT NULL,
|
|
3
|
+
"run_id" varchar(80) NOT NULL,
|
|
4
|
+
"sequence" integer NOT NULL,
|
|
5
|
+
"tool_round" integer NOT NULL,
|
|
6
|
+
"deployment_key" varchar(200) NOT NULL,
|
|
7
|
+
"requested_model" varchar(200) NOT NULL,
|
|
8
|
+
"reported_model" varchar(200),
|
|
9
|
+
"outcome" varchar(32) NOT NULL,
|
|
10
|
+
"cache_status" varchar(16) NOT NULL,
|
|
11
|
+
"usage_source" varchar(32) NOT NULL,
|
|
12
|
+
"input_tokens" integer,
|
|
13
|
+
"output_tokens" integer,
|
|
14
|
+
"cached_input_tokens" integer,
|
|
15
|
+
"reasoning_tokens" integer,
|
|
16
|
+
"total_tokens" integer,
|
|
17
|
+
"first_token_latency_ms" integer,
|
|
18
|
+
"duration_ms" integer,
|
|
19
|
+
"safe_error_code" varchar(80),
|
|
20
|
+
"started_at" double precision NOT NULL,
|
|
21
|
+
"finished_at" double precision,
|
|
22
|
+
CONSTRAINT "ck_agent_report_attempts_sequence" CHECK ("agent_runtime_report_attempts"."sequence" > 0),
|
|
23
|
+
CONSTRAINT "ck_agent_report_attempts_tool_round" CHECK ("agent_runtime_report_attempts"."tool_round" > 0),
|
|
24
|
+
CONSTRAINT "ck_agent_report_attempts_outcome" CHECK ("agent_runtime_report_attempts"."outcome" in ('completed', 'failed', 'cancelled', 'blocked', 'abandoned')),
|
|
25
|
+
CONSTRAINT "ck_agent_report_attempts_cache" CHECK ("agent_runtime_report_attempts"."cache_status" in ('hit', 'miss', 'unknown')),
|
|
26
|
+
CONSTRAINT "ck_agent_report_attempts_usage_source" CHECK ("agent_runtime_report_attempts"."usage_source" in ('provider-reported', 'estimated', 'unknown')),
|
|
27
|
+
CONSTRAINT "ck_agent_report_attempts_non_negative" CHECK (coalesce("agent_runtime_report_attempts"."input_tokens", 0) >= 0
|
|
28
|
+
and coalesce("agent_runtime_report_attempts"."output_tokens", 0) >= 0
|
|
29
|
+
and coalesce("agent_runtime_report_attempts"."cached_input_tokens", 0) >= 0
|
|
30
|
+
and coalesce("agent_runtime_report_attempts"."reasoning_tokens", 0) >= 0
|
|
31
|
+
and coalesce("agent_runtime_report_attempts"."total_tokens", 0) >= 0
|
|
32
|
+
and coalesce("agent_runtime_report_attempts"."first_token_latency_ms", 0) >= 0
|
|
33
|
+
and coalesce("agent_runtime_report_attempts"."duration_ms", 0) >= 0)
|
|
34
|
+
);
|
|
35
|
+
--> statement-breakpoint
|
|
36
|
+
CREATE TABLE "agent_runtime_report_runs" (
|
|
37
|
+
"run_id" varchar(80) PRIMARY KEY NOT NULL,
|
|
38
|
+
"operation_key" varchar(200) NOT NULL,
|
|
39
|
+
"release_id" varchar(80) NOT NULL,
|
|
40
|
+
"trace_id" varchar(160) NOT NULL,
|
|
41
|
+
"actor_id" varchar(64),
|
|
42
|
+
"actor_type" varchar(32),
|
|
43
|
+
"department_id" varchar(64),
|
|
44
|
+
"status" varchar(32) NOT NULL,
|
|
45
|
+
"safe_error_code" varchar(80),
|
|
46
|
+
"started_at" double precision,
|
|
47
|
+
"finished_at" double precision,
|
|
48
|
+
"duration_ms" integer,
|
|
49
|
+
"created_at" double precision NOT NULL,
|
|
50
|
+
"updated_at" double precision NOT NULL,
|
|
51
|
+
"expires_at" double precision NOT NULL,
|
|
52
|
+
CONSTRAINT "ck_agent_report_runs_status" CHECK ("agent_runtime_report_runs"."status" in ('accepted', 'running', 'awaiting-approval', 'completed', 'failed', 'cancelled')),
|
|
53
|
+
CONSTRAINT "ck_agent_report_runs_duration" CHECK ("agent_runtime_report_runs"."duration_ms" is null or "agent_runtime_report_runs"."duration_ms" >= 0)
|
|
54
|
+
);
|
|
55
|
+
--> statement-breakpoint
|
|
56
|
+
ALTER TABLE "agent_runtime_report_attempts" ADD CONSTRAINT "agent_runtime_report_attempts_run_id_agent_runtime_report_runs_run_id_fk" FOREIGN KEY ("run_id") REFERENCES "public"."agent_runtime_report_runs"("run_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
57
|
+
CREATE UNIQUE INDEX "uk_agent_report_attempts_sequence" ON "agent_runtime_report_attempts" USING btree ("run_id","sequence");--> statement-breakpoint
|
|
58
|
+
CREATE INDEX "idx_agent_report_attempts_model" ON "agent_runtime_report_attempts" USING btree ("deployment_key","requested_model","started_at");--> statement-breakpoint
|
|
59
|
+
CREATE INDEX "idx_agent_report_attempts_outcome" ON "agent_runtime_report_attempts" USING btree ("outcome","started_at");--> statement-breakpoint
|
|
60
|
+
CREATE INDEX "idx_agent_report_runs_created" ON "agent_runtime_report_runs" USING btree ("created_at");--> statement-breakpoint
|
|
61
|
+
CREATE INDEX "idx_agent_report_runs_status" ON "agent_runtime_report_runs" USING btree ("status","created_at");--> statement-breakpoint
|
|
62
|
+
CREATE INDEX "idx_agent_report_runs_operation" ON "agent_runtime_report_runs" USING btree ("operation_key","created_at");--> statement-breakpoint
|
|
63
|
+
CREATE INDEX "idx_agent_report_runs_actor" ON "agent_runtime_report_runs" USING btree ("actor_id","created_at");--> statement-breakpoint
|
|
64
|
+
CREATE INDEX "idx_agent_report_runs_department" ON "agent_runtime_report_runs" USING btree ("department_id","created_at");--> statement-breakpoint
|
|
65
|
+
CREATE INDEX "idx_agent_report_runs_expiry" ON "agent_runtime_report_runs" USING btree ("expires_at");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
ALTER TABLE "agent_runtime_report_attempts" DROP CONSTRAINT "ck_agent_report_attempts_outcome";--> statement-breakpoint
|
|
2
|
+
UPDATE "agent_runtime_report_attempts"
|
|
3
|
+
SET "finished_at" = greatest(
|
|
4
|
+
"started_at",
|
|
5
|
+
extract(epoch from clock_timestamp())
|
|
6
|
+
),
|
|
7
|
+
"duration_ms" = greatest(
|
|
8
|
+
0,
|
|
9
|
+
round(
|
|
10
|
+
(
|
|
11
|
+
greatest("started_at", extract(epoch from clock_timestamp()))
|
|
12
|
+
- "started_at"
|
|
13
|
+
) * 1000
|
|
14
|
+
)
|
|
15
|
+
)::integer
|
|
16
|
+
WHERE "outcome" = 'abandoned' AND "finished_at" IS NULL;--> statement-breakpoint
|
|
17
|
+
CREATE INDEX "idx_agent_report_attempts_started" ON "agent_runtime_report_attempts" USING btree ("started_at");--> statement-breakpoint
|
|
18
|
+
ALTER TABLE "agent_runtime_report_attempts" ADD CONSTRAINT "ck_agent_report_attempts_outcome" CHECK ("agent_runtime_report_attempts"."outcome" in ('running', 'completed', 'failed', 'cancelled', 'blocked', 'abandoned'));
|