@aopslabs/aops-server 0.2.9 → 0.2.11
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/THIRD_PARTY_NOTICES +110 -35
- package/THIRD_PARTY_NOTICES.inventory.json +41 -25
- package/build/client/_app/immutable/chunks/C5WqdkdM.js +1 -0
- package/build/client/_app/immutable/entry/{app.A3JdvVfL.js → app.RfBghRbl.js} +2 -2
- package/build/client/_app/immutable/entry/start.DeqJycy8.js +1 -0
- package/build/client/_app/immutable/nodes/{1.DjNWgxeg.js → 1.dRPl3Pbi.js} +1 -1
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +10 -3
- package/build/index.js +10 -3
- package/build/server/chunks/{agent-gateway-runtime-DV-xLmJx.js → chunks/agent-gateway-runtime.js-ftdwqFXq.js} +2 -2
- package/build/server/chunks/{discovery-DL0RzVks.js → chunks/discovery.js-CVLocQvp.js} +3 -3
- package/build/server/chunks/chunks/exports.js-BoBrqMaZ.js +215 -0
- package/build/server/chunks/chunks/internal.js-CQ9L-Epg.js +126 -0
- package/build/server/chunks/chunks/json-request-body.js-ewKk-XAX.js +18 -0
- package/build/server/chunks/{registry-DIreA2IZ.js → chunks/registry.js-U3x77b7r.js} +53 -11
- package/build/server/chunks/{request-context-9wzBoKrz.js → chunks/request-context.js-Y9Hk40z6.js} +3 -3
- package/build/server/chunks/chunks/root.js-Di8SnzYO.js +4187 -0
- package/build/server/chunks/chunks/server.js-Bf8x1V_n.js +15 -0
- package/build/server/chunks/chunks/uneval.js-BnYgIxRU.js +521 -0
- package/build/server/chunks/chunks/utils.js-DjaWGEhn.js +1623 -0
- package/build/server/chunks/chunks/utils2.js-BQzn9ikS.js +37 -0
- package/build/server/chunks/{_server.ts-DDE7Qj9s.js → entries/endpoints/api/_domain_/_...path_/_server.ts.js-ujk9Lc9B.js} +9 -7
- package/build/server/chunks/{_server.ts-DX-_KeHW.js → entries/endpoints/api/_server.ts.js-sSJl5nE9.js} +3 -1
- package/build/server/chunks/{_server.ts-BjeSh_9L.js → entries/endpoints/api/agent/discovery.json/_server.ts.js-eYRl3j62.js} +11 -9
- package/build/server/chunks/{_server.ts-BlqHo41R.js → entries/endpoints/api/agent/openapi.json/_server.ts.js-BfttnM60.js} +10 -8
- package/build/server/chunks/{_server.ts-CEZb0qQM.js → entries/endpoints/api/agent/tools/_server.ts.js-DtF6u5j-.js} +11 -9
- package/build/server/chunks/{_server.ts-Boj-nSfz.js → entries/endpoints/api/agent/tools/_toolId_/_server.ts.js-D4_OCEFF.js} +11 -9
- package/build/server/chunks/{_server.ts-D9NPnh7b.js → entries/endpoints/api/agent/tools/_toolId_/invoke/_server.ts.js-DLRXs4Li.js} +22 -20
- package/build/server/chunks/{_server.ts-DWGAAi-W.js → entries/endpoints/api/aops/docman/flows/_server.ts.js-6aWYpXk6.js} +12 -13
- package/build/server/chunks/{_server.ts-Daul6O6T.js → entries/endpoints/api/aops/projectman/flows/_server.ts.js-D_-6ferA.js} +12 -13
- package/build/server/chunks/{_server.ts-s5Rfq1_a.js → entries/endpoints/api/aops/settings/database/status/_server.ts.js-Owz6c-s3.js} +5 -3
- package/build/server/chunks/{_server.ts-Bnc8VoZt.js → entries/endpoints/api/auth/me/_server.ts.js-CSjwLMYe.js} +4 -2
- package/build/server/chunks/{_server.ts-QAR2kInF.js → entries/endpoints/api/health/_server.ts.js-CqZW_cm6.js} +6 -4
- package/build/server/chunks/entries/endpoints/api/hello/_server.ts.js-CF4gShRZ.js +11 -0
- package/build/server/chunks/{_server.ts-DSvQTrqh.js → entries/endpoints/api/host-admin/plugins/_server.ts.js-BJBnC_mP.js} +8 -6
- package/build/server/chunks/entries/endpoints/api/host-admin/runtime-config/_server.ts.js-BbVXEK2o.js +12 -0
- package/build/server/chunks/{_server.ts-DLm7WPPZ.js → entries/endpoints/api/host-admin/runtime-config/test/_server.ts.js-4KY0tKLf.js} +5 -3
- package/build/server/chunks/{_server.ts-BdY2JsaQ.js → entries/endpoints/api-info.json/_server.ts.js-DklaS6fp.js} +11 -9
- package/build/server/chunks/{_server.ts-BiaO5iJe.js → entries/endpoints/openapi.json/_server.ts.js-ixf1Z8a2.js} +10 -8
- package/build/server/chunks/{error.svelte-C3C2fP5p.js → entries/fallbacks/error.svelte.js-D7yKTuER.js} +5 -1
- package/build/server/chunks/{hooks.server-QpuxZ7sx.js → entries/hooks.server.js-0eTKxvgl.js} +4 -2
- package/build/server/chunks/{handler-BohKk247.js → handler-CejpfyJh.js} +3 -2
- package/build/server/chunks/index.js-CBv9Rsqj.js +4103 -0
- package/build/server/chunks/{manifest.js-CfVEzEmC.js → manifest.js-Bl7KqFbu.js} +24 -24
- package/build/server/chunks/{1-BJzlk8ku.js → nodes/1.js-BMByn53B.js} +2 -2
- package/npm-shrinkwrap.json +56 -50
- package/package.json +12 -12
- package/runtime/agentspace-host-adapter.mjs +19 -5
- package/runtime/agentspace-tooling.mjs +39 -25
- package/runtime/docman-host-adapter.mjs +33 -3
- package/runtime/docman-policy.mjs +5 -1
- package/runtime/manifest-policy.mjs +62 -0
- package/runtime-closure.package.json +22 -20
- package/build/client/_app/immutable/chunks/BYPZX9Wo.js +0 -1
- package/build/client/_app/immutable/entry/start.CiIm7sOm.js +0 -1
- package/build/server/chunks/_server.ts-NZjOV9Ec.js +0 -10
- package/build/server/chunks/_server.ts-iQyRIpt-.js +0 -9
- package/build/server/chunks/index.js-B0n9KWWU.js +0 -10803
- /package/build/server/chunks/{aops-runtime-config-CHpDUCdE.js → chunks/aops-runtime-config.js-CHpDUCdE.js} +0 -0
- /package/build/server/chunks/{auth-provider-C07OUlnz.js → chunks/auth-provider.js-C07OUlnz.js} +0 -0
- /package/build/server/chunks/{commercial-admission-loader-ZGZHRPLe.js → chunks/commercial-admission-loader.js-ZGZHRPLe.js} +0 -0
- /package/build/server/chunks/{plugin-error-normalize-DNeRsopQ.js → chunks/plugin-error-normalize.js-DNeRsopQ.js} +0 -0
- /package/build/server/chunks/{project-alias-BdnRxWft.js → chunks/project-alias.js-BdnRxWft.js} +0 -0
- /package/build/server/chunks/{request-base-url-zKJpVUv5.js → chunks/request-base-url.js-zKJpVUv5.js} +0 -0
- /package/build/server/chunks/{xf-result-BRDjvftr.js → chunks/xf-result.js-BRDjvftr.js} +0 -0
- /package/build/server/chunks/{_server.ts-Bly8fCZa.js → entries/endpoints/_server.ts.js-Bly8fCZa.js} +0 -0
- /package/build/server/chunks/{_server.ts-DbdAfdYo.js → entries/endpoints/api/chatv3/v1/rooms/_roomId_/stream/_server.ts.js-DbdAfdYo.js} +0 -0
- /package/build/server/chunks/{_server.ts-Cv-yaXZI.js → entries/endpoints/api-info/_server.ts.js-Cv-yaXZI.js} +0 -0
- /package/build/server/chunks/{0-RfB6m2nq.js → nodes/0.js-RfB6m2nq.js} +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { n as noop, s as safe_not_equal } from './root.js-Di8SnzYO.js';
|
|
2
|
+
|
|
3
|
+
const subscriber_queue = [];
|
|
4
|
+
function readable(value, start) {
|
|
5
|
+
return {
|
|
6
|
+
subscribe: writable(value, start).subscribe
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function writable(value, start = noop) {
|
|
10
|
+
let stop = null;
|
|
11
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
12
|
+
function set(new_value) {
|
|
13
|
+
if (safe_not_equal(value, new_value)) {
|
|
14
|
+
value = new_value;
|
|
15
|
+
if (stop) {
|
|
16
|
+
const run_queue = !subscriber_queue.length;
|
|
17
|
+
for (const subscriber of subscribers) {
|
|
18
|
+
subscriber[1]();
|
|
19
|
+
subscriber_queue.push(subscriber, value);
|
|
20
|
+
}
|
|
21
|
+
if (run_queue) {
|
|
22
|
+
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
|
23
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
24
|
+
}
|
|
25
|
+
subscriber_queue.length = 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function update(fn) {
|
|
31
|
+
set(fn(
|
|
32
|
+
/** @type {T} */
|
|
33
|
+
value
|
|
34
|
+
));
|
|
35
|
+
}
|
|
36
|
+
function subscribe(run, invalidate = noop) {
|
|
37
|
+
const subscriber = [run, invalidate];
|
|
38
|
+
subscribers.add(subscriber);
|
|
39
|
+
if (subscribers.size === 1) {
|
|
40
|
+
stop = start(set, update) || noop;
|
|
41
|
+
}
|
|
42
|
+
run(
|
|
43
|
+
/** @type {T} */
|
|
44
|
+
value
|
|
45
|
+
);
|
|
46
|
+
return () => {
|
|
47
|
+
subscribers.delete(subscriber);
|
|
48
|
+
if (subscribers.size === 0 && stop) {
|
|
49
|
+
stop();
|
|
50
|
+
stop = null;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return { set, update, subscribe };
|
|
55
|
+
}
|
|
56
|
+
const internal = new URL("sveltekit-internal://");
|
|
57
|
+
function resolve(base, path) {
|
|
58
|
+
if (path[0] === "/" && path[1] === "/") return path;
|
|
59
|
+
let url = new URL(base, internal);
|
|
60
|
+
url = new URL(path, url);
|
|
61
|
+
return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
|
|
62
|
+
}
|
|
63
|
+
function normalize_path(path, trailing_slash) {
|
|
64
|
+
if (path === "/" || trailing_slash === "ignore") return path;
|
|
65
|
+
if (trailing_slash === "never") {
|
|
66
|
+
return path.endsWith("/") ? path.slice(0, -1) : path;
|
|
67
|
+
} else if (trailing_slash === "always" && !path.endsWith("/")) {
|
|
68
|
+
return path + "/";
|
|
69
|
+
}
|
|
70
|
+
return path;
|
|
71
|
+
}
|
|
72
|
+
function decode_pathname(pathname) {
|
|
73
|
+
return pathname.split("%25").map(decodeURI).join("%25");
|
|
74
|
+
}
|
|
75
|
+
function decode_params(params) {
|
|
76
|
+
for (const key in params) {
|
|
77
|
+
params[key] = decodeURIComponent(params[key]);
|
|
78
|
+
}
|
|
79
|
+
return params;
|
|
80
|
+
}
|
|
81
|
+
function make_trackable(url, callback, search_params_callback, allow_hash = false) {
|
|
82
|
+
const tracked = new URL(url);
|
|
83
|
+
Object.defineProperty(tracked, "searchParams", {
|
|
84
|
+
value: new Proxy(tracked.searchParams, {
|
|
85
|
+
get(obj, key) {
|
|
86
|
+
if (key === "get" || key === "getAll" || key === "has") {
|
|
87
|
+
return (param, ...rest) => {
|
|
88
|
+
search_params_callback(param);
|
|
89
|
+
return obj[key](param, ...rest);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
callback();
|
|
93
|
+
const value = Reflect.get(obj, key);
|
|
94
|
+
return typeof value === "function" ? value.bind(obj) : value;
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
enumerable: true,
|
|
98
|
+
configurable: true
|
|
99
|
+
});
|
|
100
|
+
const tracked_url_properties = ["href", "pathname", "search", "toString", "toJSON"];
|
|
101
|
+
if (allow_hash) tracked_url_properties.push("hash");
|
|
102
|
+
for (const property of tracked_url_properties) {
|
|
103
|
+
Object.defineProperty(tracked, property, {
|
|
104
|
+
get() {
|
|
105
|
+
callback();
|
|
106
|
+
return url[property];
|
|
107
|
+
},
|
|
108
|
+
enumerable: true,
|
|
109
|
+
configurable: true
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
{
|
|
113
|
+
tracked[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
|
|
114
|
+
return inspect(url, opts);
|
|
115
|
+
};
|
|
116
|
+
tracked.searchParams[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
|
|
117
|
+
return inspect(url.searchParams, opts);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
if (!allow_hash) {
|
|
121
|
+
disable_hash(tracked);
|
|
122
|
+
}
|
|
123
|
+
return tracked;
|
|
124
|
+
}
|
|
125
|
+
function disable_hash(url) {
|
|
126
|
+
allow_nodejs_console_log(url);
|
|
127
|
+
Object.defineProperty(url, "hash", {
|
|
128
|
+
get() {
|
|
129
|
+
throw new Error(
|
|
130
|
+
"Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead"
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function disable_search(url) {
|
|
136
|
+
allow_nodejs_console_log(url);
|
|
137
|
+
for (const property of ["search", "searchParams"]) {
|
|
138
|
+
Object.defineProperty(url, property, {
|
|
139
|
+
get() {
|
|
140
|
+
throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function allow_nodejs_console_log(url) {
|
|
146
|
+
{
|
|
147
|
+
url[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
|
|
148
|
+
return inspect(new URL(url), opts);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function validator(expected) {
|
|
153
|
+
function validate(module, file) {
|
|
154
|
+
if (!module) return;
|
|
155
|
+
for (const key in module) {
|
|
156
|
+
if (key[0] === "_" || expected.has(key)) continue;
|
|
157
|
+
const values = [...expected.values()];
|
|
158
|
+
const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
|
|
159
|
+
throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return validate;
|
|
163
|
+
}
|
|
164
|
+
function hint_for_supported_files(key, ext = ".js") {
|
|
165
|
+
const supported_files = [];
|
|
166
|
+
if (valid_layout_exports.has(key)) {
|
|
167
|
+
supported_files.push(`+layout${ext}`);
|
|
168
|
+
}
|
|
169
|
+
if (valid_page_exports.has(key)) {
|
|
170
|
+
supported_files.push(`+page${ext}`);
|
|
171
|
+
}
|
|
172
|
+
if (valid_layout_server_exports.has(key)) {
|
|
173
|
+
supported_files.push(`+layout.server${ext}`);
|
|
174
|
+
}
|
|
175
|
+
if (valid_page_server_exports.has(key)) {
|
|
176
|
+
supported_files.push(`+page.server${ext}`);
|
|
177
|
+
}
|
|
178
|
+
if (valid_server_exports.has(key)) {
|
|
179
|
+
supported_files.push(`+server${ext}`);
|
|
180
|
+
}
|
|
181
|
+
if (supported_files.length > 0) {
|
|
182
|
+
return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const valid_layout_exports = /* @__PURE__ */ new Set([
|
|
186
|
+
"load",
|
|
187
|
+
"prerender",
|
|
188
|
+
"csr",
|
|
189
|
+
"ssr",
|
|
190
|
+
"trailingSlash",
|
|
191
|
+
"config"
|
|
192
|
+
]);
|
|
193
|
+
const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
|
|
194
|
+
const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
|
|
195
|
+
const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]);
|
|
196
|
+
const valid_server_exports = /* @__PURE__ */ new Set([
|
|
197
|
+
"GET",
|
|
198
|
+
"POST",
|
|
199
|
+
"PATCH",
|
|
200
|
+
"PUT",
|
|
201
|
+
"DELETE",
|
|
202
|
+
"OPTIONS",
|
|
203
|
+
"HEAD",
|
|
204
|
+
"fallback",
|
|
205
|
+
"prerender",
|
|
206
|
+
"trailingSlash",
|
|
207
|
+
"config",
|
|
208
|
+
"entries"
|
|
209
|
+
]);
|
|
210
|
+
const validate_layout_exports = validator(valid_layout_exports);
|
|
211
|
+
const validate_page_exports = validator(valid_page_exports);
|
|
212
|
+
const validate_layout_server_exports = validator(valid_layout_server_exports);
|
|
213
|
+
const validate_page_server_exports = validator(valid_page_server_exports);
|
|
214
|
+
|
|
215
|
+
export { disable_search as a, decode_params as b, validate_layout_exports as c, decode_pathname as d, validate_page_server_exports as e, validate_page_exports as f, readable as g, make_trackable as m, normalize_path as n, resolve as r, validate_layout_server_exports as v, writable as w };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { r as root } from './root.js-Di8SnzYO.js';
|
|
2
|
+
|
|
3
|
+
let read_implementation = null;
|
|
4
|
+
function set_read_implementation(fn) {
|
|
5
|
+
read_implementation = fn;
|
|
6
|
+
}
|
|
7
|
+
let public_env = {};
|
|
8
|
+
function set_private_env(environment) {
|
|
9
|
+
}
|
|
10
|
+
function set_public_env(environment) {
|
|
11
|
+
public_env = environment;
|
|
12
|
+
}
|
|
13
|
+
const error = ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
body {
|
|
17
|
+
--bg: white;
|
|
18
|
+
--fg: #222;
|
|
19
|
+
--divider: #ccc;
|
|
20
|
+
background: var(--bg);
|
|
21
|
+
color: var(--fg);
|
|
22
|
+
font-family:
|
|
23
|
+
system-ui,
|
|
24
|
+
-apple-system,
|
|
25
|
+
BlinkMacSystemFont,
|
|
26
|
+
'Segoe UI',
|
|
27
|
+
Roboto,
|
|
28
|
+
Oxygen,
|
|
29
|
+
Ubuntu,
|
|
30
|
+
Cantarell,
|
|
31
|
+
'Open Sans',
|
|
32
|
+
'Helvetica Neue',
|
|
33
|
+
sans-serif;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
height: 100vh;
|
|
38
|
+
margin: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.error {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
max-width: 32rem;
|
|
45
|
+
margin: 0 1rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.status {
|
|
49
|
+
font-weight: 200;
|
|
50
|
+
font-size: 3rem;
|
|
51
|
+
line-height: 1;
|
|
52
|
+
position: relative;
|
|
53
|
+
top: -0.05rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.message {
|
|
57
|
+
border-left: 1px solid var(--divider);
|
|
58
|
+
padding: 0 0 0 1rem;
|
|
59
|
+
margin: 0 0 0 1rem;
|
|
60
|
+
min-height: 2.5rem;
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.message h1 {
|
|
66
|
+
font-weight: 400;
|
|
67
|
+
font-size: 1em;
|
|
68
|
+
margin: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (prefers-color-scheme: dark) {
|
|
72
|
+
body {
|
|
73
|
+
--bg: #222;
|
|
74
|
+
--fg: #ddd;
|
|
75
|
+
--divider: #666;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
79
|
+
</head>
|
|
80
|
+
<body>
|
|
81
|
+
<div class="error">
|
|
82
|
+
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n";
|
|
83
|
+
const options = {
|
|
84
|
+
app_template_contains_nonce: false,
|
|
85
|
+
async: false,
|
|
86
|
+
csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } },
|
|
87
|
+
csrf_check_origin: true,
|
|
88
|
+
csrf_trusted_origins: [],
|
|
89
|
+
embedded: false,
|
|
90
|
+
env_public_prefix: "PUBLIC_",
|
|
91
|
+
env_private_prefix: "",
|
|
92
|
+
hash_routing: false,
|
|
93
|
+
hooks: null,
|
|
94
|
+
// added lazily, via `get_hooks`
|
|
95
|
+
preload_strategy: "modulepreload",
|
|
96
|
+
root,
|
|
97
|
+
service_worker: false,
|
|
98
|
+
service_worker_options: null,
|
|
99
|
+
server_error_boundaries: false,
|
|
100
|
+
templates: {
|
|
101
|
+
app: ({ head, body, assets, nonce, env }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets + '/favicon.png" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
|
|
102
|
+
error
|
|
103
|
+
},
|
|
104
|
+
version_hash: "dvnc2f"
|
|
105
|
+
};
|
|
106
|
+
async function get_hooks() {
|
|
107
|
+
let handle;
|
|
108
|
+
let handleFetch;
|
|
109
|
+
let handleError;
|
|
110
|
+
let handleValidationError;
|
|
111
|
+
let init;
|
|
112
|
+
({ handle, handleFetch, handleError, handleValidationError, init } = await import('../entries/hooks.server.js-0eTKxvgl.js'));
|
|
113
|
+
let reroute;
|
|
114
|
+
let transport;
|
|
115
|
+
return {
|
|
116
|
+
handle,
|
|
117
|
+
handleFetch,
|
|
118
|
+
handleError,
|
|
119
|
+
handleValidationError,
|
|
120
|
+
init,
|
|
121
|
+
reroute,
|
|
122
|
+
transport
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { set_public_env as a, set_read_implementation as b, get_hooks as g, options as o, public_env as p, read_implementation as r, set_private_env as s };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isJsonHttpMediaType } from '@aopslabs/host-core';
|
|
2
|
+
|
|
3
|
+
async function readJsonRequestBody(request, options = {}) {
|
|
4
|
+
if (!isJsonHttpMediaType(request.headers.get("content-type"))) {
|
|
5
|
+
return { ok: false, message: "application_json_content_type_required" };
|
|
6
|
+
}
|
|
7
|
+
const rawText = await request.text();
|
|
8
|
+
if (!rawText.trim()) {
|
|
9
|
+
return { ok: false, message: options.emptyBodyMessage ?? "request_body_required" };
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
return { ok: true, value: JSON.parse(rawText) };
|
|
13
|
+
} catch {
|
|
14
|
+
return { ok: false, message: "invalid_json_body" };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { readJsonRequestBody as r };
|
|
@@ -2,13 +2,13 @@ import fs__default, { existsSync } from 'node:fs';
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
|
-
import { createLeaseAdmissionProvider } from '@aopslabs/host-admission';
|
|
6
5
|
import { createTrustedLocalAuthorityProvider } from '@aopslabs/host-auth';
|
|
7
6
|
import { bootstrapHostRuntime, resolveHostConfig } from '@aopslabs/host-shell';
|
|
8
7
|
import { Worker } from 'node:worker_threads';
|
|
9
8
|
import { AdmissionDecisionCache, buildAdmittedDomainSnapshot, CommercialArtifactError } from '@aopslabs/artifact-trust-contracts';
|
|
10
|
-
import './aops-runtime-config-CHpDUCdE.js';
|
|
9
|
+
import './aops-runtime-config.js-CHpDUCdE.js';
|
|
11
10
|
import { validateHostConfig } from '@aopslabs/host-core';
|
|
11
|
+
import { createLeaseAdmissionProvider } from '@aopslabs/host-admission';
|
|
12
12
|
|
|
13
13
|
const COMMUNITY_FREE_DOMAIN_IDS = Object.freeze([
|
|
14
14
|
"agentspace",
|
|
@@ -83,7 +83,7 @@ function applyScheduledCommercialIntegrityFailure(error, now) {
|
|
|
83
83
|
const configuredAdmission = process.env.AOPS_COMMERCIAL_ADMISSION_CONFIG?.trim();
|
|
84
84
|
if (configuredAdmission) {
|
|
85
85
|
try {
|
|
86
|
-
const { loadCommercialAdmissionSnapshot } = await import('./commercial-admission-loader-ZGZHRPLe.js');
|
|
86
|
+
const { loadCommercialAdmissionSnapshot } = await import('./commercial-admission-loader.js-ZGZHRPLe.js');
|
|
87
87
|
const loaded = loadCommercialAdmissionSnapshot(
|
|
88
88
|
configuredAdmission,
|
|
89
89
|
COMMUNITY_FREE_DOMAIN_IDS
|
|
@@ -167,7 +167,7 @@ async function runScheduledIntegrityVerification() {
|
|
|
167
167
|
dueAt: now.toISOString()
|
|
168
168
|
});
|
|
169
169
|
try {
|
|
170
|
-
const { resolveCommercialIntegrityWorkerInput } = await import('./commercial-admission-loader-ZGZHRPLe.js');
|
|
170
|
+
const { resolveCommercialIntegrityWorkerInput } = await import('./commercial-admission-loader.js-ZGZHRPLe.js');
|
|
171
171
|
await runCommercialIntegrityVerificationWorker(
|
|
172
172
|
resolveCommercialIntegrityWorkerInput(configuredAdmission),
|
|
173
173
|
now
|
|
@@ -194,7 +194,7 @@ async function planScheduledIntegrityVerification() {
|
|
|
194
194
|
if (!configuredAdmission || integrityWorkerRunning || integritySchedulerStopped) return;
|
|
195
195
|
const now = /* @__PURE__ */ new Date();
|
|
196
196
|
try {
|
|
197
|
-
const { readCommercialAdmissionIntegritySchedule } = await import('./commercial-admission-loader-ZGZHRPLe.js');
|
|
197
|
+
const { readCommercialAdmissionIntegritySchedule } = await import('./commercial-admission-loader.js-ZGZHRPLe.js');
|
|
198
198
|
const schedule = readCommercialAdmissionIntegritySchedule(configuredAdmission, now);
|
|
199
199
|
if (schedule.state === "authority-unavailable" || schedule.state === "quarantined") {
|
|
200
200
|
applyScheduledCommercialIntegrityFailure(
|
|
@@ -395,6 +395,52 @@ function getHostRegistrationDiagnostics() {
|
|
|
395
395
|
registrations: []
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
|
+
function adaptTrustedLocalAdmissionProvider(source) {
|
|
399
|
+
return {
|
|
400
|
+
mode: source.mode,
|
|
401
|
+
async getSnapshot() {
|
|
402
|
+
const snapshot = await source.getSnapshot();
|
|
403
|
+
const domains = /* @__PURE__ */ new Map();
|
|
404
|
+
for (const [domainId, decision] of snapshot.domains) {
|
|
405
|
+
if (decision.plane === "customer" || decision.mode === "customer" || decision.customer) {
|
|
406
|
+
throw new Error(`aops_kernel_customer_admission_requires_south:${domainId}`);
|
|
407
|
+
}
|
|
408
|
+
domains.set(domainId, {
|
|
409
|
+
domain: decision.domain,
|
|
410
|
+
state: decision.state,
|
|
411
|
+
reason: decision.reason,
|
|
412
|
+
plane: decision.plane,
|
|
413
|
+
mode: decision.mode,
|
|
414
|
+
allowedOperationIds: decision.allowedOperationIds,
|
|
415
|
+
degradedOperationIds: decision.degradedOperationIds,
|
|
416
|
+
migrationEligible: decision.migrationEligible,
|
|
417
|
+
productId: decision.productId,
|
|
418
|
+
manifestDigest: decision.manifestDigest,
|
|
419
|
+
closureDigest: decision.closureDigest,
|
|
420
|
+
leaseId: decision.leaseId,
|
|
421
|
+
entitlementEpoch: decision.entitlementEpoch,
|
|
422
|
+
revocationEpoch: decision.revocationEpoch,
|
|
423
|
+
fullUntil: decision.fullUntil,
|
|
424
|
+
expiresAt: decision.expiresAt
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
return {
|
|
428
|
+
mode: snapshot.mode,
|
|
429
|
+
generation: snapshot.generation,
|
|
430
|
+
generatedAt: snapshot.generatedAt,
|
|
431
|
+
domains,
|
|
432
|
+
defaultDecision: snapshot.defaultDecision
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
function createTrustedLocalKernelAdmissionProvider(freeDomains) {
|
|
438
|
+
return adaptTrustedLocalAdmissionProvider(createLeaseAdmissionProvider({
|
|
439
|
+
generation: 1,
|
|
440
|
+
freeDomains,
|
|
441
|
+
licensedDomains: []
|
|
442
|
+
}));
|
|
443
|
+
}
|
|
398
444
|
const MODULE_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
399
445
|
const SERVER_PACKAGE_ROOT = [
|
|
400
446
|
path.resolve(MODULE_DIR, "../.."),
|
|
@@ -444,11 +490,7 @@ function kernelBootstrapOptions() {
|
|
|
444
490
|
roles: ["admin", "operator"],
|
|
445
491
|
requireLoopback: false
|
|
446
492
|
}),
|
|
447
|
-
admission:
|
|
448
|
-
generation: 1,
|
|
449
|
-
freeDomains: COMMUNITY_FREE_DOMAIN_IDS,
|
|
450
|
-
licensedDomains: []
|
|
451
|
-
})
|
|
493
|
+
admission: createTrustedLocalKernelAdmissionProvider(COMMUNITY_FREE_DOMAIN_IDS)
|
|
452
494
|
};
|
|
453
495
|
}
|
|
454
496
|
async function warmupRuntime(runtime2) {
|
|
@@ -521,4 +563,4 @@ function resetHostPluginRegistry() {
|
|
|
521
563
|
resetKernelRuntimeSnapshot();
|
|
522
564
|
}
|
|
523
565
|
|
|
524
|
-
export { getKernelRuntimeSnapshot as a,
|
|
566
|
+
export { getKernelRuntimeSnapshot as a, getHostPluginRegistry as b, checkHostDomainAdmission as c, getHostRegistrationDiagnostics as d, getHostPluginRegistryDiagnostics as e, getHostAdmissionDiagnostics as f, getHostConfig as g, resolveCommunityPackageModule as h, resetHostPluginRegistry as r };
|
package/build/server/chunks/{request-context-9wzBoKrz.js → chunks/request-context.js-Y9Hk40z6.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as getResolvedAopsServerRuntimeConfig } from './aops-runtime-config-CHpDUCdE.js';
|
|
1
|
+
import { g as getResolvedAopsServerRuntimeConfig } from './aops-runtime-config.js-CHpDUCdE.js';
|
|
2
2
|
import { createAppMetaConfigManager } from '@aopslabs/xf-dm-kits/appConfig';
|
|
3
3
|
import { getGlobalSingleton, cacheKeyFromLocale } from '@aopslabs/xf-dm-kits';
|
|
4
4
|
import { createAgentspaceKitWithEnv } from '@aopslabs/domain-kit-agentspace';
|
|
5
|
-
import { n as normalizeNonEmptyProjectText, r as resolveProjectAliasValue, g as getLogger } from './project-alias-BdnRxWft.js';
|
|
6
|
-
import { e as errResult } from './xf-result-BRDjvftr.js';
|
|
5
|
+
import { n as normalizeNonEmptyProjectText, r as resolveProjectAliasValue, g as getLogger } from './project-alias.js-BdnRxWft.js';
|
|
6
|
+
import { e as errResult } from './xf-result.js-BRDjvftr.js';
|
|
7
7
|
import { Effect } from 'effect';
|
|
8
8
|
|
|
9
9
|
function resolveAgentspaceRepoUrl(_repositoryType) {
|