@elinpf/dsh-ops-access-ui 0.1.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/lib/index.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Ops-access-ui: carries the browser half of the @-access-mention feature.
3
+ *
4
+ * The host row exists for exactly one reason: client-half discovery. The web
5
+ * app's ClientModuleRegistry scans the composed HOST cordis entries for
6
+ * packages with `dsh.client`, so this package must stay mounted host-plane
7
+ * for the panel script to reach the browser. The host side itself is empty —
8
+ * the candidate data route lives in the ops-access core package (preset
9
+ * plane, next to the data; see its src/index.ts), because reaching the
10
+ * preset-realm service from here would require stateful dsh internals that
11
+ * dual-instance under an external package's node_modules.
12
+ *
13
+ * @module @elinpf/dsh-ops-access-ui
14
+ */
15
+ import type { Context } from '@deepseek-ai/cordis';
16
+ import z from '@deepseek-ai/schemastery';
17
+ export declare const name = "ops-access-ui";
18
+ export declare const inject: string[];
19
+ export declare const Config: z<Schemastery.ObjectS<{}>, Schemastery.ObjectT<{}>>;
20
+ export declare function apply(_ctx: Context, _config: Record<string, never>): void;
21
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js ADDED
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Ops-access-ui: carries the browser half of the @-access-mention feature.
3
+ *
4
+ * The host row exists for exactly one reason: client-half discovery. The web
5
+ * app's ClientModuleRegistry scans the composed HOST cordis entries for
6
+ * packages with `dsh.client`, so this package must stay mounted host-plane
7
+ * for the panel script to reach the browser. The host side itself is empty —
8
+ * the candidate data route lives in the ops-access core package (preset
9
+ * plane, next to the data; see its src/index.ts), because reaching the
10
+ * preset-realm service from here would require stateful dsh internals that
11
+ * dual-instance under an external package's node_modules.
12
+ *
13
+ * @module @elinpf/dsh-ops-access-ui
14
+ */
15
+ import z from '@deepseek-ai/schemastery';
16
+ // ── Plugin identity ───────────────────────────────────────────────────────────
17
+ export const name = 'ops-access-ui';
18
+ export const inject = [];
19
+ // ── Config ───────────────────────────────────────────────────────────────────
20
+ export const Config = z.object({});
21
+ export function apply(_ctx, _config) {
22
+ // Intentionally empty — see the module doc.
23
+ }
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Invariant companion for @elinpf/dsh-ops-access-ui.
3
+ *
4
+ * @module @elinpf/dsh-ops-access-ui/invariant
5
+ */
6
+ /** Cordis companion plugin name. */
7
+ declare const name = "ops-access-ui-invariant";
8
+ /** Service required before the companion can reserve package ownership. */
9
+ declare const inject: string[];
10
+ /**
11
+ * Register this package's invariant companion.
12
+ * @param ctx - Context carrying the invariant service.
13
+ * @returns a promise resolving after registration.
14
+ */
15
+ declare const apply: (ctx: any) => Promise<void>;
16
+ export { apply, inject, name };
17
+ //# sourceMappingURL=invariant.d.ts.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Invariant companion for @elinpf/dsh-ops-access-ui.
3
+ *
4
+ * @module @elinpf/dsh-ops-access-ui/invariant
5
+ */
6
+ const PACKAGE_NAME = '@elinpf/dsh-ops-access-ui';
7
+ /** Cordis companion plugin name. */
8
+ const name = 'ops-access-ui-invariant';
9
+ /** Service required before the companion can reserve package ownership. */
10
+ const inject = ['invariants'];
11
+ /**
12
+ * No runtime invariant: this package appends no session events and owns no
13
+ * durable state — it is a pure browser-half carrier. All credential and
14
+ * grant state lives in the ops-access core package (whose gate owns the
15
+ * relevant invariants); the surfaces here only render route data, and the
16
+ * host row is empty by design (client-bundle discovery only).
17
+ */
18
+ const install = () => { };
19
+ /**
20
+ * Register this package's invariant companion.
21
+ * @param ctx - Context carrying the invariant service.
22
+ * @returns a promise resolving after registration.
23
+ */
24
+ const apply = async (ctx) => {
25
+ ctx.invariants.register(PACKAGE_NAME, install);
26
+ };
27
+ export { apply, inject, name };
28
+ //# sourceMappingURL=invariant.js.map
package/lib/types.d.ts ADDED
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Pure wire types for @elinpf/dsh-ops-access-ui.
3
+ *
4
+ * These mirror the HTTP routes served by the ops-access core package
5
+ * (preset plane): the @-mention list route, the admin routes, and the
6
+ * access-gate's human-side panel routes. Types only — no runtime values;
7
+ * the client half imports them (erased at bundle time) and re-exports the
8
+ * public group for compatibility.
9
+ *
10
+ * @module @elinpf/dsh-ops-access-ui/types
11
+ */
12
+ export interface AccessMentionCandidate {
13
+ kind: string;
14
+ name: string;
15
+ description?: string;
16
+ environment?: string;
17
+ /** Tier readiness — entries with only an rw tier still appear (ro derivable). */
18
+ ro: boolean;
19
+ rw: boolean;
20
+ /** Per-tier probe verdicts for ok tiers, when the provider probes (ticket 10). */
21
+ probe?: {
22
+ ro?: string;
23
+ rw?: string;
24
+ };
25
+ mention: string;
26
+ }
27
+ /** One entry in the merged admin view: envelope + per-tier validation, never fields. */
28
+ export interface AdminEntry {
29
+ kind: string;
30
+ /** Stable id (registry key). */
31
+ name: string;
32
+ /** envelope.name is the editable display label. */
33
+ envelope: {
34
+ name?: string;
35
+ description?: string;
36
+ environment?: string;
37
+ };
38
+ tiers: {
39
+ ro: AdminTierStatus;
40
+ rw: AdminTierStatus;
41
+ };
42
+ }
43
+ /** Validation status of one entry in one tier. */
44
+ export interface AdminTierStatus {
45
+ ok: boolean;
46
+ error?: string;
47
+ /** Capability-probe outcome recorded at save time (ticket 10). */
48
+ probe?: {
49
+ status: 'verified' | 'mismatch' | 'unverifiable';
50
+ detail?: string;
51
+ probedAt: string;
52
+ };
53
+ }
54
+ /** One registered credential kind: its JSON Schema and optional field docs. */
55
+ export interface KindDescriptor {
56
+ kind: string;
57
+ jsonSchema: Record<string, unknown>;
58
+ fieldsDoc?: string;
59
+ fileFields?: string[];
60
+ }
61
+ /** Body for POST /ops-access/admin/entry. */
62
+ export interface SubmitEntryBody {
63
+ kind: string;
64
+ /** The entry's stable id (registry key, paths, mentions). */
65
+ name: string;
66
+ tier: 'ro' | 'rw';
67
+ fields: Record<string, unknown>;
68
+ contentFiles?: Record<string, string>;
69
+ /** Display label (editable, not an identity). */
70
+ displayName?: string;
71
+ description?: string;
72
+ environment?: string;
73
+ }
74
+ /** Generic API result shape from the admin routes. */
75
+ export interface ApiResult {
76
+ ok: boolean;
77
+ error?: string;
78
+ }
79
+ /** One live grant row as reported by GET /ops-access/grants. */
80
+ export interface PanelGrant {
81
+ kind: string;
82
+ name: string;
83
+ expiresAt: number;
84
+ reason: string;
85
+ approvedBy: string;
86
+ remainingMinutes: number;
87
+ }
88
+ /** One parked request_access call awaiting a human decision. */
89
+ export interface PanelPendingRequest {
90
+ id: string;
91
+ session: string;
92
+ /** The dispatching session, when the requester is a spawned sub-agent (血缘). */
93
+ parentSession?: string;
94
+ kind: string;
95
+ name: string;
96
+ requestedTtlMinutes: number;
97
+ reason: string;
98
+ createdAt: number;
99
+ decidesAt: number;
100
+ }
101
+ /** One operator lockdown row as reported by GET /ops-access/grants (ticket 12). */
102
+ export interface PanelDenied {
103
+ kind: string;
104
+ name: string;
105
+ deniedAt: number;
106
+ reason: string;
107
+ deniedBy: string;
108
+ }
109
+ /** One cross-session grant row as reported by GET /ops-access/grants/all. */
110
+ export interface OverviewGrant extends PanelGrant {
111
+ session: string;
112
+ }
113
+ //# sourceMappingURL=types.d.ts.map
package/lib/types.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Pure wire types for @elinpf/dsh-ops-access-ui.
3
+ *
4
+ * These mirror the HTTP routes served by the ops-access core package
5
+ * (preset plane): the @-mention list route, the admin routes, and the
6
+ * access-gate's human-side panel routes. Types only — no runtime values;
7
+ * the client half imports them (erased at bundle time) and re-exports the
8
+ * public group for compatibility.
9
+ *
10
+ * @module @elinpf/dsh-ops-access-ui/types
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=types.js.map
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@elinpf/dsh-ops-access-ui",
3
+ "version": "0.1.0",
4
+ "description": "Browser half carrier for @-mentioning ops-access profiles: the host row exists only for client-bundle discovery; candidates come from GET /ops-access/list served by @elinpf/dsh-ops-access, and mention expansion (agent/pre-step) lives there too.",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./client": {
14
+ "default": "./lib/client.js"
15
+ },
16
+ "./invariant": {
17
+ "types": "./lib/invariant.d.ts",
18
+ "default": "./lib/invariant.js"
19
+ },
20
+ "./types": {
21
+ "types": "./lib/types.d.ts",
22
+ "default": "./lib/types.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "files": [
27
+ "lib/index.js",
28
+ "lib/client.js",
29
+ "lib/invariant.js",
30
+ "lib/types.js",
31
+ "lib/**/*.d.ts",
32
+ "cordis.patch.yml"
33
+ ],
34
+ "dsh": {
35
+ "bundle": {
36
+ "patch": "./cordis.patch.yml"
37
+ },
38
+ "client": {
39
+ "platform": "web"
40
+ }
41
+ },
42
+ "dependencies": {
43
+ "@deepseek-ai/schemastery": "^3.18.1"
44
+ },
45
+ "peerDependencies": {
46
+ "@deepseek-ai/cordis": "^4.0.1",
47
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
48
+ "react": "^18.2.0"
49
+ },
50
+ "devDependencies": {
51
+ "@deepseek-ai/cordis": "4.0.1",
52
+ "esbuild": "^0.24.0",
53
+ "typescript": "^5.4.0",
54
+ "vitest": "^4.1.11",
55
+ "@deepseek-ai/dsh-client-ui-input-trigger": "0.0.1-rc.3",
56
+ "react": "18.3.1"
57
+ },
58
+ "license": "MIT",
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "scripts": {
63
+ "build": "tsc && node esbuild.config.mjs",
64
+ "typecheck": "tsc --noEmit",
65
+ "test": "vitest run"
66
+ }
67
+ }