Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/all/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"clean": "rm -rf .objectstack/marketplace-packages dist"
},
"dependencies": {
"@objectstack/account": "^10.2.0",
"@objectstack/cli": "^10.2.0",
"@objectstack/driver-sqlite-wasm": "^10.2.0",
"@objectstack/runtime": "^10.2.0",
"@objectstack/account": "^11.2.0",
"@objectstack/cli": "^11.2.0",
"@objectstack/driver-sqlite-wasm": "^11.2.0",
"@objectstack/runtime": "^11.2.0",
"sql.js": "^1.14.1"
},
"optionalDependencies": {
Expand Down
22 changes: 11 additions & 11 deletions packages/compliance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
"test": "objectstack build"
},
"dependencies": {
"@objectstack/account": "^10.2.0",
"@objectstack/cli": "^10.2.0",
"@objectstack/driver-memory": "^10.2.0",
"@objectstack/driver-sql": "^10.2.0",
"@objectstack/driver-sqlite-wasm": "^10.2.0",
"@objectstack/metadata": "^10.2.0",
"@objectstack/objectql": "^10.2.0",
"@objectstack/runtime": "^10.2.0",
"@objectstack/service-analytics": "^10.2.0",
"@objectstack/service-automation": "^10.2.0",
"@objectstack/spec": "^10.2.0",
"@objectstack/account": "^11.2.0",
"@objectstack/cli": "^11.2.0",
"@objectstack/driver-memory": "^11.2.0",
"@objectstack/driver-sql": "^11.2.0",
"@objectstack/driver-sqlite-wasm": "^11.2.0",
"@objectstack/metadata": "^11.2.0",
"@objectstack/objectql": "^11.2.0",
"@objectstack/runtime": "^11.2.0",
"@objectstack/service-analytics": "^11.2.0",
"@objectstack/service-automation": "^11.2.0",
"@objectstack/spec": "^11.2.0",
"sql.js": "^1.14.1"
},
"optionalDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, F, tmpl } from '@objectstack/spec';
import { P, F } from '@objectstack/spec';
/**
* Assessment — a discrete test of a control. Each control should have
* one per `review_frequency_days`. Result rolls up onto Control.last_status.
Expand Down Expand Up @@ -88,7 +88,7 @@ export const Assessment = ObjectSchema.create({
{ fields: ['assessed_at'] },
],

titleFormat: tmpl`{{record.title}}`,
nameField: 'title',
compactLayout: ['title', 'control', 'status', 'remediation_status', 'cycle', 'assessed_at'],

validations: [
Expand Down
13 changes: 11 additions & 2 deletions packages/compliance/src/objects/compliance_control.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, F, tmpl } from '@objectstack/spec';
import { P, F } from '@objectstack/spec';

/**
* Control — an individual requirement from a framework. e.g. SOC2
Expand Down Expand Up @@ -98,6 +98,15 @@ export const Control = ObjectSchema.create({
expression: F`record.last_assessed_at == null || record.review_frequency_days == null || daysFromNow(0) > record.last_assessed_at + record.review_frequency_days * 86400000`,
}),
notes: Field.markdown({ label: 'Notes', group: 'meta' }),

// ADR-0079: real field holding the record title (was the render-only
// `titleFormat` template `{{code}} · {{title}}`). A stored formula so the
// server can return/query the display name.
display_name: Field.formula({
label: 'Display Name',
group: 'meta',
expression: F`coalesce(record.code, '') + ' · ' + coalesce(record.title, '')`,
}),
},

enable: {
Expand All @@ -114,7 +123,7 @@ export const Control = ObjectSchema.create({
{ fields: ['last_status'] },
],

titleFormat: tmpl`{{record.code}} · {{record.title}}`,
nameField: 'display_name',
compactLayout: ['code', 'title', 'framework', 'criticality', 'last_status'],

validations: [
Expand Down
4 changes: 2 additions & 2 deletions packages/compliance/src/objects/compliance_evidence.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, F, tmpl } from '@objectstack/spec';
import { P, F } from '@objectstack/spec';
/**
* Evidence — a piece of proof supporting one or more controls. Attach
* PDFs / screenshots / logs via the platform's sys_attachment slot.
Expand Down Expand Up @@ -106,7 +106,7 @@ export const Evidence = ObjectSchema.create({
{ fields: ['evidence_type'] },
],

titleFormat: tmpl`{{record.title}}`,
nameField: 'title',
compactLayout: ['title', 'control', 'evidence_type', 'status', 'expires_on'],

validations: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { tmpl } from '@objectstack/spec';

/**
* Framework — the catalog of standards you certify against. One per
Expand Down Expand Up @@ -71,7 +70,6 @@ export const Framework = ObjectSchema.create({

indexes: [{ fields: ['short_name'] }, { fields: ['family'] }, { fields: ['status'] }],

titleFormat: tmpl`{{record.short_name}}`,
displayNameField: 'short_name',
nameField: 'short_name',
compactLayout: ['short_name', 'family', 'version', 'status', 'next_audit_date'],
});
22 changes: 11 additions & 11 deletions packages/content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
"test": "objectstack build"
},
"dependencies": {
"@objectstack/account": "^10.2.0",
"@objectstack/cli": "^10.2.0",
"@objectstack/driver-memory": "^10.2.0",
"@objectstack/driver-sql": "^10.2.0",
"@objectstack/driver-sqlite-wasm": "^10.2.0",
"@objectstack/metadata": "^10.2.0",
"@objectstack/objectql": "^10.2.0",
"@objectstack/runtime": "^10.2.0",
"@objectstack/service-analytics": "^10.2.0",
"@objectstack/service-automation": "^10.2.0",
"@objectstack/spec": "^10.2.0",
"@objectstack/account": "^11.2.0",
"@objectstack/cli": "^11.2.0",
"@objectstack/driver-memory": "^11.2.0",
"@objectstack/driver-sql": "^11.2.0",
"@objectstack/driver-sqlite-wasm": "^11.2.0",
"@objectstack/metadata": "^11.2.0",
"@objectstack/objectql": "^11.2.0",
"@objectstack/runtime": "^11.2.0",
"@objectstack/service-analytics": "^11.2.0",
"@objectstack/service-automation": "^11.2.0",
"@objectstack/spec": "^11.2.0",
"sql.js": "^1.14.1"
},
"optionalDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions packages/content/src/objects/content_channel.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { tmpl } from '@objectstack/spec';

/**
* Channel — a publishing surface (Blog, Newsletter, LinkedIn, X, YouTube).
Expand Down Expand Up @@ -74,7 +73,6 @@ export const Channel = ObjectSchema.create({

indexes: [{ fields: ['name'], unique: true }, { fields: ['kind'] }],

displayNameField: 'name',
titleFormat: tmpl`{{record.name}}`,
nameField: 'name',
compactLayout: ['name', 'kind', 'default_cta_goal', 'active'],
});
4 changes: 1 addition & 3 deletions packages/content/src/objects/content_competitor.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { tmpl } from '@objectstack/spec';

/**
* Competitor — a tracked org / blog / creator we watch for signals.
Expand Down Expand Up @@ -60,7 +59,6 @@ export const Competitor = ObjectSchema.create({

indexes: [{ fields: ['name'], unique: true }, { fields: ['category'] }],

displayNameField: 'name',
titleFormat: tmpl`{{record.name}}`,
nameField: 'name',
compactLayout: ['name', 'category', 'website'],
});
4 changes: 2 additions & 2 deletions packages/content/src/objects/content_cta.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, tmpl } from '@objectstack/spec';
import { P } from '@objectstack/spec';

/**
* CTA — a call-to-action variant attached to a piece. Carries a goal
Expand Down Expand Up @@ -65,7 +65,7 @@ export const Cta = ObjectSchema.create({

indexes: [{ fields: ['piece'] }, { fields: ['goal'] }],

titleFormat: tmpl`{{record.label_text}}`,
nameField: 'label_text',
compactLayout: ['label_text', 'goal', 'piece', 'is_primary'],

validations: [
Expand Down
7 changes: 5 additions & 2 deletions packages/content/src/objects/content_metric.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { tmpl } from '@objectstack/spec';

/**
* Metric — a time-stamped reading for a publication. Weekly snapshot
Expand Down Expand Up @@ -63,6 +62,10 @@ export const Metric = ObjectSchema.create({

indexes: [{ fields: ['publication'] }, { fields: ['period_start'] }, { fields: ['period_end'] }],

titleFormat: tmpl`{{record.publication}} — {{record.period_start}}`,
// ADR-0079: `nameField` names a REAL local field. The old
// `titleFormat` also referenced `{{record.publication}}`, a LOOKUP — a
// related-record reference the server can't resolve into a title here
// (ADR-0072), so it is dropped. Degraded to the local `period_start`.
nameField: 'period_start',
compactLayout: ['publication', 'period_start', 'period_end', 'views', 'signups', 'revenue'],
});
4 changes: 2 additions & 2 deletions packages/content/src/objects/content_piece.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, F, tmpl } from '@objectstack/spec';
import { P, F } from '@objectstack/spec';
/**
* Content piece — the unit of work. State machine drives the workflow;
* everything else (publications, metrics, CTAs) hangs off this row.
Expand Down Expand Up @@ -223,7 +223,7 @@ export const Piece = ObjectSchema.create({
{ fields: ['published_at'] },
],

titleFormat: tmpl`{{record.title}}`,
nameField: 'title',
compactLayout: ['title', 'status', 'format', 'assignee', 'publish_at'],

validations: [
Expand Down
8 changes: 6 additions & 2 deletions packages/content/src/objects/content_publication.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { tmpl } from '@objectstack/spec';

/**
* Publication — "this piece went live on this channel at this time".
Expand Down Expand Up @@ -107,6 +106,11 @@ export const Publication = ObjectSchema.create({

indexes: [{ fields: ['piece'] }, { fields: ['channel'] }, { fields: ['published_at'] }],

titleFormat: tmpl`{{record.piece}} on {{record.channel}}`,
// ADR-0079: `nameField` names a REAL local field. The old
// `titleFormat` referenced `{{record.piece}}` and `{{record.channel}}`,
// both LOOKUPS — related-record references the server can't resolve into a
// title here (ADR-0072), so both are dropped. Degraded to the local
// `published_at` (the only identifying local scalar).
nameField: 'published_at',
compactLayout: ['piece', 'channel', 'published_at', 'total_views', 'total_signups'],
});
4 changes: 2 additions & 2 deletions packages/content/src/objects/content_signal.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, tmpl } from '@objectstack/spec';
import { P } from '@objectstack/spec';
/**
* Signal — a captured event worth potentially writing about. Sources:
* - a competitor published something (auto-captured via RSS / manual)
Expand Down Expand Up @@ -135,7 +135,7 @@ export const Signal = ObjectSchema.create({
{ fields: ['source_kind'] },
],

titleFormat: tmpl`{{record.headline}}`,
nameField: 'headline',
compactLayout: ['headline', 'source_kind', 'competitor', 'impact', 'status'],

validations: [
Expand Down
4 changes: 1 addition & 3 deletions packages/content/src/objects/content_template.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { tmpl } from '@objectstack/spec';

/**
* Template — a reusable outline / structure a piece can be instantiated
Expand Down Expand Up @@ -67,7 +66,6 @@ export const ContentTemplate = ObjectSchema.create({

indexes: [{ fields: ['name'], unique: true }, { fields: ['kind'] }],

displayNameField: 'name',
titleFormat: tmpl`{{record.name}}`,
nameField: 'name',
compactLayout: ['name', 'kind', 'target_channel', 'target_word_count'],
});
3 changes: 1 addition & 2 deletions packages/content/src/objects/content_topic.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { tmpl } from '@objectstack/spec';

/**
* Topic — the editorial brief. Owns the intent; one topic can spawn many
Expand Down Expand Up @@ -126,6 +125,6 @@ export const Topic = ObjectSchema.create({
{ fields: ['visibility'] },
],

titleFormat: tmpl`{{record.title}}`,
nameField: 'title',
compactLayout: ['title', 'pillar', 'funnel_stage', 'priority', 'owner', 'visibility'],
});
22 changes: 11 additions & 11 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
"test": "objectstack build"
},
"dependencies": {
"@objectstack/account": "^10.2.0",
"@objectstack/cli": "^10.2.0",
"@objectstack/driver-memory": "^10.2.0",
"@objectstack/driver-sql": "^10.2.0",
"@objectstack/driver-sqlite-wasm": "^10.2.0",
"@objectstack/metadata": "^10.2.0",
"@objectstack/objectql": "^10.2.0",
"@objectstack/runtime": "^10.2.0",
"@objectstack/service-analytics": "^10.2.0",
"@objectstack/service-automation": "^10.2.0",
"@objectstack/spec": "^10.2.0",
"@objectstack/account": "^11.2.0",
"@objectstack/cli": "^11.2.0",
"@objectstack/driver-memory": "^11.2.0",
"@objectstack/driver-sql": "^11.2.0",
"@objectstack/driver-sqlite-wasm": "^11.2.0",
"@objectstack/metadata": "^11.2.0",
"@objectstack/objectql": "^11.2.0",
"@objectstack/runtime": "^11.2.0",
"@objectstack/service-analytics": "^11.2.0",
"@objectstack/service-automation": "^11.2.0",
"@objectstack/spec": "^11.2.0",
"sql.js": "^1.14.1"
},
"optionalDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/src/objects/contracts_contract.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, F, tmpl } from '@objectstack/spec';
import { P, F } from '@objectstack/spec';
/**
* Contract — the central record. One Contract per signed agreement (or
* one-being-negotiated). Metadata-first: the PDF lives in sys_attachment;
Expand Down Expand Up @@ -261,7 +261,7 @@ export const Contract = ObjectSchema.create({
{ fields: ['owner'] },
],

titleFormat: tmpl`{{record.title}}`,
nameField: 'title',
compactLayout: ['title', 'party', 'contract_type', 'status', 'total_value', 'end_date'],

validations: [
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/src/objects/contracts_obligation.object.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2026 ObjectStack contributors. Apache-2.0 license.

import { ObjectSchema, Field } from '@objectstack/spec/data';
import { P, F, tmpl } from '@objectstack/spec';
import { P, F } from '@objectstack/spec';

/**
* Obligation — anything we (or the counterparty) committed to do on a given
Expand Down Expand Up @@ -118,7 +118,7 @@ export const Obligation = ObjectSchema.create({
{ fields: ['assignee'] },
],

titleFormat: tmpl`{{record.summary}}`,
nameField: 'summary',
compactLayout: ['summary', 'contract', 'kind', 'status', 'due_date', 'amount'],

validations: [
Expand Down
Loading
Loading