@astrale-os/adapter-cloudflare 0.1.10 → 0.2.1
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/package.json +2 -2
- package/template/.agents/skills/astrale-cli/SKILL.md +1 -1
- package/template/.agents/skills/astrale-domain/SKILL.md +2 -1
- package/template/client/README.md +25 -23
- package/template/client/__tests__/app.test.tsx +44 -88
- package/template/client/__tests__/harness.ts +11 -16
- package/template/client/__tests__/kernel.test.ts +9 -35
- package/template/client/__tests__/seam.test.tsx +22 -18
- package/template/client/src/app.tsx +11 -17
- package/template/client/src/shell/use-capability.ts +1 -3
- package/template/client/src/shell/use-node.ts +2 -2
- package/template/client/src/shell/view-router.tsx +3 -4
- package/template/client/src/status/components/StatusCard.tsx +50 -0
- package/template/client/src/status/components/index.ts +1 -0
- package/template/client/src/status/hooks/index.ts +3 -0
- package/template/client/src/{monitor → status}/hooks/useCheck.mutation.ts +2 -2
- package/template/client/src/{monitor/hooks/useMonitor.query.ts → status/hooks/useCheckable.query.ts} +8 -8
- package/template/client/src/status/index.ts +7 -0
- package/template/client/src/status/status.api.ts +12 -0
- package/template/client/src/status/status.mappers.ts +19 -0
- package/template/client/src/status/status.types.ts +11 -0
- package/template/client/src/styles.css +5 -0
- package/template/client/src/ui/StatusBadge.tsx +31 -0
- package/template/client/src/ui/index.ts +6 -2
- package/template/client/src/views/status.tsx +28 -0
- package/template/client/vite.config.ts +2 -3
- package/template/client/vitest.config.ts +1 -2
- package/template/core/monitor/health.ts +19 -4
- package/template/core/monitor/keys.ts +14 -2
- package/template/core/monitor/node.ts +27 -21
- package/template/deps.ts +2 -1
- package/template/integrations/prober/http.ts +4 -15
- package/template/integrations/prober/mock.ts +1 -5
- package/template/integrations/prober/port.ts +0 -2
- package/template/integrations/prober/registry.ts +6 -7
- package/template/package.json +2 -2
- package/template/pnpm-workspace.yaml +2 -0
- package/template/runtime/index.ts +51 -39
- package/template/runtime/monitor/check.ts +9 -9
- package/template/runtime/monitor/index.ts +4 -7
- package/template/runtime/monitor/seed.ts +67 -46
- package/template/runtime/monitor/watch.ts +6 -12
- package/template/runtime/{monitor/shared.ts → shared.ts} +7 -3
- package/template/runtime/status-page/add.ts +21 -0
- package/template/runtime/status-page/check.ts +50 -0
- package/template/runtime/status-page/create.ts +24 -0
- package/template/runtime/status-page/index.ts +8 -0
- package/template/schema/index.ts +5 -5
- package/template/schema/monitor.ts +62 -48
- package/template/views/index.ts +4 -5
- package/template/views/status-page.ts +16 -0
- package/template/client/src/monitor/components/MonitorCard.tsx +0 -50
- package/template/client/src/monitor/components/index.ts +0 -1
- package/template/client/src/monitor/hooks/index.ts +0 -3
- package/template/client/src/monitor/index.ts +0 -6
- package/template/client/src/monitor/monitor.api.ts +0 -11
- package/template/client/src/monitor/monitor.mappers.ts +0 -38
- package/template/client/src/monitor/monitor.types.ts +0 -23
- package/template/client/src/monitor/ui/MonitorDetails.UI.tsx +0 -38
- package/template/client/src/monitor/ui/StatusBadge.UI.tsx +0 -14
- package/template/client/src/monitor/ui/index.ts +0 -8
- package/template/client/src/views/monitor.tsx +0 -30
- package/template/pnpm-lock.yaml +0 -2766
- package/template/runtime/monitor/dependsOn.ts +0 -16
- package/template/views/monitor.ts +0 -22
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Monitor.dependsOn` (instance) — link this Monitor to another it relies on via
|
|
3
|
-
* a `depends_on` edge. `target` is any node address (a tree path or `@<id>`).
|
|
4
|
-
*/
|
|
5
|
-
import { DEPENDS_ON_EDGE } from '../../core/monitor'
|
|
6
|
-
|
|
7
|
-
import type { CallableKernel } from './shared'
|
|
8
|
-
|
|
9
|
-
export async function dependsOn(
|
|
10
|
-
kernel: CallableKernel,
|
|
11
|
-
selfPathRaw: string,
|
|
12
|
-
params: { target: string },
|
|
13
|
-
): Promise<{ linked: string }> {
|
|
14
|
-
await kernel.call(`${selfPathRaw}::link`, { edgeClass: DEPENDS_ON_EDGE, target: params.target })
|
|
15
|
-
return { linked: params.target }
|
|
16
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `ui-monitor` — a rich View backed by the `client/` React + Vite SPA (instead of
|
|
3
|
-
* an inline-HTML `render` like `welcome`). Because it declares `mount` rather
|
|
4
|
-
* than `render`, the View node's iframe binding points at
|
|
5
|
-
* `<serving url>/ui/monitor` — the SDK stamps it from the worker's live URL when
|
|
6
|
-
* it builds the install bundle. The Cloudflare adapter serves `/ui/*` from
|
|
7
|
-
* `../.dist` (built by `client/` with base `/ui/`) via the Worker's `ASSETS`
|
|
8
|
-
* binding.
|
|
9
|
-
*
|
|
10
|
-
* `viewFor: selfOf(Monitor)` attaches a `view_for` edge to the `Monitor` class
|
|
11
|
-
* meta-node, so the GUI offers this view for any Monitor instance.
|
|
12
|
-
*/
|
|
13
|
-
import { selfOf } from '@astrale-os/kernel-dsl'
|
|
14
|
-
import { defineView } from '@astrale-os/sdk'
|
|
15
|
-
|
|
16
|
-
import { Monitor } from '../schema/monitor'
|
|
17
|
-
|
|
18
|
-
export const monitor = defineView({
|
|
19
|
-
auth: 'public',
|
|
20
|
-
mount: '/ui/monitor',
|
|
21
|
-
viewFor: selfOf(Monitor),
|
|
22
|
-
})
|