@inneranimalmedia/primetech-procedures 0.0.0-stage → 2.6.18
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/.codex-plugin/plugin.json +39 -0
- package/LICENSE +110 -0
- package/README.md +181 -2
- package/agents/openai.yaml +6 -0
- package/agentsam.package.json +80 -0
- package/assets/architect-icon.svg +10 -0
- package/assets/primetech-design-studio.svg +7 -0
- package/companion.json +40 -0
- package/package.json +56 -4
- package/plugin.README.md +37 -0
- package/plugin.json +43 -0
- package/procedures/arch.assembly.calculate/procedure.json +83 -0
- package/procedures/cad.motor-bearing-end-plate/README.md +21 -0
- package/procedures/cad.motor-bearing-end-plate/build_freecad.py +514 -0
- package/procedures/cad.motor-bearing-end-plate/finalize_bundle.py +26 -0
- package/procedures/cad.motor-bearing-end-plate/generate_assets.py +284 -0
- package/procedures/cad.motor-bearing-end-plate/generate_toolpaths.py +715 -0
- package/procedures/cad.motor-bearing-end-plate/package_artifacts.py +154 -0
- package/procedures/cad.motor-bearing-end-plate/parameters.json +51 -0
- package/procedures/cad.motor-bearing-end-plate/procedure.json +101 -0
- package/procedures/cad.motor-bearing-end-plate/render_preview.py +98 -0
- package/procedures/cad.motor-bearing-end-plate/run.py +214 -0
- package/procedures/cad.motor-bearing-end-plate/test_generate_toolpaths.py +50 -0
- package/procedures/media.asset.preflight/procedure.json +85 -0
- package/procedures/media.image.optimize-asset/procedure.json +102 -0
- package/procedures/primetech.assets.package/procedure.json +63 -0
- package/procedures/primetech.design-system.package/procedure.json +58 -0
- package/procedures/primetech.ebook.package/procedure.json +53 -0
- package/procedures/primetech.icon-family.build/procedure.json +101 -0
- package/procedures/primetech.production-board.manage/procedure.json +156 -0
- package/procedures/primetech.sprite-atlas.build/procedure.json +86 -0
- package/procedures/primetech.typeface.package/procedure.json +61 -0
- package/procedures/primetech.visuals.compare/procedure.json +74 -0
- package/procedures/repo.asset.inventory/procedure.json +65 -0
- package/procedures/repo.asset.inventory/run.py +116 -0
- package/procedures/repo.asset.inventory/run.sh +11 -0
- package/procedures/repo.git.status/procedure.json +58 -0
- package/procedures/repo.git.status/run.sh +10 -0
- package/profiles/PRIMETECH_PROCEDURE_ENGINEER.md +25 -0
- package/scripts/generate-procedures.py +112 -0
- package/scripts/generate-skills.py +425 -0
- package/scripts/package-openai-plugin.py +94 -0
- package/skills/primetech-brand-kit/SKILL.md +40 -0
- package/skills/primetech-brand-kit/agentsam.skill.json +64 -0
- package/skills/primetech-character-sprites/SKILL.md +40 -0
- package/skills/primetech-character-sprites/agentsam.skill.json +64 -0
- package/skills/primetech-creative-delivery/SKILL.md +39 -0
- package/skills/primetech-creative-delivery/agentsam.skill.json +57 -0
- package/skills/primetech-design-systems/SKILL.md +43 -0
- package/skills/primetech-design-systems/agentsam.skill.json +57 -0
- package/skills/primetech-digital-publishing/SKILL.md +39 -0
- package/skills/primetech-digital-publishing/agentsam.skill.json +52 -0
- package/skills/primetech-iconography/SKILL.md +40 -0
- package/skills/primetech-iconography/agentsam.skill.json +53 -0
- package/skills/primetech-type-design/SKILL.md +40 -0
- package/skills/primetech-type-design/agentsam.skill.json +53 -0
- package/skills/primetech-ui-ux-prototypes/SKILL.md +43 -0
- package/skills/primetech-ui-ux-prototypes/agentsam.skill.json +64 -0
- package/skills/primetech-visual-qa/SKILL.md +39 -0
- package/skills/primetech-visual-qa/agentsam.skill.json +56 -0
- package/src/creative/asset-package.js +42 -0
- package/src/creative/design-system.js +107 -0
- package/src/creative/ebook.js +88 -0
- package/src/creative/icon-family.js +125 -0
- package/src/creative/index.d.ts +157 -0
- package/src/creative/index.js +7 -0
- package/src/creative/paths.js +64 -0
- package/src/creative/sprite-atlas.js +100 -0
- package/src/creative/typeface.js +154 -0
- package/src/creative/visual-qa.js +88 -0
- package/src/index.d.ts +160 -0
- package/src/index.js +656 -0
- package/src/production-board.d.ts +103 -0
- package/src/production-board.js +181 -0
- package/src/skills.d.ts +48 -0
- package/src/skills.js +101 -0
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/** Public TypeScript API for @inneranimalmedia/primetech-procedures. */
|
|
2
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
3
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
4
|
+
export interface JsonObject { [key: string]: JsonValue | undefined; }
|
|
5
|
+
|
|
6
|
+
export interface JsonSchemaDefinition {
|
|
7
|
+
type?: string | string[];
|
|
8
|
+
properties?: Record<string, JsonSchemaDefinition>;
|
|
9
|
+
required?: string[];
|
|
10
|
+
items?: JsonSchemaDefinition;
|
|
11
|
+
additionalProperties?: boolean;
|
|
12
|
+
enum?: JsonValue[];
|
|
13
|
+
const?: JsonValue;
|
|
14
|
+
minimum?: number;
|
|
15
|
+
maximum?: number;
|
|
16
|
+
minLength?: number;
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
minItems?: number;
|
|
19
|
+
maxItems?: number;
|
|
20
|
+
uniqueItems?: boolean;
|
|
21
|
+
pattern?: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type ProcedureEffect = 'read' | 'local_write' | 'project_write' | 'export' | 'external_action';
|
|
26
|
+
export type ProcedureVerificationKind = 'output_schema' | 'fixture_suite' | 'native_validation';
|
|
27
|
+
export type ProcedureRuntimeKind = 'python' | 'bash' | 'sam_operation' | 'native_tool';
|
|
28
|
+
export type ProcedureRuntime =
|
|
29
|
+
| { kind: 'python'; entrypoint: string; min_python: string; dependencies?: string[]; interpreter_candidates?: string[] }
|
|
30
|
+
| { kind: 'bash'; entrypoint: string }
|
|
31
|
+
| { kind: 'sam_operation'; operation: string }
|
|
32
|
+
| { kind: 'native_tool'; tool_key: string };
|
|
33
|
+
|
|
34
|
+
export interface ProcedureManifest {
|
|
35
|
+
schema: 'inneranimalmedia.primetech.procedure.v1';
|
|
36
|
+
id: string;
|
|
37
|
+
version: string;
|
|
38
|
+
summary: string;
|
|
39
|
+
effect: ProcedureEffect;
|
|
40
|
+
capabilities: string[];
|
|
41
|
+
runtime: ProcedureRuntime;
|
|
42
|
+
input_schema: JsonSchemaDefinition;
|
|
43
|
+
output_schema: JsonSchemaDefinition;
|
|
44
|
+
verification: { kind: ProcedureVerificationKind; expected?: JsonValue; fixture_id?: string };
|
|
45
|
+
flags: { network: boolean; physical_hardware: boolean; requires_operator_review: boolean };
|
|
46
|
+
}
|
|
47
|
+
export interface ProcedureValidationIssue { path: string; code: string; expected?: unknown; }
|
|
48
|
+
export interface ProcedureValidationResult { ok: boolean; errors: ProcedureValidationIssue[]; }
|
|
49
|
+
export type ProcedureCatalogEntry =
|
|
50
|
+
| { id: string; version: string; summary: string; effect: ProcedureEffect; available: true }
|
|
51
|
+
| { id: string; available: false; error: string };
|
|
52
|
+
export interface LoadedProcedure {
|
|
53
|
+
manifest: ProcedureManifest;
|
|
54
|
+
manifestPath: string;
|
|
55
|
+
procedureDir: string;
|
|
56
|
+
entrypointPath: string | null;
|
|
57
|
+
manifestSha256: string;
|
|
58
|
+
entrypointSha256: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface ProcedureCatalog {
|
|
61
|
+
readonly root: string;
|
|
62
|
+
list(): ProcedureCatalogEntry[];
|
|
63
|
+
get(id: string, version?: string): LoadedProcedure;
|
|
64
|
+
}
|
|
65
|
+
export interface ProcedurePerformanceRow {
|
|
66
|
+
id: string;
|
|
67
|
+
version: string;
|
|
68
|
+
run_count: number;
|
|
69
|
+
completed: number;
|
|
70
|
+
failed: number;
|
|
71
|
+
success_rate: number;
|
|
72
|
+
mean_duration_ms: number | null;
|
|
73
|
+
p50_duration_ms: number | null;
|
|
74
|
+
p95_duration_ms: number | null;
|
|
75
|
+
last_run_at: string | null;
|
|
76
|
+
failures: Array<{ code: string; count: number }>;
|
|
77
|
+
}
|
|
78
|
+
export interface ProcedurePerformanceSummary {
|
|
79
|
+
schema: 'inneranimalmedia.primetech.procedure-performance.v1';
|
|
80
|
+
scanned: number;
|
|
81
|
+
ignored: number;
|
|
82
|
+
by_procedure: ProcedurePerformanceRow[];
|
|
83
|
+
}
|
|
84
|
+
export interface ProcedureInvocation { id: string; version: string; input: Record<string, unknown>; }
|
|
85
|
+
export interface ProcedureAuthorizationRequest {
|
|
86
|
+
id: string;
|
|
87
|
+
version: string;
|
|
88
|
+
effect: ProcedureEffect;
|
|
89
|
+
network: boolean;
|
|
90
|
+
requires_operator_review: boolean;
|
|
91
|
+
input_sha256: string;
|
|
92
|
+
}
|
|
93
|
+
export interface SamOperationResult {
|
|
94
|
+
ok: boolean;
|
|
95
|
+
data?: unknown;
|
|
96
|
+
receipt?: Record<string, unknown>;
|
|
97
|
+
error?: string | { code?: string; message?: string };
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
}
|
|
100
|
+
export type SamOperationInvoker = (operation: string, input: Record<string, unknown>) => SamOperationResult | Promise<SamOperationResult>;
|
|
101
|
+
export type NativeToolInvoker = (toolKey: string, input: Record<string, unknown>) => SamOperationResult | Promise<SamOperationResult>;
|
|
102
|
+
export interface ProcedureVerificationContext {
|
|
103
|
+
manifest: ProcedureManifest;
|
|
104
|
+
projectRoot: string;
|
|
105
|
+
input: Record<string, unknown>;
|
|
106
|
+
output: Record<string, unknown>;
|
|
107
|
+
execution: { operation: string | null; source_receipt: Record<string, unknown> | null };
|
|
108
|
+
}
|
|
109
|
+
export interface ProcedureVerificationResult { kind: ProcedureVerificationKind; ok: boolean; evidence?: unknown; }
|
|
110
|
+
export interface PrimeTechProcedureHandlerOptions {
|
|
111
|
+
catalog?: ProcedureCatalog;
|
|
112
|
+
projectRoot?: string;
|
|
113
|
+
receiptDir?: string | null;
|
|
114
|
+
invokeSamOperation?: SamOperationInvoker;
|
|
115
|
+
invokeNativeTool?: NativeToolInvoker | null;
|
|
116
|
+
isCapabilityAvailable?: (capability: string) => boolean | Promise<boolean>;
|
|
117
|
+
isNativeToolAvailable?: (toolKey: string) => boolean | Promise<boolean>;
|
|
118
|
+
verifyProcedureOutput?: (context: ProcedureVerificationContext) => ProcedureVerificationResult | Promise<ProcedureVerificationResult>;
|
|
119
|
+
authorizeProcedure?: (request: ProcedureAuthorizationRequest) => boolean | Promise<boolean>;
|
|
120
|
+
now?: () => number;
|
|
121
|
+
}
|
|
122
|
+
export interface ProcedureRunResult {
|
|
123
|
+
schema: 'inneranimalmedia.primetech.procedure-run.v1';
|
|
124
|
+
id: string;
|
|
125
|
+
version: string;
|
|
126
|
+
status: 'completed';
|
|
127
|
+
effect: ProcedureEffect;
|
|
128
|
+
output: Record<string, unknown>;
|
|
129
|
+
artifact: { ref: string; sha256: string | null; bytes: number } | null;
|
|
130
|
+
verification: { kind: ProcedureVerificationKind; ok: true; evidence?: unknown };
|
|
131
|
+
execution: {
|
|
132
|
+
operation: string | null;
|
|
133
|
+
runtime_kind: ProcedureRuntimeKind;
|
|
134
|
+
execution_id: string | null;
|
|
135
|
+
source_receipt_id: string | null;
|
|
136
|
+
script_sha256: string | null;
|
|
137
|
+
status: string;
|
|
138
|
+
exit_code: number | null;
|
|
139
|
+
duration_ms: number | null;
|
|
140
|
+
script_bytes: number | null;
|
|
141
|
+
};
|
|
142
|
+
receipt: { id: string; written: boolean; [key: string]: unknown };
|
|
143
|
+
duration_ms: number;
|
|
144
|
+
warnings?: Array<{ code: string; message: string }>;
|
|
145
|
+
}
|
|
146
|
+
export type PrimeTechProcedureHandler = (input?: ProcedureInvocation) => Promise<ProcedureRunResult>;
|
|
147
|
+
export class PrimetechProcedureError extends Error {
|
|
148
|
+
constructor(code: string, message?: string, details?: unknown);
|
|
149
|
+
code: string;
|
|
150
|
+
details?: unknown;
|
|
151
|
+
}
|
|
152
|
+
export const DEFAULT_CATALOG_ROOT: string;
|
|
153
|
+
export function validateProcedureManifest(manifest: unknown): ProcedureValidationResult;
|
|
154
|
+
export function createProcedureCatalog(options?: { root?: string }): ProcedureCatalog;
|
|
155
|
+
export function summarizeProcedureRuns(options: { receiptDir: string; procedureId?: string | null; limit?: number }): ProcedurePerformanceSummary;
|
|
156
|
+
export function createPrimeTechProcedureHandler(options?: PrimeTechProcedureHandlerOptions): PrimeTechProcedureHandler;
|
|
157
|
+
|
|
158
|
+
export * from './creative/index.js';
|
|
159
|
+
export * from './production-board.js';
|
|
160
|
+
export * from './skills.js';
|