@unified-product-graph/core 0.14.0 → 0.15.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/index.cjs +130 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -49
- package/dist/index.d.ts +4 -49
- package/dist/index.js +120 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
@@ -7605,6 +7615,118 @@ function getDeprecatedTypes() {
|
|
|
7605
7615
|
return deprecated;
|
|
7606
7616
|
}
|
|
7607
7617
|
var UPG_PROPERTY_MIGRATIONS = {
|
|
7618
|
+
// ── v0.15.0: Pattern D — collapse *_status shadows into the lifecycle ─────────
|
|
7619
|
+
//
|
|
7620
|
+
// 14 `*_status` enum properties whose values ARE the entity's own lifecycle
|
|
7621
|
+
// phase set (UPG-689 Pattern D, the T1.1 guardrail set). They re-encoded the
|
|
7622
|
+
// lifecycle as a property, shadowing the base-node `status` field that the
|
|
7623
|
+
// lifecycle already drives. Each property is removed and any authored value
|
|
7624
|
+
// LIFTS to `UPGBaseNode.status` (same convention as 0.9.14 kr_status). Two
|
|
7625
|
+
// diverge in vocabulary from their own lifecycle and remap on lift:
|
|
7626
|
+
// - marketing_channel.channel_status: deprecated -> sunset
|
|
7627
|
+
// - security_audit.audit_status: scheduled -> planning, in_progress -> active
|
|
7628
|
+
"0.15.0": [
|
|
7629
|
+
{
|
|
7630
|
+
kind: "lift_property_to_top_level",
|
|
7631
|
+
type: "agent_definition",
|
|
7632
|
+
from_property: "agent_status",
|
|
7633
|
+
to: "status",
|
|
7634
|
+
reason: "UPG-689 Pattern D: agent_status duplicated the agent_definition lifecycle (testing/active/disabled). Removed in 0.15.0; the authored value lifts to UPGBaseNode.status."
|
|
7635
|
+
},
|
|
7636
|
+
{
|
|
7637
|
+
kind: "lift_property_to_top_level",
|
|
7638
|
+
type: "data_pipeline",
|
|
7639
|
+
from_property: "pipeline_status",
|
|
7640
|
+
to: "status",
|
|
7641
|
+
reason: "UPG-689 Pattern D: pipeline_status duplicated the data_pipeline lifecycle (active/paused/failed/deprecated). Removed in 0.15.0; lifts to status."
|
|
7642
|
+
},
|
|
7643
|
+
{
|
|
7644
|
+
kind: "lift_property_to_top_level",
|
|
7645
|
+
type: "database_schema",
|
|
7646
|
+
from_property: "migration_status",
|
|
7647
|
+
to: "status",
|
|
7648
|
+
reason: "UPG-689 Pattern D: migration_status duplicated the database_schema lifecycle (current/pending/failed). Removed in 0.15.0; lifts to status."
|
|
7649
|
+
},
|
|
7650
|
+
{
|
|
7651
|
+
kind: "lift_property_to_top_level",
|
|
7652
|
+
type: "deployment",
|
|
7653
|
+
from_property: "deploy_status",
|
|
7654
|
+
to: "status",
|
|
7655
|
+
reason: "UPG-689 Pattern D: deploy_status duplicated the deployment lifecycle (rolling/success/failure). Removed in 0.15.0; lifts to status."
|
|
7656
|
+
},
|
|
7657
|
+
{
|
|
7658
|
+
kind: "lift_property_to_top_level",
|
|
7659
|
+
type: "external_api",
|
|
7660
|
+
from_property: "api_status",
|
|
7661
|
+
to: "status",
|
|
7662
|
+
reason: "UPG-689 Pattern D: api_status duplicated the external_api lifecycle (beta/active/deprecated/unavailable). Removed in 0.15.0; lifts to status."
|
|
7663
|
+
},
|
|
7664
|
+
{
|
|
7665
|
+
kind: "lift_property_to_top_level",
|
|
7666
|
+
type: "feature_area",
|
|
7667
|
+
from_property: "area_status",
|
|
7668
|
+
to: "status",
|
|
7669
|
+
reason: "UPG-689 Pattern D: area_status duplicated the feature_area lifecycle (planned/active/deprecated). Removed in 0.15.0; lifts to status."
|
|
7670
|
+
},
|
|
7671
|
+
{
|
|
7672
|
+
kind: "lift_property_to_top_level",
|
|
7673
|
+
type: "feature_flag",
|
|
7674
|
+
from_property: "flag_status",
|
|
7675
|
+
to: "status",
|
|
7676
|
+
reason: "UPG-689 Pattern D: flag_status duplicated the feature_flag lifecycle (off/rollout/on). Removed in 0.15.0; lifts to status."
|
|
7677
|
+
},
|
|
7678
|
+
{
|
|
7679
|
+
kind: "lift_property_to_top_level",
|
|
7680
|
+
type: "objective",
|
|
7681
|
+
from_property: "objective_status",
|
|
7682
|
+
to: "status",
|
|
7683
|
+
reason: "UPG-689 Pattern D: objective_status duplicated the objective lifecycle (active/achieved/deferred). Removed in 0.15.0; lifts to status."
|
|
7684
|
+
},
|
|
7685
|
+
{
|
|
7686
|
+
kind: "lift_property_to_top_level",
|
|
7687
|
+
type: "outcome",
|
|
7688
|
+
from_property: "outcome_status",
|
|
7689
|
+
to: "status",
|
|
7690
|
+
reason: "UPG-689 Pattern D: outcome_status duplicated the outcome lifecycle (identified/measuring/achieved/abandoned). Removed in 0.15.0; lifts to status."
|
|
7691
|
+
},
|
|
7692
|
+
{
|
|
7693
|
+
kind: "lift_property_to_top_level",
|
|
7694
|
+
type: "prototype",
|
|
7695
|
+
from_property: "test_status",
|
|
7696
|
+
to: "status",
|
|
7697
|
+
reason: "UPG-689 Pattern D: test_status duplicated the prototype lifecycle (untested/testing/passed/failed). Removed in 0.15.0; lifts to status."
|
|
7698
|
+
},
|
|
7699
|
+
{
|
|
7700
|
+
kind: "lift_property_to_top_level",
|
|
7701
|
+
type: "review_gate",
|
|
7702
|
+
from_property: "gate_status",
|
|
7703
|
+
to: "status",
|
|
7704
|
+
reason: "UPG-689 Pattern D: gate_status duplicated the review_gate lifecycle (pending/approved/rejected/bypassed). Removed in 0.15.0; lifts to status."
|
|
7705
|
+
},
|
|
7706
|
+
{
|
|
7707
|
+
kind: "lift_property_to_top_level",
|
|
7708
|
+
type: "roadmap_item",
|
|
7709
|
+
from_property: "item_status",
|
|
7710
|
+
to: "status",
|
|
7711
|
+
reason: "UPG-689 Pattern D: item_status duplicated the roadmap_item lifecycle (planned/in_progress/shipped/deferred). Removed in 0.15.0; lifts to status."
|
|
7712
|
+
},
|
|
7713
|
+
{
|
|
7714
|
+
kind: "lift_property_to_top_level",
|
|
7715
|
+
type: "marketing_channel",
|
|
7716
|
+
from_property: "channel_status",
|
|
7717
|
+
to: "status",
|
|
7718
|
+
value_map: { deprecated: "sunset" },
|
|
7719
|
+
reason: "UPG-689 Pattern D: channel_status (active/paused/deprecated) re-encoded the marketing_channel lifecycle (planning/active/paused/completed/sunset). Removed in 0.15.0; lifts to status with deprecated -> sunset."
|
|
7720
|
+
},
|
|
7721
|
+
{
|
|
7722
|
+
kind: "lift_property_to_top_level",
|
|
7723
|
+
type: "security_audit",
|
|
7724
|
+
from_property: "audit_status",
|
|
7725
|
+
to: "status",
|
|
7726
|
+
value_map: { scheduled: "planning", in_progress: "active" },
|
|
7727
|
+
reason: "UPG-689 Pattern D: audit_status (scheduled/in_progress/completed) re-encoded the security_audit lifecycle (planning/active/paused/completed/sunset). Removed in 0.15.0; lifts to status with scheduled -> planning, in_progress -> active."
|
|
7728
|
+
}
|
|
7729
|
+
],
|
|
7608
7730
|
// ── v0.14.0: Pattern E — remove deprecated/ghost properties (UPG-574) ────────
|
|
7609
7731
|
//
|
|
7610
7732
|
// Properties marked deprecated (some "Removed in 0.9.1") that were never
|
|
@@ -10130,7 +10252,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
10130
10252
|
max_execution_time_seconds: { type: "number", description: "Hard timeout for agent execution in seconds" },
|
|
10131
10253
|
allow_code_execution: { type: "boolean", description: "Whether the agent can execute generated code" },
|
|
10132
10254
|
multimodal: { type: "boolean", description: "Whether the agent can process images and other media" },
|
|
10133
|
-
agent_status: { type: "string", enum: ["active", "disabled", "testing"], description: "Operational status of this agent definition" },
|
|
10134
10255
|
version: { type: "string", description: 'Version label for this agent definition (e.g. "1.4.2")' }
|
|
10135
10256
|
},
|
|
10136
10257
|
// AgentHookProperties: Agent hook.
|
|
@@ -10831,7 +10952,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
10831
10952
|
},
|
|
10832
10953
|
// DataPipelineProperties: DataPipeline entity.
|
|
10833
10954
|
data_pipeline: {
|
|
10834
|
-
pipeline_status: { type: "string", enum: ["active", "paused", "failed", "deprecated"], description: "Operational status of the pipeline" },
|
|
10835
10955
|
schedule: { type: "string", description: "Cron or scheduling expression" },
|
|
10836
10956
|
avg_runtime: { type: "string", description: "Average wall-clock runtime per execution" },
|
|
10837
10957
|
orchestrator: { type: "string", description: 'Orchestration tool (e.g. "Airflow", "Dagster", "dbt Cloud")' },
|
|
@@ -10866,7 +10986,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
10866
10986
|
database_schema: {
|
|
10867
10987
|
db_type: { type: "string", enum: ["postgres", "mysql", "mongodb", "redis", "other"], description: "Engine" },
|
|
10868
10988
|
schema_version: { type: "string", description: "Current schema version" },
|
|
10869
|
-
migration_status: { type: "string", enum: ["current", "pending", "failed"], description: "Pending-migration status" },
|
|
10870
10989
|
owner: { type: "string", description: "Owning person or team responsible for design and migrations. Promote to a `node_owned_by_team` edge if ownership must be queryable." },
|
|
10871
10990
|
table_count: { type: "number", description: "Tables or collections in this schema. Useful for migration scope estimation.", modifier: "derived" }
|
|
10872
10991
|
},
|
|
@@ -10921,7 +11040,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
10921
11040
|
deployment: {
|
|
10922
11041
|
environment: { type: "string", enum: ["dev", "staging", "prod"], description: "Target environment" },
|
|
10923
11042
|
timestamp: { type: "string", description: "ISO timestamp" },
|
|
10924
|
-
deploy_status: { type: "string", enum: ["success", "failure", "rolling"], description: "Current status" },
|
|
10925
11043
|
sha: { type: "string", description: "Git SHA of the deployed commit" },
|
|
10926
11044
|
duration_seconds: { type: "number", description: "Wall-clock duration in seconds. Tracks deployment speed trends." },
|
|
10927
11045
|
deployer: { type: "string", description: "Triggering person or system. Promote to a `node_owned_by_person` edge if ownership must be queryable." }
|
|
@@ -11249,8 +11367,7 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
11249
11367
|
provider: { type: "string", description: "Provider" },
|
|
11250
11368
|
base_url: { type: "string", description: "Base URL" },
|
|
11251
11369
|
auth_type: { type: "string", enum: ["api_key", "oauth2", "jwt", "basic", "none"], description: "Authentication method" },
|
|
11252
|
-
rate_limits: { type: "string", description: "Rate limit description" }
|
|
11253
|
-
api_status: { type: "string", enum: ["active", "deprecated", "beta", "unavailable"], description: "Availability" }
|
|
11370
|
+
rate_limits: { type: "string", description: "Rate limit description" }
|
|
11254
11371
|
},
|
|
11255
11372
|
// FeasibilityStudyProperties: FeasibilityStudy entity.
|
|
11256
11373
|
feasibility_study: {
|
|
@@ -11284,13 +11401,11 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
11284
11401
|
feature_count: { type: "number", description: "Approximate feature count under this area. Snapshot; `feature_area_contains_feature` edges are the source of truth.", modifier: "derived" },
|
|
11285
11402
|
owner: { type: "string", description: "Area owner (handle or email). Promote to a `node_owned_by_team` edge if ownership must be queryable." },
|
|
11286
11403
|
priority: { type: "string", enum: ["urgent", "high", "medium", "low", "none"], description: "Importance to the product overall" },
|
|
11287
|
-
maturity: { type: "string", enum: ["nascent", "growing", "mature", "legacy"], description: "Maturity. `nascent` = newly-formed grouping. `mature` = established surface. `legacy` = being phased out for a successor." }
|
|
11288
|
-
area_status: { type: "string", enum: ["active", "planned", "deprecated"], description: "Status in the product structure" }
|
|
11404
|
+
maturity: { type: "string", enum: ["nascent", "growing", "mature", "legacy"], description: "Maturity. `nascent` = newly-formed grouping. `mature` = established surface. `legacy` = being phased out for a successor." }
|
|
11289
11405
|
},
|
|
11290
11406
|
// FeatureFlagProperties: Feature flag.
|
|
11291
11407
|
feature_flag: {
|
|
11292
11408
|
key: { type: "string", description: 'Required. Stable flag key used in code (e.g. "new-checkout-flow").' },
|
|
11293
|
-
flag_status: { type: "string", enum: ["on", "off", "rollout"], description: "Activation state. `on` = enabled for all. `off` = disabled for all. `rollout` = partial via targeting_rules." },
|
|
11294
11409
|
rollout_pct: { type: "number", description: "Percentage enabled (0\u2013100). Meaningful when `flag_status === 'rollout'`.", modifier: "snapshot" },
|
|
11295
11410
|
targeting_rules: { type: "string", description: "Human-readable targeting rules. Full rule evaluation happens in the flag service." },
|
|
11296
11411
|
owner: { type: "string", description: "Owning person or team responsible for the flag's lifecycle. Promote to a `node_owned_by_person` edge if ownership must be queryable." },
|
|
@@ -11897,8 +12012,7 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
11897
12012
|
marketing_channel: {
|
|
11898
12013
|
channel_type: { type: "string", enum: ["social", "email", "seo", "sem", "content", "events", "other"], description: "Category of marketing channel" },
|
|
11899
12014
|
monthly_budget: { type: "number", description: "Monthly spend allocated to this channel", modifier: "snapshot" },
|
|
11900
|
-
roi: { type: "number", description: "Return on investment ratio" }
|
|
11901
|
-
channel_status: { type: "string", enum: ["active", "paused", "deprecated"], description: "Operational status of the channel" }
|
|
12015
|
+
roi: { type: "number", description: "Return on investment ratio" }
|
|
11902
12016
|
},
|
|
11903
12017
|
// MarketingStrategyProperties: Marketing strategy.
|
|
11904
12018
|
marketing_strategy: {
|
|
@@ -12056,7 +12170,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
12056
12170
|
// ObjectiveProperties: A high-level strategic goal. The O in OKR.
|
|
12057
12171
|
objective: {
|
|
12058
12172
|
timeframe: { type: "string", description: 'Planning timeframe (e.g. "Q1 2026", "H1 2026")' },
|
|
12059
|
-
objective_status: { type: "string", enum: ["active", "achieved", "deferred"], description: "Current status" },
|
|
12060
12173
|
progress: { type: "number", description: "Overall progress (0\u2013100)" }
|
|
12061
12174
|
},
|
|
12062
12175
|
// ObservationProperties: Discrete observation captured during research. Absorbed from the deprecated Highlight entity.
|
|
@@ -12105,8 +12218,7 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
12105
12218
|
normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
|
|
12106
12219
|
},
|
|
12107
12220
|
required: ["value", "label"]
|
|
12108
|
-
}
|
|
12109
|
-
outcome_status: { type: "string", enum: ["identified", "measuring", "achieved", "abandoned"], description: "Current lifecycle phase, mirroring the `outcome` lifecycle in `grammar/lifecycles.ts` (UPG-579 Option B): `identified` -> `measuring` -> `achieved` | `abandoned`." }
|
|
12221
|
+
}
|
|
12110
12222
|
},
|
|
12111
12223
|
// ParticipantProperties: Research participant.
|
|
12112
12224
|
participant: {
|
|
@@ -12318,7 +12430,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
12318
12430
|
// PrototypeProperties: Prototype.
|
|
12319
12431
|
prototype: {
|
|
12320
12432
|
fidelity: { type: "string", enum: ["low", "medium", "high"], description: "Detail level" },
|
|
12321
|
-
test_status: { type: "string", enum: ["untested", "testing", "passed", "failed"], description: "User-test status" },
|
|
12322
12433
|
tool: { type: "string", description: "Authoring tool" }
|
|
12323
12434
|
},
|
|
12324
12435
|
// QaSessionProperties: QA session.
|
|
@@ -12448,8 +12559,7 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
12448
12559
|
// ReviewGateProperties: Review gate.
|
|
12449
12560
|
review_gate: {
|
|
12450
12561
|
gate_type: { type: "string", enum: ["human_review", "automated_check", "approval"], description: "Kind of review required at this gate" },
|
|
12451
|
-
required_approvers: { type: "string[]", description: "People or roles that must approve. Promote to `node_owned_by_person` edges (one per name) if ownership must be queryable." }
|
|
12452
|
-
gate_status: { type: "string", enum: ["pending", "approved", "rejected", "bypassed"], description: "Current approval status of the gate" }
|
|
12562
|
+
required_approvers: { type: "string[]", description: "People or roles that must approve. Promote to `node_owned_by_person` edges (one per name) if ownership must be queryable." }
|
|
12453
12563
|
},
|
|
12454
12564
|
// RiskProperties: Risk.
|
|
12455
12565
|
risk: {
|
|
@@ -12494,7 +12604,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
12494
12604
|
roadmap_item: {
|
|
12495
12605
|
quarter: { type: "string", description: 'Planning quarter (e.g. "Q2 2026"). Pair with `start_date`/`target_date` for precise scheduling.' },
|
|
12496
12606
|
priority: { type: "string", enum: ["urgent", "high", "medium", "low", "none"], description: "Importance against other items" },
|
|
12497
|
-
item_status: { type: "string", enum: ["planned", "in_progress", "shipped", "deferred"], description: "Status. `deferred` = explicitly pushed to a later period." },
|
|
12498
12607
|
confidence: {
|
|
12499
12608
|
type: "assessment",
|
|
12500
12609
|
scale_id: "confidence_5",
|
|
@@ -12574,7 +12683,6 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
12574
12683
|
// SecurityAuditProperties: Security audit.
|
|
12575
12684
|
security_audit: {
|
|
12576
12685
|
audit_scope: { type: "string", description: "Systems or processes covered by the audit" },
|
|
12577
|
-
audit_status: { type: "string", enum: ["scheduled", "in_progress", "completed"], description: "Current progress of the audit" },
|
|
12578
12686
|
findings_count: { type: "number", description: "Total number of findings", modifier: "derived" },
|
|
12579
12687
|
critical_findings: { type: "number", description: "Number of critical-severity findings" }
|
|
12580
12688
|
},
|
|
@@ -29193,7 +29301,7 @@ function validateExpression(expr) {
|
|
|
29193
29301
|
}
|
|
29194
29302
|
|
|
29195
29303
|
// src/format/canonical.ts
|
|
29196
|
-
var
|
|
29304
|
+
var nodeCrypto = __toESM(require("crypto"), 1);
|
|
29197
29305
|
var UPG_CANONICAL_FORMAT_VERSION = "1.0.0";
|
|
29198
29306
|
var INTEGRITY_HASH_PRIMITIVE = "sha256";
|
|
29199
29307
|
var INTEGRITY_DIGEST_HEX = 32;
|
|
@@ -29369,7 +29477,7 @@ function portfolioBody(doc) {
|
|
|
29369
29477
|
function computeBodyChecksum(doc) {
|
|
29370
29478
|
const body = isPortfolio(doc) ? portfolioBody(doc) : singleBody(doc);
|
|
29371
29479
|
const content = JSON.stringify(body);
|
|
29372
|
-
return
|
|
29480
|
+
return nodeCrypto.createHash(INTEGRITY_HASH_PRIMITIVE).update(content).digest("hex").slice(0, INTEGRITY_DIGEST_HEX);
|
|
29373
29481
|
}
|
|
29374
29482
|
function isPortfolio(doc) {
|
|
29375
29483
|
return doc.type === "portfolio" || "cross_edges" in doc;
|
|
@@ -29507,7 +29615,7 @@ function isCanonical(text) {
|
|
|
29507
29615
|
}
|
|
29508
29616
|
|
|
29509
29617
|
// src/index.ts
|
|
29510
|
-
var UPG_VERSION = "0.
|
|
29618
|
+
var UPG_VERSION = "0.15.0";
|
|
29511
29619
|
var UPG_FORMAT_VERSION = "0.4.0";
|
|
29512
29620
|
var MARKDOWN_FORMAT_VERSION = "0.1";
|
|
29513
29621
|
var UPG_TYPES = getTypes();
|