@openagentpack/sdk 0.6.0 → 0.7.1
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/README.md +17 -0
- package/dist/chunk-56BB46YT.js +1191 -0
- package/dist/chunk-HIK5DY4I.js +2429 -0
- package/dist/chunk-ZBJDMUJT.js +6989 -0
- package/dist/directory-nY2Slsfi.d.ts +98 -0
- package/dist/{session-event-B63Rbjim.d.ts → dto-BT1Q1Ii6.d.ts} +1 -50
- package/dist/errors-BcVE1wZB.d.ts +5 -0
- package/dist/index.d.ts +7 -1128
- package/dist/index.js +249 -9534
- package/dist/project-versions.d.ts +105 -0
- package/dist/project-versions.js +35 -0
- package/dist/project-workspace.d.ts +150 -0
- package/dist/project-workspace.js +1774 -0
- package/dist/resource-runtime-DZDY45_Q.d.ts +1126 -0
- package/dist/session-event-DB_YlDiK.d.ts +52 -0
- package/dist/session-events.d.ts +2 -1
- package/package.json +13 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { U as UserError } from './errors-BcVE1wZB.js';
|
|
2
|
+
import { D as Diagnostic } from './dto-BT1Q1Ii6.js';
|
|
3
|
+
export { D as DirectoryProjectMutationConflictError, a as DirectoryProjectSnapshot, b as DirectoryProjectVersion, c as DirectoryProjectVersionAdapter, d as DirectoryProjectVersionPreview, e as DirectoryProjectVersionService, f as DirectoryProjectVersionStatus, g as DirectorySnapshotFile, h as DirectoryVersionFileChange, P as PreparedDirectoryProjectVersion, i as createDirectoryProjectVersionService } from './directory-nY2Slsfi.js';
|
|
4
|
+
import 'zod';
|
|
5
|
+
|
|
6
|
+
type ProjectVersionErrorCode = "store_missing" | "store_blocked" | "stale_snapshot" | "invalid_version" | "invalid_source" | "storage_failed";
|
|
7
|
+
declare class ProjectVersionError extends UserError {
|
|
8
|
+
readonly code: ProjectVersionErrorCode;
|
|
9
|
+
constructor(message: string, code?: ProjectVersionErrorCode);
|
|
10
|
+
}
|
|
11
|
+
type ProjectSourceStatus = "clean" | "modified" | "unversioned";
|
|
12
|
+
interface ProjectVersionStatus {
|
|
13
|
+
initialized: boolean;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
store_root: string;
|
|
16
|
+
config_path: string;
|
|
17
|
+
head_version: string | null;
|
|
18
|
+
source_status: ProjectSourceStatus;
|
|
19
|
+
source_versioned: boolean;
|
|
20
|
+
write_blockers: string[];
|
|
21
|
+
restore_blockers: string[];
|
|
22
|
+
}
|
|
23
|
+
interface ProjectVersion {
|
|
24
|
+
version_id: string;
|
|
25
|
+
short_version: string;
|
|
26
|
+
parent_version: string | null;
|
|
27
|
+
source_hash: string;
|
|
28
|
+
message: string;
|
|
29
|
+
created_by: string;
|
|
30
|
+
created_at: string;
|
|
31
|
+
}
|
|
32
|
+
interface ProjectVersionsPage {
|
|
33
|
+
versions: ProjectVersion[];
|
|
34
|
+
next_cursor: string | null;
|
|
35
|
+
}
|
|
36
|
+
interface ProjectVersionPreview {
|
|
37
|
+
version_id: string;
|
|
38
|
+
base_head_version: string;
|
|
39
|
+
base_source_revision: string;
|
|
40
|
+
before_yaml: string;
|
|
41
|
+
after_yaml: string;
|
|
42
|
+
diagnostics: Diagnostic[];
|
|
43
|
+
can_restore: boolean;
|
|
44
|
+
blockers: string[];
|
|
45
|
+
}
|
|
46
|
+
interface PreparedProjectVersion {
|
|
47
|
+
configPath: string;
|
|
48
|
+
storeRoot: string;
|
|
49
|
+
baseHeadVersion: string;
|
|
50
|
+
source: string;
|
|
51
|
+
sourceRevision: string;
|
|
52
|
+
needsVersion: boolean;
|
|
53
|
+
leaseToken: string;
|
|
54
|
+
}
|
|
55
|
+
declare function readProjectVersionSource(configFile: string): Promise<{
|
|
56
|
+
configPath: string;
|
|
57
|
+
source: string;
|
|
58
|
+
}>;
|
|
59
|
+
declare function getProjectVersionStatus(configFile: string): Promise<ProjectVersionStatus>;
|
|
60
|
+
declare function enableProjectVersioning(configFile: string, message?: string): Promise<{
|
|
61
|
+
version: ProjectVersion | null;
|
|
62
|
+
versioning: ProjectVersionStatus;
|
|
63
|
+
}>;
|
|
64
|
+
declare function disableProjectVersioning(configFile: string): Promise<ProjectVersionStatus>;
|
|
65
|
+
declare function listProjectVersions(configFile: string, input?: {
|
|
66
|
+
cursor?: string;
|
|
67
|
+
limit?: number;
|
|
68
|
+
}): Promise<ProjectVersionsPage>;
|
|
69
|
+
declare function previewProjectVersion(configFile: string, versionId: string): Promise<ProjectVersionPreview>;
|
|
70
|
+
declare function restoreProjectVersion(configFile: string, versionId: string, base: {
|
|
71
|
+
headVersion: string;
|
|
72
|
+
sourceRevision: string;
|
|
73
|
+
}): Promise<ProjectVersionPreview>;
|
|
74
|
+
declare function prepareProjectVersion(configFile: string, expectedSource: string): Promise<PreparedProjectVersion | null>;
|
|
75
|
+
declare function commitPreparedProjectVersion(prepared: PreparedProjectVersion, message?: string): Promise<ProjectVersion | null>;
|
|
76
|
+
declare function releasePreparedProjectVersion(prepared: PreparedProjectVersion | null): Promise<void>;
|
|
77
|
+
interface ProjectVersionService {
|
|
78
|
+
readSource(): Promise<{
|
|
79
|
+
configPath: string;
|
|
80
|
+
source: string;
|
|
81
|
+
}>;
|
|
82
|
+
status(): Promise<ProjectVersionStatus>;
|
|
83
|
+
enable(message?: string): Promise<{
|
|
84
|
+
version: ProjectVersion | null;
|
|
85
|
+
versioning: ProjectVersionStatus;
|
|
86
|
+
}>;
|
|
87
|
+
disable(): Promise<ProjectVersionStatus>;
|
|
88
|
+
listVersions(input?: {
|
|
89
|
+
cursor?: string;
|
|
90
|
+
limit?: number;
|
|
91
|
+
}): Promise<ProjectVersionsPage>;
|
|
92
|
+
previewVersion(versionId: string): Promise<ProjectVersionPreview>;
|
|
93
|
+
restoreVersion(versionId: string, base: {
|
|
94
|
+
headVersion: string;
|
|
95
|
+
sourceRevision: string;
|
|
96
|
+
}): Promise<ProjectVersionPreview>;
|
|
97
|
+
prepareVersion(expectedSource: string): Promise<PreparedProjectVersion | null>;
|
|
98
|
+
commitPrepared(prepared: PreparedProjectVersion, message?: string): Promise<ProjectVersion | null>;
|
|
99
|
+
releasePrepared(prepared: PreparedProjectVersion | null): Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
declare function createProjectVersionService(input: {
|
|
102
|
+
configPath: string;
|
|
103
|
+
}): ProjectVersionService;
|
|
104
|
+
|
|
105
|
+
export { type PreparedProjectVersion, type ProjectSourceStatus, type ProjectVersion, ProjectVersionError, type ProjectVersionErrorCode, type ProjectVersionPreview, type ProjectVersionService, type ProjectVersionStatus, type ProjectVersionsPage, commitPreparedProjectVersion, createProjectVersionService, disableProjectVersioning, enableProjectVersioning, getProjectVersionStatus, listProjectVersions, prepareProjectVersion, previewProjectVersion, readProjectVersionSource, releasePreparedProjectVersion, restoreProjectVersion };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DirectoryProjectMutationConflictError,
|
|
3
|
+
ProjectVersionError,
|
|
4
|
+
commitPreparedProjectVersion,
|
|
5
|
+
createDirectoryProjectVersionService,
|
|
6
|
+
createProjectVersionService,
|
|
7
|
+
disableProjectVersioning,
|
|
8
|
+
enableProjectVersioning,
|
|
9
|
+
getProjectVersionStatus,
|
|
10
|
+
listProjectVersions,
|
|
11
|
+
prepareProjectVersion,
|
|
12
|
+
previewProjectVersion,
|
|
13
|
+
readProjectVersionSource,
|
|
14
|
+
releasePreparedProjectVersion,
|
|
15
|
+
restoreProjectVersion
|
|
16
|
+
} from "./chunk-56BB46YT.js";
|
|
17
|
+
import "./chunk-ZBJDMUJT.js";
|
|
18
|
+
import "./chunk-6PDVAFLK.js";
|
|
19
|
+
import "./chunk-CHGDM6TX.js";
|
|
20
|
+
export {
|
|
21
|
+
DirectoryProjectMutationConflictError,
|
|
22
|
+
ProjectVersionError,
|
|
23
|
+
commitPreparedProjectVersion,
|
|
24
|
+
createDirectoryProjectVersionService,
|
|
25
|
+
createProjectVersionService,
|
|
26
|
+
disableProjectVersioning,
|
|
27
|
+
enableProjectVersioning,
|
|
28
|
+
getProjectVersionStatus,
|
|
29
|
+
listProjectVersions,
|
|
30
|
+
prepareProjectVersion,
|
|
31
|
+
previewProjectVersion,
|
|
32
|
+
readProjectVersionSource,
|
|
33
|
+
releasePreparedProjectVersion,
|
|
34
|
+
restoreProjectVersion
|
|
35
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { aj as LoadedProjectConfig, a0 as ResourcePlanResult, as as ResourceSyncRun, y as RuntimeFeedbackSink } from './resource-runtime-DZDY45_Q.js';
|
|
2
|
+
import { U as UserError } from './errors-BcVE1wZB.js';
|
|
3
|
+
import { D as Diagnostic, P as PlannedAction } from './dto-BT1Q1Ii6.js';
|
|
4
|
+
import { e as DirectoryProjectVersionService } from './directory-nY2Slsfi.js';
|
|
5
|
+
import './file-Cj5-Vx27.js';
|
|
6
|
+
import './session-event-DB_YlDiK.js';
|
|
7
|
+
import 'zod';
|
|
8
|
+
|
|
9
|
+
declare const PROJECT_METADATA_FILE = "project.json";
|
|
10
|
+
declare const PROJECT_INTERNAL_DIRECTORY = ".openagentpack";
|
|
11
|
+
declare const PROJECT_BUILD_FILE = ".openagentpack/build/agents.yaml";
|
|
12
|
+
declare const PROJECT_BUILD_MANIFEST = ".openagentpack/build/manifest.json";
|
|
13
|
+
declare const PROJECT_STATE_FILE = ".openagentpack/state.json";
|
|
14
|
+
declare const FILE_AUTO_ASSOCIATION_IGNORE_FILE = ".openagentpack-ignore";
|
|
15
|
+
declare const DIRECTORY_RESOURCE_TYPES: readonly ["environment", "vault", "memory_store", "file"];
|
|
16
|
+
type DirectoryResourceType = (typeof DIRECTORY_RESOURCE_TYPES)[number];
|
|
17
|
+
declare class DirectoryProjectMutationConflictError extends UserError {
|
|
18
|
+
readonly status = 409;
|
|
19
|
+
constructor(message: string);
|
|
20
|
+
}
|
|
21
|
+
interface ProjectSourceFile {
|
|
22
|
+
path: string;
|
|
23
|
+
mode: number;
|
|
24
|
+
content: Uint8Array;
|
|
25
|
+
}
|
|
26
|
+
interface ProjectOrganizationMove {
|
|
27
|
+
resource_type: "skill" | DirectoryResourceType;
|
|
28
|
+
resource_id: string;
|
|
29
|
+
from: string;
|
|
30
|
+
to: string;
|
|
31
|
+
reason: "shared";
|
|
32
|
+
}
|
|
33
|
+
interface DirectoryResourceSource {
|
|
34
|
+
type: DirectoryResourceType;
|
|
35
|
+
id: string;
|
|
36
|
+
path: string;
|
|
37
|
+
directory: string;
|
|
38
|
+
relative_directory: string;
|
|
39
|
+
owner_agent?: string;
|
|
40
|
+
}
|
|
41
|
+
interface DirectoryProjectInspection {
|
|
42
|
+
project_root: string;
|
|
43
|
+
project_revision: string;
|
|
44
|
+
source_manifest_hash: string;
|
|
45
|
+
canonical_yaml: string;
|
|
46
|
+
yaml_hash: string;
|
|
47
|
+
loaded: LoadedProjectConfig | null;
|
|
48
|
+
diagnostics: Diagnostic[];
|
|
49
|
+
warnings: Diagnostic[];
|
|
50
|
+
organization_moves: ProjectOrganizationMove[];
|
|
51
|
+
source_files: ProjectSourceFile[];
|
|
52
|
+
}
|
|
53
|
+
interface ProjectBuildManifest {
|
|
54
|
+
schema_version: 1;
|
|
55
|
+
project_revision: string;
|
|
56
|
+
source_manifest_hash: string;
|
|
57
|
+
yaml_hash: string;
|
|
58
|
+
built_at: string;
|
|
59
|
+
}
|
|
60
|
+
interface ProjectBuildStatus {
|
|
61
|
+
exists: boolean;
|
|
62
|
+
stale: boolean;
|
|
63
|
+
manifest: ProjectBuildManifest | null;
|
|
64
|
+
reasons: string[];
|
|
65
|
+
}
|
|
66
|
+
interface ProjectBuildPreview extends DirectoryProjectInspection {
|
|
67
|
+
before_yaml: string;
|
|
68
|
+
after_yaml: string;
|
|
69
|
+
build_status: ProjectBuildStatus;
|
|
70
|
+
can_build: boolean;
|
|
71
|
+
}
|
|
72
|
+
interface InitializedDirectoryProject {
|
|
73
|
+
project_root: string;
|
|
74
|
+
converted_from_yaml: boolean;
|
|
75
|
+
state_migrated: boolean;
|
|
76
|
+
baseline_version: string | null;
|
|
77
|
+
}
|
|
78
|
+
interface ProjectPublishPlan {
|
|
79
|
+
project_root: string;
|
|
80
|
+
project_revision: string;
|
|
81
|
+
build_manifest: ProjectBuildManifest;
|
|
82
|
+
build_path: string;
|
|
83
|
+
plan_fingerprint: string;
|
|
84
|
+
planned: ResourcePlanResult;
|
|
85
|
+
}
|
|
86
|
+
interface ProjectPublishResult {
|
|
87
|
+
planned: ResourcePlanResult;
|
|
88
|
+
execution: ResourceSyncRun["execution"];
|
|
89
|
+
version: {
|
|
90
|
+
version_id: string;
|
|
91
|
+
short_version: string;
|
|
92
|
+
message: string;
|
|
93
|
+
} | null;
|
|
94
|
+
published_revision: string;
|
|
95
|
+
working_revision: string;
|
|
96
|
+
working_tree_changed: boolean;
|
|
97
|
+
}
|
|
98
|
+
interface DirectoryProjectMutationLease {
|
|
99
|
+
release(): Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
type ProjectBuildResolver = (buildPath: string, options?: {
|
|
102
|
+
environment?: Record<string, string>;
|
|
103
|
+
}) => Promise<LoadedProjectConfig>;
|
|
104
|
+
declare function resolveDirectoryProjectRoot(input?: string): Promise<string>;
|
|
105
|
+
declare function inspectDirectoryProject(projectDirectory?: string): Promise<DirectoryProjectInspection>;
|
|
106
|
+
declare function validateDirectoryProject(projectDirectory?: string): Promise<DirectoryProjectInspection>;
|
|
107
|
+
declare function resolveDirectoryProjectRuntime(projectDirectory?: string): Promise<LoadedProjectConfig>;
|
|
108
|
+
declare function getProjectBuildStatus(projectDirectory: string, inspection?: DirectoryProjectInspection): Promise<ProjectBuildStatus>;
|
|
109
|
+
declare function previewProjectBuild(projectDirectory?: string): Promise<ProjectBuildPreview>;
|
|
110
|
+
declare function commitProjectBuild(input: {
|
|
111
|
+
projectRoot: string;
|
|
112
|
+
baseRevision: string;
|
|
113
|
+
}): Promise<ProjectBuildPreview & {
|
|
114
|
+
manifest: ProjectBuildManifest;
|
|
115
|
+
}>;
|
|
116
|
+
declare function readValidProjectBuild(projectDirectory?: string): Promise<{
|
|
117
|
+
inspection: DirectoryProjectInspection;
|
|
118
|
+
manifest: ProjectBuildManifest;
|
|
119
|
+
buildPath: string;
|
|
120
|
+
yaml: string;
|
|
121
|
+
}>;
|
|
122
|
+
declare function planProjectPublish(projectDirectory?: string, options?: {
|
|
123
|
+
provider?: string;
|
|
124
|
+
refresh?: boolean;
|
|
125
|
+
quiet?: boolean;
|
|
126
|
+
onFeedback?: RuntimeFeedbackSink;
|
|
127
|
+
resolveBuild?: ProjectBuildResolver;
|
|
128
|
+
}): Promise<ProjectPublishPlan>;
|
|
129
|
+
declare function executeProjectPublish(input: {
|
|
130
|
+
projectRoot: string;
|
|
131
|
+
expectedProjectRevision: string;
|
|
132
|
+
expectedYamlHash: string;
|
|
133
|
+
expectedPlanFingerprint: string;
|
|
134
|
+
provider?: string;
|
|
135
|
+
refresh?: boolean;
|
|
136
|
+
concurrency?: number;
|
|
137
|
+
policy?: "block" | "prompt" | "force";
|
|
138
|
+
confirm?: (actions: PlannedAction[]) => boolean | Promise<boolean>;
|
|
139
|
+
onFeedback?: RuntimeFeedbackSink;
|
|
140
|
+
resolveBuild?: ProjectBuildResolver;
|
|
141
|
+
}): Promise<ProjectPublishResult>;
|
|
142
|
+
declare function initializeDirectoryProject(input?: {
|
|
143
|
+
projectRoot?: string;
|
|
144
|
+
}): Promise<InitializedDirectoryProject>;
|
|
145
|
+
declare function createDirectoryWorkspaceVersionService(projectDirectory: string): DirectoryProjectVersionService;
|
|
146
|
+
declare function assertLegacyYamlNotShadowed(configFile: string): Promise<void>;
|
|
147
|
+
declare function locateDirectoryProjectResource(projectDirectory: string, type: DirectoryResourceType, id: string): Promise<DirectoryResourceSource | null>;
|
|
148
|
+
declare function acquireDirectoryProjectMutation(projectDirectory: string, kind: string): Promise<DirectoryProjectMutationLease>;
|
|
149
|
+
|
|
150
|
+
export { DIRECTORY_RESOURCE_TYPES, type DirectoryProjectInspection, DirectoryProjectMutationConflictError, type DirectoryProjectMutationLease, type DirectoryResourceSource, type DirectoryResourceType, FILE_AUTO_ASSOCIATION_IGNORE_FILE, type InitializedDirectoryProject, PROJECT_BUILD_FILE, PROJECT_BUILD_MANIFEST, PROJECT_INTERNAL_DIRECTORY, PROJECT_METADATA_FILE, PROJECT_STATE_FILE, type ProjectBuildManifest, type ProjectBuildPreview, type ProjectBuildResolver, type ProjectBuildStatus, type ProjectOrganizationMove, type ProjectPublishPlan, type ProjectPublishResult, type ProjectSourceFile, acquireDirectoryProjectMutation, assertLegacyYamlNotShadowed, commitProjectBuild, createDirectoryWorkspaceVersionService, executeProjectPublish, getProjectBuildStatus, initializeDirectoryProject, inspectDirectoryProject, locateDirectoryProjectResource, planProjectPublish, previewProjectBuild, readValidProjectBuild, resolveDirectoryProjectRoot, resolveDirectoryProjectRuntime, validateDirectoryProject };
|