@opengeni/core 2.10.0-canary.0 → 2.10.0-canary.2

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 (50) hide show
  1. package/dist/application/external-workspace-members.d.ts +16 -0
  2. package/dist/application/host-mcp-resolvers.d.ts +13 -0
  3. package/dist/application/new-session-drafts.d.ts +4 -2
  4. package/dist/chunk-5WZYFL45.js +266 -0
  5. package/dist/chunk-5WZYFL45.js.map +1 -0
  6. package/dist/domain/file-owner.d.ts +8 -0
  7. package/dist/domain/knowledge-files.d.ts +20 -0
  8. package/dist/domain/knowledge-messages.d.ts +39 -0
  9. package/dist/domain/knowledge-messages.test.d.ts +1 -0
  10. package/dist/domain/knowledge-search.d.ts +80 -0
  11. package/dist/domain/knowledge-search.test.d.ts +1 -0
  12. package/dist/domain/knowledge.d.ts +9 -0
  13. package/dist/domain/pr-review.d.ts +2 -2
  14. package/dist/domain/resources.d.ts +2 -2
  15. package/dist/domain/scheduled-tasks.d.ts +12 -2
  16. package/dist/domain/sessions.d.ts +6 -2
  17. package/dist/domain/skills.d.ts +16 -0
  18. package/dist/index.d.ts +6 -4
  19. package/dist/index.js +3948 -3939
  20. package/dist/index.js.map +1 -1
  21. package/dist/remote-mcp-credentials.d.ts +16 -1
  22. package/dist/remote-mcp-credentials.js +7 -215
  23. package/dist/remote-mcp-credentials.js.map +1 -1
  24. package/package.json +12 -12
  25. package/src/application/external-workspace-members.ts +89 -0
  26. package/src/application/host-mcp-resolvers.ts +85 -0
  27. package/src/application/new-session-drafts.ts +37 -3
  28. package/src/domain/file-owner.ts +52 -0
  29. package/src/domain/host-mcp-task-admission.ts +27 -17
  30. package/src/domain/knowledge-files.ts +39 -0
  31. package/src/domain/knowledge-messages.test.ts +91 -0
  32. package/src/domain/knowledge-messages.ts +105 -0
  33. package/src/domain/knowledge-search.test.ts +45 -0
  34. package/src/domain/knowledge-search.ts +55 -0
  35. package/src/domain/knowledge.ts +133 -0
  36. package/src/domain/product-integration-skill.gen.ts +7 -7
  37. package/src/domain/resources.ts +36 -25
  38. package/src/domain/scheduled-tasks.ts +362 -139
  39. package/src/domain/sessions.ts +117 -20
  40. package/src/domain/skills.ts +8 -0
  41. package/src/index.ts +9 -4
  42. package/src/remote-mcp-credentials.ts +76 -8
  43. package/dist/domain/company-brain-governed-writes.d.ts +0 -79
  44. package/dist/domain/governed-learning-activation.d.ts +0 -16
  45. package/dist/domain/governed-learning-evaluator.d.ts +0 -6
  46. package/dist/domain/remember.d.ts +0 -72
  47. package/src/domain/company-brain-governed-writes.ts +0 -346
  48. package/src/domain/governed-learning-activation.ts +0 -44
  49. package/src/domain/governed-learning-evaluator.ts +0 -49
  50. package/src/domain/remember.ts +0 -577
@@ -92,6 +92,7 @@ export declare function freezeAgentChildAutomaticTitleInCreatorContext(context:
92
92
  /** @internal Keyed repair must use the committed winner, not the retry payload. */
93
93
  export declare function initialAutomaticTitleForSessionStart(session: Pick<Session, "createdByContext">, requestedTitle: string | null | undefined): string | null;
94
94
  export declare function createAndStartSessionWithOutcome(input: {
95
+ initialAgentLearning?: import("@opengeni/contracts").AgentLearningOverrides | undefined;
95
96
  requestedSessionId?: string;
96
97
  db: Database;
97
98
  bus: EventBus;
@@ -339,7 +340,7 @@ export declare function resolveSessionCreateScope(input: {
339
340
  };
340
341
  parent: SessionCreateScope | null;
341
342
  }): SessionCreateScope;
342
- export declare function createSessionForRequestWithOutcome(unresolvedDeps: ApiRouteDeps, grant: AccessGrant, workspaceId: string, rawPayload: unknown, authorization?: AccessGrantAuthorization, agentChildPresentation?: AgentChildSessionCreatePresentation): Promise<CreateSessionRequestOutcome>;
343
+ declare function createSessionForRequestInFileScope(unresolvedDeps: ApiRouteDeps, grant: AccessGrant, workspaceId: string, rawPayload: unknown, authorization?: AccessGrantAuthorization, agentChildPresentation?: AgentChildSessionCreatePresentation): Promise<CreateSessionRequestOutcome>;
343
344
  /** @internal Fixed public projection; the committed session outcome remains authoritative. */
344
345
  export declare function reportSessionUsageRecordingFailure(_error: unknown): void;
345
346
  /** Backward-compatible entity-returning request path for REST and core callers. */
@@ -351,7 +352,7 @@ export declare function createSessionForRequest(deps: ApiRouteDeps, grant: Acces
351
352
  * enqueue, and usage recording. `toolsProvided: false` durably preserves an
352
353
  * Tool selection is durable session state and never rides a follow-up prompt.
353
354
  */
354
- export declare function acceptSessionUserMessageWithOutcome(deps: AcceptSessionUserMessageDependencies, grant: AccessGrant, workspaceId: string, sessionId: string, input: {
355
+ declare function acceptSessionUserMessageInFileScope(deps: AcceptSessionUserMessageDependencies, grant: AccessGrant, workspaceId: string, sessionId: string, input: {
355
356
  text: string;
356
357
  annotations?: SubmittedTimelineAnnotation[];
357
358
  modelContext?: string | null;
@@ -431,4 +432,7 @@ export declare function updateSessionToolPolicy(deps: {
431
432
  sessionAuthorization?: SessionAuthorizationPort | null;
432
433
  }, grant: AccessGrant, sessionId: string, request: UpdateSessionToolPolicyRequest): Promise<Session>;
433
434
  export declare function readSessionLineage(deps: Pick<ApiRouteDeps, "db" | "sessionAuthorization">, grant: AccessGrant, sessionId: string): Promise<import("@opengeni/db").SessionLineage>;
435
+ /** Keep original-file ownership scoped across admission, history hydration and setup. */
436
+ export declare function createSessionForRequestWithOutcome(...args: Parameters<typeof createSessionForRequestInFileScope>): Promise<CreateSessionRequestOutcome>;
437
+ export declare function acceptSessionUserMessageWithOutcome(...args: Parameters<typeof acceptSessionUserMessageInFileScope>): ReturnType<typeof acceptSessionUserMessageInFileScope>;
434
438
  export {};
@@ -55,6 +55,22 @@ export declare function approveSkill(db: Database, input: SkillRevisionInput): P
55
55
  } | undefined;
56
56
  replayed: boolean;
57
57
  }>;
58
+ export declare function rejectSkill(db: Database, input: SkillRevisionInput): Promise<{
59
+ operationId: string;
60
+ skillId: string;
61
+ revisionId: string;
62
+ outcome: "applied" | "pending" | "preserved";
63
+ decision?: "rejected" | undefined;
64
+ pendingReason?: "approval" | "source_finalization" | undefined;
65
+ skillReview?: {
66
+ sourceOperationId: string;
67
+ skillId: string;
68
+ revisionId: string;
69
+ expectedRevisionId: string | null;
70
+ expectedScopeVersion: number;
71
+ } | undefined;
72
+ replayed: boolean;
73
+ }>;
58
74
  export declare function restoreSkill(db: Database, input: SkillRevisionInput): Promise<{
59
75
  operationId: string;
60
76
  skillId: string;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "./domain/skills.js";
2
+ export * from "./domain/knowledge.js";
3
+ export * from "./domain/knowledge-search.js";
2
4
  export * from "./dependencies.js";
3
5
  export * from "./workflow-wake-contract.js";
4
6
  export * from "./sandbox-types.js";
@@ -12,6 +14,7 @@ export * from "./sandbox/runtime-settings.js";
12
14
  export * from "./access/index.js";
13
15
  export * from "./application/external-workspace-members.js";
14
16
  export * from "./application/external-identity-lifecycle.js";
17
+ export * from "./application/host-mcp-resolvers.js";
15
18
  export * from "./application/external-continuation.js";
16
19
  export * from "./application/session-mcp-credential-rotation.js";
17
20
  export * from "./application/external-link-work-admission.js";
@@ -45,10 +48,6 @@ export * from "./domain/governed-learning-slack-publication.js";
45
48
  export * from "./domain/slack-publication-secret-safety.js";
46
49
  export * from "./domain/company-profile-durable-learning-adapter.js";
47
50
  export * from "./domain/company-profile-agent-admin.js";
48
- export * from "./domain/company-brain-governed-writes.js";
49
- export * from "./domain/governed-learning-evaluator.js";
50
- export * from "./domain/governed-learning-activation.js";
51
- export * from "./domain/remember.js";
52
51
  export * from "./domain/slack-bot.js";
53
52
  export * from "./domain/conversation-integrations.js";
54
53
  export * from "./domain/fiken.js";
@@ -65,3 +64,6 @@ export * from "./application/api-integration-servers.js";
65
64
  export * from "./editable-artifact-live.js";
66
65
  export * from "./editable-artifacts.js";
67
66
  export { withSiteSessionOrigin } from "./site-session-origin.js";
67
+ export { fileOwnerContextForAccess, fileOwnerContextForAgent } from "./domain/file-owner.js";
68
+ export { prepareKnowledgeFile } from "./domain/knowledge-files.js";
69
+ export { retainKnowledgeMessage } from "./domain/knowledge-messages.js";