@opengeni/core 2.8.0-canary.0 → 2.8.2-canary.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/dist/dependencies.d.ts +4 -2
- package/dist/domain/github-skill-source.d.ts +5 -0
- package/dist/domain/packs.d.ts +2 -3
- package/dist/domain/pr-review.d.ts +2 -1
- package/dist/domain/remember.d.ts +2 -2
- package/dist/domain/sessions.d.ts +1 -0
- package/dist/domain/skill-search.d.ts +30 -0
- package/dist/domain/skills.d.ts +73 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +523 -30
- package/dist/index.js.map +1 -1
- package/dist/transcription.d.ts +12 -1
- package/package.json +12 -12
- package/src/application/session-tenancy.ts +1 -0
- package/src/dependencies.ts +4 -2
- package/src/domain/github-skill-source.ts +142 -0
- package/src/domain/packs.ts +16 -8
- package/src/domain/product-integration-pack.ts +1 -0
- package/src/domain/remember.ts +7 -0
- package/src/domain/scheduled-tasks.ts +28 -0
- package/src/domain/sessions.ts +17 -0
- package/src/domain/skill-imports.ts +99 -15
- package/src/domain/skill-search.ts +218 -0
- package/src/domain/skills.ts +87 -0
- package/src/index.ts +3 -0
- package/src/sandbox/routing.ts +40 -1
- package/src/sandbox/runtime-settings.ts +9 -2
- package/src/transcription.ts +13 -1
package/dist/dependencies.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Settings } from "@opengeni/config";
|
|
2
2
|
import type { ConnectionCredentialsPort, Document, DocumentAuthorityKind, GitHubAppApiPort, ScheduledTask, ScheduledTaskTriggerType, SessionAuthorizationPort, TurnInitiator } from "@opengeni/contracts";
|
|
3
|
-
import type { Database } from "@opengeni/db";
|
|
3
|
+
import type { Database, SessionWorkflowWakeDeliveryResult } from "@opengeni/db";
|
|
4
4
|
import type { DocumentServices } from "@opengeni/documents";
|
|
5
5
|
import type { EventBus } from "@opengeni/events";
|
|
6
6
|
import type { Observability } from "@opengeni/observability";
|
|
@@ -30,7 +30,9 @@ export type SessionWorkflowClient = {
|
|
|
30
30
|
workflowId: string;
|
|
31
31
|
wakeRevision: number;
|
|
32
32
|
interruptionRequested?: boolean;
|
|
33
|
-
|
|
33
|
+
/** Called after transport acceptance, before the fallible durable ACK. */
|
|
34
|
+
onSignalAccepted?: () => void;
|
|
35
|
+
}) => Promise<SessionWorkflowWakeDeliveryResult | void>;
|
|
34
36
|
/** Trigger one bounded drain of already-committed workflow-wake revisions. */
|
|
35
37
|
requestSessionWorkflowWakeDispatch: () => Promise<void>;
|
|
36
38
|
signalCodexCapacity?: (input: {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Settings } from "@opengeni/config";
|
|
2
|
+
import type { GitHubSkillSourceClient } from "./skill-imports.js";
|
|
3
|
+
type GitHubJsonRequest = (path: string, maxBytes: number, label: string) => Promise<unknown>;
|
|
4
|
+
export declare function createGitHubSkillSourceClient(settings: Settings, requestJson?: GitHubJsonRequest): GitHubSkillSourceClient;
|
|
5
|
+
export {};
|
package/dist/domain/packs.d.ts
CHANGED
|
@@ -6,9 +6,8 @@ export declare function getCapabilityPack(packId: string): CapabilityPack | null
|
|
|
6
6
|
export declare function isBuiltInCapabilityPack(packId: string): boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Built-in packs plus the manifests registered for this workspace. Stored
|
|
9
|
-
* manifests
|
|
10
|
-
*
|
|
11
|
-
* the whole catalog.
|
|
9
|
+
* manifests retain exact historical bytes. Execution views derive Skill labels
|
|
10
|
+
* from their files, but malformed content needs explicit repair, not omission.
|
|
12
11
|
*/
|
|
13
12
|
export declare function listWorkspaceCapabilityPacks(db: Database, workspaceId: string): Promise<CapabilityPack[]>;
|
|
14
13
|
export declare function resolveCapabilityPack(db: Database, workspaceId: string, packId: string): Promise<CapabilityPack | null>;
|
|
@@ -42,6 +42,7 @@ export declare const prReviewAutomationAdapter: {
|
|
|
42
42
|
}) => {
|
|
43
43
|
initialMessage: string;
|
|
44
44
|
sessionTemplate: {
|
|
45
|
+
bundledSkillIds?: ("builtin:opengeni-documents" | "builtin:opengeni-presentations" | "builtin:opengeni-projects" | "builtin:opengeni-sites" | "builtin:opengeni-skills" | "builtin:opengeni-spreadsheets" | "builtin:opengeni-video-generation")[] | undefined;
|
|
45
46
|
prompt: string;
|
|
46
47
|
instructions: string | null;
|
|
47
48
|
resources: ({
|
|
@@ -68,7 +69,7 @@ export declare const prReviewAutomationAdapter: {
|
|
|
68
69
|
})[];
|
|
69
70
|
skills: {
|
|
70
71
|
name: string;
|
|
71
|
-
description
|
|
72
|
+
description: string;
|
|
72
73
|
files: {
|
|
73
74
|
path: string;
|
|
74
75
|
content: string;
|
|
@@ -2,9 +2,9 @@ import { type RememberLane, type GovernedLearningActivationReceipt, type Remembe
|
|
|
2
2
|
import { type Database, activateHumanConfirmedLearningDecision, archiveTaskNote, confirmRememberKnowledgeClaim, createTaskNote, getWorkspaceInstructionPolicyBaseline, getWorkspaceKnowledgeChangeProposalSummary, getWorkspaceKnowledgeClaimInitiatingHuman, materializeConfirmedRememberKnowledgeMemory, rebaselineWorkspaceInstructionPolicyKnowledgeProposal } from "@opengeni/db";
|
|
3
3
|
import { createCompanyBrainLearningPolicyRouter } from "./company-brain-governed-writes.js";
|
|
4
4
|
export declare class RememberError extends Error {
|
|
5
|
-
readonly code: "proposal_unavailable" | "proposal_not_confirmable" | "human_confirmation_unavailable" | "baseline_stale";
|
|
5
|
+
readonly code: "proposal_unavailable" | "proposal_not_confirmable" | "human_confirmation_unavailable" | "preference_retired" | "baseline_stale";
|
|
6
6
|
readonly name = "RememberError";
|
|
7
|
-
constructor(code: "proposal_unavailable" | "proposal_not_confirmable" | "human_confirmation_unavailable" | "baseline_stale", message: string);
|
|
7
|
+
constructor(code: "proposal_unavailable" | "proposal_not_confirmable" | "human_confirmation_unavailable" | "preference_retired" | "baseline_stale", message: string);
|
|
8
8
|
}
|
|
9
9
|
export type RememberRouterOptions = {
|
|
10
10
|
db: Database;
|
|
@@ -116,6 +116,7 @@ export declare function createAndStartSessionWithOutcome(input: {
|
|
|
116
116
|
modelContext?: string | null;
|
|
117
117
|
resources: ResourceRef[];
|
|
118
118
|
skills?: SessionSkill[];
|
|
119
|
+
bundledSkillIds?: import("@opengeni/contracts").BundledSkillId[] | undefined;
|
|
119
120
|
tools: ToolRef[];
|
|
120
121
|
toolPolicy: SessionToolPolicy;
|
|
121
122
|
clientEventId?: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Settings } from "@opengeni/config";
|
|
2
|
+
import { pinnedFetch } from "@opengeni/network";
|
|
3
|
+
export type PublicSkillSearchInput = Readonly<{
|
|
4
|
+
query: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
owner?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type PublicSkillSearchResult = Readonly<{
|
|
9
|
+
provider: "skills_sh";
|
|
10
|
+
query: string;
|
|
11
|
+
items: readonly Readonly<{
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
source: string;
|
|
15
|
+
skillId: string;
|
|
16
|
+
url: string;
|
|
17
|
+
installs: number;
|
|
18
|
+
}>[];
|
|
19
|
+
nextCursor: null;
|
|
20
|
+
}>;
|
|
21
|
+
export type PublicSkillSearchClient = Readonly<{
|
|
22
|
+
search(input: PublicSkillSearchInput): Promise<PublicSkillSearchResult>;
|
|
23
|
+
}>;
|
|
24
|
+
export type PublicSkillSearchErrorCode = "invalid_query" | "rate_limited" | "timeout" | "unavailable" | "invalid_response";
|
|
25
|
+
export declare class PublicSkillSearchError extends Error {
|
|
26
|
+
readonly code: PublicSkillSearchErrorCode;
|
|
27
|
+
readonly retryAfterSeconds: number | null;
|
|
28
|
+
constructor(code: PublicSkillSearchErrorCode, message: string, retryAfterSeconds?: number | null);
|
|
29
|
+
}
|
|
30
|
+
export declare function createPublicSkillSearchClient(settings: Settings, fetcher?: typeof pinnedFetch): PublicSkillSearchClient;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { SkillFile, SkillInstallInput, SkillRevisionInput, SkillSaveInput } from "@opengeni/contracts";
|
|
2
|
+
import { listSkillRecords, type Database, type SkillReadContext } from "@opengeni/db";
|
|
3
|
+
export { replayPortableSkillInstall } from "@opengeni/db";
|
|
4
|
+
/** Canonical text-only folder; rejects invalid Unicode before PostgreSQL conversion. */
|
|
5
|
+
export declare function validateSkillFiles(files: readonly SkillFile[]): SkillFile[];
|
|
6
|
+
/** Separate from the historical SKILL.md hash, which must never be rewritten. */
|
|
7
|
+
export declare function skillBundleHash(files: readonly SkillFile[]): string;
|
|
8
|
+
export declare const listSkills: typeof listSkillRecords;
|
|
9
|
+
export declare function readSkill(db: Database, context: SkillReadContext, skillId: string, revisionId?: string): Promise<import("@opengeni/contracts").SkillRecord | null>;
|
|
10
|
+
export declare function saveSkill(db: Database, input: SkillSaveInput): Promise<{
|
|
11
|
+
operationId: string;
|
|
12
|
+
skillId: string;
|
|
13
|
+
revisionId: string;
|
|
14
|
+
outcome: "applied" | "pending" | "preserved";
|
|
15
|
+
decision?: "rejected" | undefined;
|
|
16
|
+
pendingReason?: "approval" | "source_finalization" | undefined;
|
|
17
|
+
skillReview?: {
|
|
18
|
+
sourceOperationId: string;
|
|
19
|
+
skillId: string;
|
|
20
|
+
revisionId: string;
|
|
21
|
+
expectedRevisionId: string | null;
|
|
22
|
+
expectedScopeVersion: number;
|
|
23
|
+
} | undefined;
|
|
24
|
+
replayed: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function installSkill(db: Database, input: SkillInstallInput): Promise<{
|
|
27
|
+
operationId: string;
|
|
28
|
+
skillId: string;
|
|
29
|
+
revisionId: string;
|
|
30
|
+
outcome: "applied" | "pending" | "preserved";
|
|
31
|
+
decision?: "rejected" | undefined;
|
|
32
|
+
pendingReason?: "approval" | "source_finalization" | undefined;
|
|
33
|
+
skillReview?: {
|
|
34
|
+
sourceOperationId: string;
|
|
35
|
+
skillId: string;
|
|
36
|
+
revisionId: string;
|
|
37
|
+
expectedRevisionId: string | null;
|
|
38
|
+
expectedScopeVersion: number;
|
|
39
|
+
} | undefined;
|
|
40
|
+
replayed: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
export declare function approveSkill(db: Database, input: SkillRevisionInput): Promise<{
|
|
43
|
+
operationId: string;
|
|
44
|
+
skillId: string;
|
|
45
|
+
revisionId: string;
|
|
46
|
+
outcome: "applied" | "pending" | "preserved";
|
|
47
|
+
decision?: "rejected" | undefined;
|
|
48
|
+
pendingReason?: "approval" | "source_finalization" | undefined;
|
|
49
|
+
skillReview?: {
|
|
50
|
+
sourceOperationId: string;
|
|
51
|
+
skillId: string;
|
|
52
|
+
revisionId: string;
|
|
53
|
+
expectedRevisionId: string | null;
|
|
54
|
+
expectedScopeVersion: number;
|
|
55
|
+
} | undefined;
|
|
56
|
+
replayed: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
export declare function restoreSkill(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
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./domain/skills.js";
|
|
1
2
|
export * from "./dependencies.js";
|
|
2
3
|
export * from "./workflow-wake-contract.js";
|
|
3
4
|
export * from "./sandbox-types.js";
|
|
@@ -14,6 +15,8 @@ export * from "./billing/limits.js";
|
|
|
14
15
|
export * from "./domain/capabilities.js";
|
|
15
16
|
export * from "./domain/host-mcp-authority-source-admission.js";
|
|
16
17
|
export * from "./domain/skill-imports.js";
|
|
18
|
+
export * from "./domain/skill-search.js";
|
|
19
|
+
export * from "./domain/github-skill-source.js";
|
|
17
20
|
export * from "./domain/environments.js";
|
|
18
21
|
export * from "./rigs/index.js";
|
|
19
22
|
export * from "./domain/packs.js";
|