@zlooks.cn/global-config-server 1.0.2 → 1.0.3

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.
Files changed (46) hide show
  1. package/dist/mcp/global-config-provider.d.ts +2 -9
  2. package/dist/mcp/global-config-provider.d.ts.map +1 -1
  3. package/dist/mcp/global-config-provider.js +12 -15
  4. package/dist/mcp/global-config-provider.js.map +1 -1
  5. package/dist/messages/site-presentation/read.msg.d.ts +3 -0
  6. package/dist/messages/site-presentation/read.msg.d.ts.map +1 -0
  7. package/dist/messages/site-presentation/read.msg.js +9 -0
  8. package/dist/messages/site-presentation/read.msg.js.map +1 -0
  9. package/dist/messages/site-presentation/update.msg.d.ts +3 -0
  10. package/dist/messages/site-presentation/update.msg.d.ts.map +1 -0
  11. package/dist/messages/site-presentation/update.msg.js +9 -0
  12. package/dist/messages/site-presentation/update.msg.js.map +1 -0
  13. package/dist/messages/site-profile/read.msg.d.ts +3 -0
  14. package/dist/messages/site-profile/read.msg.d.ts.map +1 -0
  15. package/dist/messages/site-profile/read.msg.js +9 -0
  16. package/dist/messages/site-profile/read.msg.js.map +1 -0
  17. package/dist/messages/site-profile/update.msg.d.ts +3 -0
  18. package/dist/messages/site-profile/update.msg.d.ts.map +1 -0
  19. package/dist/messages/site-profile/update.msg.js +9 -0
  20. package/dist/messages/site-profile/update.msg.js.map +1 -0
  21. package/dist/models/read-site-presentation.model.d.ts +43 -0
  22. package/dist/models/read-site-presentation.model.d.ts.map +1 -0
  23. package/dist/models/read-site-presentation.model.js +12 -0
  24. package/dist/models/read-site-presentation.model.js.map +1 -0
  25. package/dist/models/read-site-profile.model.d.ts +33 -0
  26. package/dist/models/read-site-profile.model.d.ts.map +1 -0
  27. package/dist/models/read-site-profile.model.js +12 -0
  28. package/dist/models/read-site-profile.model.js.map +1 -0
  29. package/dist/models/update-site-presentation.model.d.ts +81 -0
  30. package/dist/models/update-site-presentation.model.d.ts.map +1 -0
  31. package/dist/models/update-site-presentation.model.js +18 -0
  32. package/dist/models/update-site-presentation.model.js.map +1 -0
  33. package/dist/models/update-site-profile.model.d.ts +61 -0
  34. package/dist/models/update-site-profile.model.d.ts.map +1 -0
  35. package/dist/models/update-site-profile.model.js +18 -0
  36. package/dist/models/update-site-profile.model.js.map +1 -0
  37. package/dist/services/application.service.d.ts.map +1 -1
  38. package/dist/services/application.service.js +2 -0
  39. package/dist/services/application.service.js.map +1 -1
  40. package/dist/services/global-config-runtime.service.d.ts +8 -148
  41. package/dist/services/global-config-runtime.service.d.ts.map +1 -1
  42. package/dist/services/global-config-runtime.service.js +1 -25
  43. package/dist/services/global-config-runtime.service.js.map +1 -1
  44. package/dist/services/mcp-provider.service.js +3 -6
  45. package/dist/services/mcp-provider.service.js.map +1 -1
  46. package/package.json +14 -12
@@ -1,10 +1,3 @@
1
- import { type SitePresentationSnapshot, type SiteProfileSnapshot } from '@zlooks.cn/global-config-shared';
2
- interface GlobalConfigMcpOperations {
3
- readPresentation(): Promise<SitePresentationSnapshot>;
4
- updatePresentationFromMcp(input: unknown): Promise<SitePresentationSnapshot>;
5
- readProfile(): Promise<SiteProfileSnapshot>;
6
- updateProfileFromMcp(input: unknown): Promise<SiteProfileSnapshot>;
7
- }
8
- export declare function createGlobalConfigMcpProvider(operations: GlobalConfigMcpOperations): import("@hile/mcp").McpProviderDefinition;
9
- export {};
1
+ import { type GlobalConfigMicroClient } from '@zlooks.cn/global-config-shared';
2
+ export declare function createGlobalConfigMcpProvider(globalConfig: GlobalConfigMicroClient): import("@hile/mcp").McpProviderDefinition;
10
3
  //# sourceMappingURL=global-config-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-config-provider.d.ts","sourceRoot":"","sources":["../../src/mcp/global-config-provider.ts"],"names":[],"mappings":"AAOA,OAAO,EAeL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAGzC,UAAU,yBAAyB;IACjC,gBAAgB,IAAI,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACtD,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC7E,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5C,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACpE;AAED,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,yBAAyB,6CAyGlF"}
1
+ {"version":3,"file":"global-config-provider.d.ts","sourceRoot":"","sources":["../../src/mcp/global-config-provider.ts"],"names":[],"mappings":"AAOA,OAAO,EAeL,KAAK,uBAAuB,EAG7B,MAAM,iCAAiC,CAAC;AAGzC,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,uBAAuB,6CA+GlF"}
@@ -1,7 +1,7 @@
1
1
  import { defineMcpPrompt, defineMcpProvider, defineMcpTool, } from '@hile/mcp';
2
2
  import { GLOBAL_CONFIG_MCP_EDIT_PROFILE_PROMPT, GLOBAL_CONFIG_MCP_EDIT_PROMPT, GLOBAL_CONFIG_MCP_PROVIDER_ID, GLOBAL_CONFIG_MCP_READ_PROFILE_TOOL, GLOBAL_CONFIG_MCP_READ_SCOPE, GLOBAL_CONFIG_MCP_READ_TOOL, GLOBAL_CONFIG_MCP_UPDATE_PROFILE_TOOL, GLOBAL_CONFIG_MCP_UPDATE_TOOL, GLOBAL_CONFIG_MCP_WRITE_SCOPE, globalConfigMcpEditPromptSchema, globalConfigMcpProfileUpdateSchema, globalConfigMcpUpdateSchema, sitePresentationSnapshotSchema, siteProfileSnapshotSchema, } from '@zlooks.cn/global-config-shared';
3
3
  import { z } from 'zod';
4
- export function createGlobalConfigMcpProvider(operations) {
4
+ export function createGlobalConfigMcpProvider(globalConfig) {
5
5
  const readPresentation = defineMcpTool({
6
6
  name: GLOBAL_CONFIG_MCP_READ_TOOL,
7
7
  title: '读取站点展示配置',
@@ -11,7 +11,7 @@ export function createGlobalConfigMcpProvider(operations) {
11
11
  annotations: { readOnlyHint: true, idempotentHint: true, destructiveHint: false },
12
12
  access: { scopes: [GLOBAL_CONFIG_MCP_READ_SCOPE] },
13
13
  execution: { timeoutMs: 10_000, retry: 'idempotent-failover' },
14
- }, async (_input, context) => cancellableRead(context.signal, operations.readPresentation));
14
+ }, async (_input, context) => cancellableRead(context, (options) => globalConfig.readPresentation(options)));
15
15
  const updatePresentation = defineMcpTool({
16
16
  name: GLOBAL_CONFIG_MCP_UPDATE_TOOL,
17
17
  title: '修改站点展示配置',
@@ -23,10 +23,7 @@ export function createGlobalConfigMcpProvider(operations) {
23
23
  execution: { timeoutMs: 10_000, retry: 'never' },
24
24
  }, async (input, context) => {
25
25
  context.signal.throwIfAborted();
26
- const snapshot = await operations.updatePresentationFromMcp({
27
- ...input,
28
- updatedBy: actorFrom(context.principal),
29
- });
26
+ const snapshot = await globalConfig.updatePresentation({ ...input, actor: actorFrom(context.principal) }, microOptions(context));
30
27
  await bestEffortUpdateNotice(context.emit, {
31
28
  event: 'global-config.site-presentation.updated',
32
29
  revision: snapshot.revision,
@@ -43,7 +40,7 @@ export function createGlobalConfigMcpProvider(operations) {
43
40
  annotations: { readOnlyHint: true, idempotentHint: true, destructiveHint: false },
44
41
  access: { scopes: [GLOBAL_CONFIG_MCP_READ_SCOPE] },
45
42
  execution: { timeoutMs: 10_000, retry: 'idempotent-failover' },
46
- }, async (_input, context) => cancellableRead(context.signal, operations.readProfile));
43
+ }, async (_input, context) => cancellableRead(context, (options) => globalConfig.readProfile(options)));
47
44
  const updateProfile = defineMcpTool({
48
45
  name: GLOBAL_CONFIG_MCP_UPDATE_PROFILE_TOOL,
49
46
  title: '修改站点资料',
@@ -55,10 +52,7 @@ export function createGlobalConfigMcpProvider(operations) {
55
52
  execution: { timeoutMs: 10_000, retry: 'never' },
56
53
  }, async (input, context) => {
57
54
  context.signal.throwIfAborted();
58
- const snapshot = await operations.updateProfileFromMcp({
59
- ...input,
60
- updatedBy: actorFrom(context.principal),
61
- });
55
+ const snapshot = await globalConfig.updateProfile({ ...input, actor: actorFrom(context.principal) }, microOptions(context));
62
56
  await bestEffortUpdateNotice(context.emit, {
63
57
  event: 'global-config.site-profile.updated',
64
58
  revision: snapshot.revision,
@@ -109,12 +103,15 @@ async function bestEffortUpdateNotice(emit, data) {
109
103
  // Observability must not turn a committed configuration update into a reported failure.
110
104
  }
111
105
  }
112
- async function cancellableRead(signal, read) {
113
- signal.throwIfAborted();
114
- const snapshot = await read();
115
- signal.throwIfAborted();
106
+ async function cancellableRead(context, read) {
107
+ context.signal.throwIfAborted();
108
+ const snapshot = await read(microOptions(context));
109
+ context.signal.throwIfAborted();
116
110
  return result(snapshot);
117
111
  }
112
+ function microOptions(context) {
113
+ return { context: context.executionContext, signal: context.signal };
114
+ }
118
115
  function result(snapshot, message) {
119
116
  return {
120
117
  content: [{ type: 'text', text: message ?? JSON.stringify(snapshot) }],
@@ -1 +1 @@
1
- {"version":3,"file":"global-config-provider.js","sourceRoot":"","sources":["../../src/mcp/global-config-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,aAAa,GAGd,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,qCAAqC,EACrC,6BAA6B,EAC7B,6BAA6B,EAC7B,mCAAmC,EACnC,4BAA4B,EAC5B,2BAA2B,EAC3B,qCAAqC,EACrC,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,kCAAkC,EAClC,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,GAG1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,MAAM,UAAU,6BAA6B,CAAC,UAAqC;IACjF,MAAM,gBAAgB,GAAG,aAAa,CAAC;QACrC,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,uHAAuH;QACpI,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,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CAAC;KAChF,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,aAAqB;IACpD,OAAO,kBAAkB,aAAa;uBACjB,2BAA2B;;;;;yBAKzB,6BAA6B;;6BAEzB,2BAA2B,2BAA2B,CAAC;AACpF,CAAC;AAED,SAAS,kBAAkB,CAAC,aAAqB;IAC/C,OAAO,gBAAgB,aAAa;uBACf,mCAAmC;;;;yBAIjC,qCAAqC;;6BAEjC,mCAAmC,2BAA2B,CAAC;AAC5F,CAAC;AAED,SAAS,SAAS,CAAC,SAAmC;IACpD,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC;IACzD,MAAM,KAAK,GAAG,OAAO,QAAQ,EAAE,CAAC;IAChC,IAAI,KAAK,CAAC,MAAM,GAAG,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC9E,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"global-config-provider.js","sourceRoot":"","sources":["../../src/mcp/global-config-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,aAAa,GAGd,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,qCAAqC,EACrC,6BAA6B,EAC7B,6BAA6B,EAC7B,mCAAmC,EACnC,4BAA4B,EAC5B,2BAA2B,EAC3B,qCAAqC,EACrC,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,kCAAkC,EAClC,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,GAI1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,6BAA6B,CAAC,YAAqC;IACjF,MAAM,gBAAgB,GAAG,aAAa,CAAC;QACrC,IAAI,EAAE,2BAA2B;QACjC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,CAAC;AAED,SAAS,MAAM,CACb,QAAW,EACX,OAAgB;IAEhB,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/E,iBAAiB,EAAE,QAAQ;KAC5B,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,WAAmB,EAAE,IAAY;IACrD,OAAO;QACL,WAAW;QACX,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,EAAE,CAAC;KAChF,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,aAAqB;IACpD,OAAO,kBAAkB,aAAa;uBACjB,2BAA2B;;;;;yBAKzB,6BAA6B;;6BAEzB,2BAA2B,2BAA2B,CAAC;AACpF,CAAC;AAED,SAAS,kBAAkB,CAAC,aAAqB;IAC/C,OAAO,gBAAgB,aAAa;uBACf,mCAAmC;;;;yBAIjC,qCAAqC;;6BAEjC,mCAAmC,2BAA2B,CAAC;AAC5F,CAAC;AAED,SAAS,SAAS,CAAC,SAAmC;IACpD,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC;IACzD,MAAM,KAAK,GAAG,OAAO,QAAQ,EAAE,CAAC;IAChC,IAAI,KAAK,CAAC,MAAM,GAAG,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC9E,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@hile/message-loader").MessageRegisterProps<unknown, import("@hile/micro").MicroMessageHandlerExtras>;
2
+ export default _default;
3
+ //# sourceMappingURL=read.msg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.msg.d.ts","sourceRoot":"","sources":["../../../src/messages/site-presentation/read.msg.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { loadModel } from '@hile/model';
2
+ import { defineMicroMessage } from '@hile/micro';
3
+ import { globalConfigEmptyRequestSchema } from '@zlooks.cn/global-config-shared';
4
+ import readSitePresentationModel from '../../models/read-site-presentation.model.js';
5
+ export default defineMicroMessage(async ({ data, invocation }) => {
6
+ const query = globalConfigEmptyRequestSchema.parse(data);
7
+ return loadModel(readSitePresentationModel, query, invocation);
8
+ });
9
+ //# sourceMappingURL=read.msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.msg.js","sourceRoot":"","sources":["../../../src/messages/site-presentation/read.msg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,yBAAyB,MAAM,8CAA8C,CAAC;AAErF,eAAe,kBAAkB,CAAU,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE;IACxE,MAAM,KAAK,GAAG,8BAA8B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,SAAS,CAAC,yBAAyB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AACjE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@hile/message-loader").MessageRegisterProps<unknown, import("@hile/micro").MicroMessageHandlerExtras>;
2
+ export default _default;
3
+ //# sourceMappingURL=update.msg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.msg.d.ts","sourceRoot":"","sources":["../../../src/messages/site-presentation/update.msg.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { loadModel } from '@hile/model';
2
+ import { defineMicroMessage } from '@hile/micro';
3
+ import { globalConfigPresentationUpdateCommandSchema } from '@zlooks.cn/global-config-shared';
4
+ import updateSitePresentationModel from '../../models/update-site-presentation.model.js';
5
+ export default defineMicroMessage(async ({ data, invocation }) => {
6
+ const command = globalConfigPresentationUpdateCommandSchema.parse(data);
7
+ return loadModel(updateSitePresentationModel, command, invocation);
8
+ });
9
+ //# sourceMappingURL=update.msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.msg.js","sourceRoot":"","sources":["../../../src/messages/site-presentation/update.msg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,2CAA2C,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,2BAA2B,MAAM,gDAAgD,CAAC;AAEzF,eAAe,kBAAkB,CAAU,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE;IACxE,MAAM,OAAO,GAAG,2CAA2C,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxE,OAAO,SAAS,CAAC,2BAA2B,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACrE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@hile/message-loader").MessageRegisterProps<unknown, import("@hile/micro").MicroMessageHandlerExtras>;
2
+ export default _default;
3
+ //# sourceMappingURL=read.msg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.msg.d.ts","sourceRoot":"","sources":["../../../src/messages/site-profile/read.msg.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { loadModel } from '@hile/model';
2
+ import { defineMicroMessage } from '@hile/micro';
3
+ import { globalConfigEmptyRequestSchema } from '@zlooks.cn/global-config-shared';
4
+ import readSiteProfileModel from '../../models/read-site-profile.model.js';
5
+ export default defineMicroMessage(async ({ data, invocation }) => {
6
+ const query = globalConfigEmptyRequestSchema.parse(data);
7
+ return loadModel(readSiteProfileModel, query, invocation);
8
+ });
9
+ //# sourceMappingURL=read.msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.msg.js","sourceRoot":"","sources":["../../../src/messages/site-profile/read.msg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,oBAAoB,MAAM,yCAAyC,CAAC;AAE3E,eAAe,kBAAkB,CAAU,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE;IACxE,MAAM,KAAK,GAAG,8BAA8B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,SAAS,CAAC,oBAAoB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@hile/message-loader").MessageRegisterProps<unknown, import("@hile/micro").MicroMessageHandlerExtras>;
2
+ export default _default;
3
+ //# sourceMappingURL=update.msg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.msg.d.ts","sourceRoot":"","sources":["../../../src/messages/site-profile/update.msg.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { loadModel } from '@hile/model';
2
+ import { defineMicroMessage } from '@hile/micro';
3
+ import { globalConfigProfileUpdateCommandSchema } from '@zlooks.cn/global-config-shared';
4
+ import updateSiteProfileModel from '../../models/update-site-profile.model.js';
5
+ export default defineMicroMessage(async ({ data, invocation }) => {
6
+ const command = globalConfigProfileUpdateCommandSchema.parse(data);
7
+ return loadModel(updateSiteProfileModel, command, invocation);
8
+ });
9
+ //# sourceMappingURL=update.msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.msg.js","sourceRoot":"","sources":["../../../src/messages/site-profile/update.msg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,sCAAsC,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,sBAAsB,MAAM,2CAA2C,CAAC;AAE/E,eAAe,kBAAkB,CAAU,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE;IACxE,MAAM,OAAO,GAAG,sCAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnE,OAAO,SAAS,CAAC,sBAAsB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAChE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,43 @@
1
+ declare const _default: import("@hile/model").ModelDefinition<Record<string, never>, Readonly<{
2
+ schemaVersion: 2;
3
+ revision: number;
4
+ value: {
5
+ identity: {
6
+ name: string;
7
+ homeHref: string;
8
+ backgroundVideoUrl?: string | null | undefined;
9
+ logoUrl?: string | undefined;
10
+ faviconUrl?: string | undefined;
11
+ description?: string | undefined;
12
+ };
13
+ linkGroups: {
14
+ id: string;
15
+ label: string;
16
+ links: ({
17
+ id: string;
18
+ label: string;
19
+ href: string;
20
+ external: false;
21
+ } | {
22
+ id: string;
23
+ label: string;
24
+ href: string;
25
+ external: true;
26
+ })[];
27
+ }[];
28
+ legal: {
29
+ copyright?: string | undefined;
30
+ registrations: {
31
+ id: string;
32
+ kind: "icp" | "other" | "public-security";
33
+ number: string;
34
+ verificationUrl?: string | undefined;
35
+ iconUrl?: string | undefined;
36
+ }[];
37
+ };
38
+ };
39
+ updatedAt: string;
40
+ updatedBy: string;
41
+ }>>;
42
+ export default _default;
43
+ //# sourceMappingURL=read-site-presentation.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-site-presentation.model.d.ts","sourceRoot":"","sources":["../../src/models/read-site-presentation.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { loadService } from '@hile/core';
2
+ import { defineModel } from '@hile/model';
3
+ import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
4
+ export default defineModel(async (_query, invocation) => {
5
+ invocation.signal.throwIfAborted();
6
+ const { presentationStore } = await loadService(globalConfigRuntimeService);
7
+ invocation.signal.throwIfAborted();
8
+ const snapshot = await presentationStore.read();
9
+ invocation.signal.throwIfAborted();
10
+ return snapshot;
11
+ });
12
+ //# sourceMappingURL=read-site-presentation.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-site-presentation.model.js","sourceRoot":"","sources":["../../src/models/read-site-presentation.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;IAC3B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAC5E,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAChD,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
@@ -0,0 +1,33 @@
1
+ declare const _default: import("@hile/model").ModelDefinition<Record<string, never>, Readonly<{
2
+ schemaVersion: 1;
3
+ revision: number;
4
+ value: {
5
+ profile: {
6
+ displayName: string;
7
+ avatarUrl?: string | undefined;
8
+ headline: string;
9
+ biography: string;
10
+ };
11
+ topics: {
12
+ id: string;
13
+ name: string;
14
+ summary: string;
15
+ href?: string | undefined;
16
+ }[];
17
+ featuredLinks: ({
18
+ id: string;
19
+ label: string;
20
+ href: string;
21
+ external: false;
22
+ } | {
23
+ id: string;
24
+ label: string;
25
+ href: string;
26
+ external: true;
27
+ })[];
28
+ };
29
+ updatedAt: string;
30
+ updatedBy: string;
31
+ }>>;
32
+ export default _default;
33
+ //# sourceMappingURL=read-site-profile.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-site-profile.model.d.ts","sourceRoot":"","sources":["../../src/models/read-site-profile.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { loadService } from '@hile/core';
2
+ import { defineModel } from '@hile/model';
3
+ import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
4
+ export default defineModel(async (_query, invocation) => {
5
+ invocation.signal.throwIfAborted();
6
+ const { profileStore } = await loadService(globalConfigRuntimeService);
7
+ invocation.signal.throwIfAborted();
8
+ const snapshot = await profileStore.read();
9
+ invocation.signal.throwIfAborted();
10
+ return snapshot;
11
+ });
12
+ //# sourceMappingURL=read-site-profile.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-site-profile.model.js","sourceRoot":"","sources":["../../src/models/read-site-profile.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;IAC3B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IACvE,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,CAAC;IAC3C,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
@@ -0,0 +1,81 @@
1
+ declare const _default: import("@hile/model").ModelDefinition<Readonly<{
2
+ expectedRevision: number;
3
+ value: {
4
+ identity: {
5
+ name: string;
6
+ homeHref: string;
7
+ backgroundVideoUrl?: string | null | undefined;
8
+ logoUrl?: string | undefined;
9
+ faviconUrl?: string | undefined;
10
+ description?: string | undefined;
11
+ };
12
+ linkGroups: {
13
+ id: string;
14
+ label: string;
15
+ links: ({
16
+ id: string;
17
+ label: string;
18
+ href: string;
19
+ external: false;
20
+ } | {
21
+ id: string;
22
+ label: string;
23
+ href: string;
24
+ external: true;
25
+ })[];
26
+ }[];
27
+ legal: {
28
+ copyright?: string | undefined;
29
+ registrations: {
30
+ id: string;
31
+ kind: "icp" | "other" | "public-security";
32
+ number: string;
33
+ verificationUrl?: string | undefined;
34
+ iconUrl?: string | undefined;
35
+ }[];
36
+ };
37
+ };
38
+ actor: string;
39
+ }>, Readonly<{
40
+ schemaVersion: 2;
41
+ revision: number;
42
+ value: {
43
+ identity: {
44
+ name: string;
45
+ homeHref: string;
46
+ backgroundVideoUrl?: string | null | undefined;
47
+ logoUrl?: string | undefined;
48
+ faviconUrl?: string | undefined;
49
+ description?: string | undefined;
50
+ };
51
+ linkGroups: {
52
+ id: string;
53
+ label: string;
54
+ links: ({
55
+ id: string;
56
+ label: string;
57
+ href: string;
58
+ external: false;
59
+ } | {
60
+ id: string;
61
+ label: string;
62
+ href: string;
63
+ external: true;
64
+ })[];
65
+ }[];
66
+ legal: {
67
+ copyright?: string | undefined;
68
+ registrations: {
69
+ id: string;
70
+ kind: "icp" | "other" | "public-security";
71
+ number: string;
72
+ verificationUrl?: string | undefined;
73
+ iconUrl?: string | undefined;
74
+ }[];
75
+ };
76
+ };
77
+ updatedAt: string;
78
+ updatedBy: string;
79
+ }>>;
80
+ export default _default;
81
+ //# sourceMappingURL=update-site-presentation.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-site-presentation.model.d.ts","sourceRoot":"","sources":["../../src/models/update-site-presentation.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { loadService } from '@hile/core';
2
+ import { defineModel } from '@hile/model';
3
+ import { globalConfigPresentationUpdateCommandSchema, } from '@zlooks.cn/global-config-shared';
4
+ import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
5
+ export default defineModel(async (input, invocation) => {
6
+ invocation.signal.throwIfAborted();
7
+ const command = globalConfigPresentationUpdateCommandSchema.parse(input);
8
+ const { presentationStore, presentationPublisher } = await loadService(globalConfigRuntimeService);
9
+ invocation.signal.throwIfAborted();
10
+ const snapshot = await presentationStore.update({
11
+ expectedRevision: command.expectedRevision,
12
+ value: command.value,
13
+ updatedBy: command.actor,
14
+ });
15
+ await presentationPublisher.refresh();
16
+ return snapshot;
17
+ });
18
+ //# sourceMappingURL=update-site-presentation.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-site-presentation.model.js","sourceRoot":"","sources":["../../src/models/update-site-presentation.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,2CAA2C,GAG5C,MAAM,iCAAiC,CAAC;AACzC,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;IAC1B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,OAAO,GAAG,2CAA2C,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzE,MAAM,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,GAAG,MAAM,WAAW,CACpE,0BAA0B,CAC3B,CAAC;IACF,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,MAAM,CAAC;QAC9C,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,KAAK;KACzB,CAAC,CAAC;IACH,MAAM,qBAAqB,CAAC,OAAO,EAAE,CAAC;IACtC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
@@ -0,0 +1,61 @@
1
+ declare const _default: import("@hile/model").ModelDefinition<Readonly<{
2
+ expectedRevision: number;
3
+ value: {
4
+ profile: {
5
+ displayName: string;
6
+ avatarUrl?: string | undefined;
7
+ headline: string;
8
+ biography: string;
9
+ };
10
+ topics: {
11
+ id: string;
12
+ name: string;
13
+ summary: string;
14
+ href?: string | undefined;
15
+ }[];
16
+ featuredLinks: ({
17
+ id: string;
18
+ label: string;
19
+ href: string;
20
+ external: false;
21
+ } | {
22
+ id: string;
23
+ label: string;
24
+ href: string;
25
+ external: true;
26
+ })[];
27
+ };
28
+ actor: string;
29
+ }>, Readonly<{
30
+ schemaVersion: 1;
31
+ revision: number;
32
+ value: {
33
+ profile: {
34
+ displayName: string;
35
+ avatarUrl?: string | undefined;
36
+ headline: string;
37
+ biography: string;
38
+ };
39
+ topics: {
40
+ id: string;
41
+ name: string;
42
+ summary: string;
43
+ href?: string | undefined;
44
+ }[];
45
+ featuredLinks: ({
46
+ id: string;
47
+ label: string;
48
+ href: string;
49
+ external: false;
50
+ } | {
51
+ id: string;
52
+ label: string;
53
+ href: string;
54
+ external: true;
55
+ })[];
56
+ };
57
+ updatedAt: string;
58
+ updatedBy: string;
59
+ }>>;
60
+ export default _default;
61
+ //# sourceMappingURL=update-site-profile.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-site-profile.model.d.ts","sourceRoot":"","sources":["../../src/models/update-site-profile.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { loadService } from '@hile/core';
2
+ import { defineModel } from '@hile/model';
3
+ import { globalConfigProfileUpdateCommandSchema, } from '@zlooks.cn/global-config-shared';
4
+ import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
5
+ export default defineModel(async (input, invocation) => {
6
+ invocation.signal.throwIfAborted();
7
+ const command = globalConfigProfileUpdateCommandSchema.parse(input);
8
+ const { profileStore, profilePublisher } = await loadService(globalConfigRuntimeService);
9
+ invocation.signal.throwIfAborted();
10
+ const snapshot = await profileStore.update({
11
+ expectedRevision: command.expectedRevision,
12
+ value: command.value,
13
+ updatedBy: command.actor,
14
+ });
15
+ await profilePublisher.refresh();
16
+ return snapshot;
17
+ });
18
+ //# sourceMappingURL=update-site-profile.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-site-profile.model.js","sourceRoot":"","sources":["../../src/models/update-site-profile.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,sCAAsC,GAGvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;IAC1B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,OAAO,GAAG,sCAAsC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IACzF,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC;QACzC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,KAAK;KACzB,CAAC,CAAC;IACH,MAAM,gBAAgB,CAAC,OAAO,EAAE,CAAC;IACjC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"application.service.d.ts","sourceRoot":"","sources":["../../src/services/application.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"application.service.d.ts","sourceRoot":"","sources":["../../src/services/application.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { fileURLToPath } from 'node:url';
1
2
  import { defineService } from '@hile/core';
2
3
  import { Application } from '@hile/micro';
3
4
  import { GLOBAL_CONFIG_SERVICE_NAMESPACE } from '@zlooks.cn/global-config-shared';
@@ -14,6 +15,7 @@ export default defineService('zlooks.global-config.application', async (shutdown
14
15
  registry,
15
16
  ...(advertiseHost ? { advertiseHost } : {}),
16
17
  });
18
+ await application.load(fileURLToPath(new URL('../messages', import.meta.url)));
17
19
  const microPort = await detect();
18
20
  shutdown(await application.listen(microPort));
19
21
  return application;
@@ -1 +1 @@
1
- {"version":3,"file":"application.service.js","sourceRoot":"","sources":["../../src/services/application.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,eAAe,aAAa,CAAC,kCAAkC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAClF,MAAM,QAAQ,GAAG,sBAAsB,CAAC;QACtC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;QACxC,aAAa,EAAE,OAAO,CAAC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E,+BAA+B;QAC1C,QAAQ;QACR,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CAAC;IACH,MAAM,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,aAAa,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/E,MAAM,SAAS,GAAG,MAAM,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,MAAM,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9C,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC,CAAC"}
@@ -1,152 +1,12 @@
1
+ import { TypeOrmSiteProfileStore } from '../config/typeorm-site-profile-store.js';
2
+ import { TypeOrmSitePresentationStore } from '../config/typeorm-site-presentation-store.js';
3
+ import { SiteProfilePublisher } from '../runtime/site-profile-publisher.js';
4
+ import { SitePresentationPublisher } from '../runtime/site-presentation-publisher.js';
1
5
  declare const _default: import("@hile/core").ServiceRegisterProps<{
2
- readonly readPresentation: () => Promise<Readonly<{
3
- schemaVersion: 2;
4
- revision: number;
5
- value: {
6
- identity: {
7
- name: string;
8
- homeHref: string;
9
- backgroundVideoUrl?: string | null | undefined;
10
- logoUrl?: string | undefined;
11
- faviconUrl?: string | undefined;
12
- description?: string | undefined;
13
- };
14
- linkGroups: {
15
- id: string;
16
- label: string;
17
- links: ({
18
- id: string;
19
- label: string;
20
- href: string;
21
- external: false;
22
- } | {
23
- id: string;
24
- label: string;
25
- href: string;
26
- external: true;
27
- })[];
28
- }[];
29
- legal: {
30
- copyright?: string | undefined;
31
- registrations: {
32
- id: string;
33
- kind: "icp" | "other" | "public-security";
34
- number: string;
35
- verificationUrl?: string | undefined;
36
- iconUrl?: string | undefined;
37
- }[];
38
- };
39
- };
40
- updatedAt: string;
41
- updatedBy: string;
42
- }>>;
43
- readonly updatePresentationFromMcp: (input: unknown & {
44
- readonly updatedBy?: string;
45
- }) => Promise<Readonly<{
46
- schemaVersion: 2;
47
- revision: number;
48
- value: {
49
- identity: {
50
- name: string;
51
- homeHref: string;
52
- backgroundVideoUrl?: string | null | undefined;
53
- logoUrl?: string | undefined;
54
- faviconUrl?: string | undefined;
55
- description?: string | undefined;
56
- };
57
- linkGroups: {
58
- id: string;
59
- label: string;
60
- links: ({
61
- id: string;
62
- label: string;
63
- href: string;
64
- external: false;
65
- } | {
66
- id: string;
67
- label: string;
68
- href: string;
69
- external: true;
70
- })[];
71
- }[];
72
- legal: {
73
- copyright?: string | undefined;
74
- registrations: {
75
- id: string;
76
- kind: "icp" | "other" | "public-security";
77
- number: string;
78
- verificationUrl?: string | undefined;
79
- iconUrl?: string | undefined;
80
- }[];
81
- };
82
- };
83
- updatedAt: string;
84
- updatedBy: string;
85
- }>>;
86
- readonly readProfile: () => Promise<Readonly<{
87
- schemaVersion: 1;
88
- revision: number;
89
- value: {
90
- profile: {
91
- displayName: string;
92
- avatarUrl?: string | undefined;
93
- headline: string;
94
- biography: string;
95
- };
96
- topics: {
97
- id: string;
98
- name: string;
99
- summary: string;
100
- href?: string | undefined;
101
- }[];
102
- featuredLinks: ({
103
- id: string;
104
- label: string;
105
- href: string;
106
- external: false;
107
- } | {
108
- id: string;
109
- label: string;
110
- href: string;
111
- external: true;
112
- })[];
113
- };
114
- updatedAt: string;
115
- updatedBy: string;
116
- }>>;
117
- readonly updateProfileFromMcp: (input: unknown & {
118
- readonly updatedBy?: string;
119
- }) => Promise<Readonly<{
120
- schemaVersion: 1;
121
- revision: number;
122
- value: {
123
- profile: {
124
- displayName: string;
125
- avatarUrl?: string | undefined;
126
- headline: string;
127
- biography: string;
128
- };
129
- topics: {
130
- id: string;
131
- name: string;
132
- summary: string;
133
- href?: string | undefined;
134
- }[];
135
- featuredLinks: ({
136
- id: string;
137
- label: string;
138
- href: string;
139
- external: false;
140
- } | {
141
- id: string;
142
- label: string;
143
- href: string;
144
- external: true;
145
- })[];
146
- };
147
- updatedAt: string;
148
- updatedBy: string;
149
- }>>;
6
+ readonly presentationStore: TypeOrmSitePresentationStore;
7
+ readonly presentationPublisher: SitePresentationPublisher;
8
+ readonly profileStore: TypeOrmSiteProfileStore;
9
+ readonly profilePublisher: SiteProfilePublisher;
150
10
  }>;
151
11
  export default _default;
152
12
  //# sourceMappingURL=global-config-runtime.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-config-runtime.service.d.ts","sourceRoot":"","sources":["../../src/services/global-config-runtime.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDA+C6C,OAAO,GAAG;QAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAW9C,OAAO,GAAG;QAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE"}
1
+ {"version":3,"file":"global-config-runtime.service.d.ts","sourceRoot":"","sources":["../../src/services/global-config-runtime.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { defineService, loadService } from '@hile/core';
2
- import { parseGlobalConfigMcpProfileUpdate, parseGlobalConfigMcpUpdate, } from '@zlooks.cn/global-config-shared';
3
2
  import { TypeOrmSiteProfileStore } from '../config/typeorm-site-profile-store.js';
4
3
  import { TypeOrmSitePresentationStore } from '../config/typeorm-site-presentation-store.js';
5
4
  import { SiteProfilePublisher } from '../runtime/site-profile-publisher.js';
@@ -27,30 +26,7 @@ export default defineService('zlooks.global-config.runtime', async (shutdown) =>
27
26
  throw error;
28
27
  }
29
28
  shutdown(() => closePublishers([presentationPublisher, profilePublisher]));
30
- return {
31
- readPresentation: () => presentationStore.read(),
32
- updatePresentationFromMcp: async (input) => {
33
- if (typeof input !== 'object' || input === null || typeof input.updatedBy !== 'string') {
34
- throw new TypeError('Verified MCP actor is required');
35
- }
36
- const { updatedBy, ...untrustedRequest } = input;
37
- const request = parseGlobalConfigMcpUpdate(untrustedRequest);
38
- const snapshot = await presentationStore.update({ ...request, updatedBy });
39
- await presentationPublisher.refresh();
40
- return snapshot;
41
- },
42
- readProfile: () => profileStore.read(),
43
- updateProfileFromMcp: async (input) => {
44
- if (typeof input !== 'object' || input === null || typeof input.updatedBy !== 'string') {
45
- throw new TypeError('Verified MCP actor is required');
46
- }
47
- const { updatedBy, ...untrustedRequest } = input;
48
- const request = parseGlobalConfigMcpProfileUpdate(untrustedRequest);
49
- const snapshot = await profileStore.update({ ...request, updatedBy });
50
- await profilePublisher.refresh();
51
- return snapshot;
52
- },
53
- };
29
+ return { presentationStore, presentationPublisher, profileStore, profilePublisher };
54
30
  });
55
31
  async function closePublishers(publishers) {
56
32
  const results = await Promise.allSettled(publishers.map((publisher) => publisher.close()));
@@ -1 +1 @@
1
- {"version":3,"file":"global-config-runtime.service.js","sourceRoot":"","sources":["../../src/services/global-config-runtime.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EACL,iCAAiC,EACjC,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,kBAAkB,MAAM,0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AC;YACxD,CAAC;YACD,MAAM,EAAE,SAAS,EAAE,GAAG,gBAAgB,EAAE,GAAG,KAAK,CAAC;YACjD,MAAM,OAAO,GAAG,iCAAiC,CAAC,gBAAgB,CAAC,CAAC;YACpE,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;YACtE,MAAM,gBAAgB,CAAC,OAAO,EAAE,CAAC;YACjC,OAAO,QAAQ,CAAC;QAClB,CAAC;KACO,CAAC;AACb,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,eAAe,CAC5B,UAAiD;IAEjD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3F,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChG,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,0CAA0C,CAAC,CAAC;AACtG,CAAC"}
1
+ {"version":3,"file":"global-config-runtime.service.js","sourceRoot":"","sources":["../../src/services/global-config-runtime.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,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} from '@zlooks.cn/global-config-shared';
3
4
  import { createGlobalConfigMcpProvider } from '../mcp/global-config-provider.js';
4
5
  import applicationService from './application.service.js';
5
- import globalConfigRuntimeService from './global-config-runtime.service.js';
6
6
  export default defineService('zlooks.global-config.mcp-provider', async (shutdown) => {
7
- const [application, runtime] = await Promise.all([
8
- loadService(applicationService),
9
- loadService(globalConfigRuntimeService),
10
- ]);
11
- const attachment = await attachMcpProvider(application, createGlobalConfigMcpProvider(runtime), {
7
+ const application = await loadService(applicationService);
8
+ const attachment = await attachMcpProvider(application, createGlobalConfigMcpProvider(createGlobalConfigMicroClient(application)), {
12
9
  // Deployment trust boundary: only fully trusted services can reach the internal
13
10
  // Hile Micro mesh, so Provider invocation intentionally requires no shared secret.
14
11
  invocationSecurity: { mode: 'trusted-internal' },
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-provider.service.js","sourceRoot":"","sources":["../../src/services/mcp-provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,0BAA0B,MAAM,oCAAoC,CAAC;AAE5E,eAAe,aAAa,CAAC,mCAAmC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IACnF,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC/C,WAAW,CAAC,kBAAkB,CAAC;QAC/B,WAAW,CAAC,0BAA0B,CAAC;KACxC,CAAC,CAAC;IACH,MAAM,UAAU,GAAG,MAAM,iBAAiB,CACxC,WAAW,EACX,6BAA6B,CAAC,OAAO,CAAC,EACtC;QACE,gFAAgF;QAChF,mFAAmF;QACnF,kBAAkB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;KACjD,CACF,CAAC;IACF,QAAQ,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;IACnC,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"mcp-provider.service.js","sourceRoot":"","sources":["../../src/services/mcp-provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAE1D,eAAe,aAAa,CAAC,mCAAmC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IACnF,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,MAAM,iBAAiB,CACxC,WAAW,EACX,6BAA6B,CAAC,6BAA6B,CAAC,WAAW,CAAC,CAAC,EACzE;QACE,gFAAgF;QAChF,mFAAmF;QACnF,kBAAkB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;KACjD,CACF,CAAC;IACF,QAAQ,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;IACnC,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zlooks.cn/global-config-server",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -31,28 +31,30 @@
31
31
  "typecheck": "tsc -p tsconfig.json --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@hile/core": "4.0.1",
35
- "@hile/logger": "4.0.1",
36
- "@hile/mcp": "1.0.5",
37
- "@hile/micro": "4.0.4",
38
- "@hile/typeorm": "4.0.1",
39
- "@zlooks.cn/database-command": "1.0.2",
40
- "@zlooks.cn/global-config-shared": "1.0.0",
34
+ "@hile/core": "4.0.2",
35
+ "@hile/logger": "4.0.2",
36
+ "@hile/mcp": "1.0.6",
37
+ "@hile/message-loader": "4.0.6",
38
+ "@hile/micro": "4.0.6",
39
+ "@hile/model": "4.0.4",
40
+ "@hile/typeorm": "4.0.2",
41
+ "@zlooks.cn/database-command": "1.0.3",
42
+ "@zlooks.cn/global-config-shared": "1.0.1",
41
43
  "@zlooks.cn/infrastructure": "1.0.0",
42
- "@zlooks.cn/registry-config": "1.0.0",
43
- "@zlooks.cn/service-command": "1.0.0",
44
+ "@zlooks.cn/registry-config": "1.0.1",
45
+ "@zlooks.cn/service-command": "1.0.1",
44
46
  "detect-port": "2.1.0",
45
47
  "pg": "8.23.0",
46
48
  "typeorm": "1.1.0",
47
49
  "zod": "4.4.3"
48
50
  },
49
51
  "devDependencies": {
50
- "@hile/cli": "4.0.5",
52
+ "@hile/cli": "4.0.7",
51
53
  "@types/node": "26.2.0",
52
54
  "fix-esm-import-path": "1.10.3",
53
55
  "pg-mem": "3.0.14",
54
56
  "typescript": "7.0.2",
55
57
  "vitest": "4.1.11"
56
58
  },
57
- "gitHead": "375c50cb6747e7741286fc85ac72cb52a2315001"
59
+ "gitHead": "3c7e3ec494a3702626a2b150991b136b89550e35"
58
60
  }