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 Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ad4m-hooks/helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"@coasys/ad4m": "*"
}
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
4 changes: 2 additions & 2 deletions ad4m-hooks/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@coasys/ad4m": "workspace:0.12.0-rc1-dev",
"@coasys/ad4m": "workspace:0.12.0-rc1-dev.1",
"@coasys/hooks-helpers": "workspace:*",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
Expand All @@ -28,5 +28,5 @@
"@coasys/hooks-helpers": "*"
}
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
4 changes: 2 additions & 2 deletions ad4m-hooks/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@coasys/ad4m": "workspace:0.12.0-rc1-dev",
"@coasys/ad4m": "workspace:0.12.0-rc1-dev.1",
"@coasys/hooks-helpers": "workspace:*"
},
"peerDependencies": {
Expand All @@ -24,5 +24,5 @@
"@coasys/hooks-helpers": "*"
}
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion bootstrap-languages/agent-language/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
"md5": "^2.3.0",
"postcss": "^8.2.1"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion bootstrap-languages/direct-message-language/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"dependencies": {
"@types/node": "^18.0.0"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion bootstrap-languages/neighbourhood-language/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
},
"author": "joshuadparkin@gmail.com",
"license": "ISC",
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion bootstrap-languages/p-diff-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
"devDependencies": {
"run-script-os": "^1.1.6"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion bootstrap-languages/perspective-language/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
"typescript": "^4.5.5",
"uint8arrays": "^3.0.0"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
6 changes: 3 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ad4m"

version = "0.12.0-rc1-dev"
version = "0.12.0-rc1-dev.1"

edition = "2021"
authors = ["Nicolas Luck <nicolas.luck@coasys.org>"]
Expand All @@ -27,8 +27,8 @@ metal = ["ad4m-executor/metal"]
cuda = ["ad4m-executor/cuda"]

[dependencies]
ad4m-client = { path = "../rust-client", version="0.12.0-rc1-dev" }
ad4m-executor = { path = "../rust-executor", version="0.12.0-rc1-dev" }
ad4m-client = { path = "../rust-client", version="0.12.0-rc1-dev.1" }
ad4m-executor = { path = "../rust-executor", version="0.12.0-rc1-dev.1" }
anyhow = "1.0.65"
clap = { version = "4.0.8", features = ["derive"] }
futures = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"email": "nicolas@coasys.org"
},
"devDependencies": {
"@coasys/ad4m": "workspace:0.12.0-rc1-dev",
"@coasys/ad4m": "workspace:0.12.0-rc1-dev.1",
"@apollo/client": "3.7.10",
"@types/node": "^16.11.11",
"esbuild": "^0.15.5",
Expand All @@ -72,5 +72,5 @@
"@coasys/ad4m": "*"
}
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
3 changes: 1 addition & 2 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": "lib/index.js",
"types": "lib/src/index.d.ts",
"type": "module",
"private": true,
"scripts": {
"build": "patch-package && tsc && pnpm run buildSchema && pnpm run bundle",
"buildSchema": "node --es-module-specifier-resolution=node lib/src/buildSchema.js",
Expand Down Expand Up @@ -69,5 +68,5 @@
"graphql@15.7.2": "patches/graphql@15.7.2.patch"
}
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
12 changes: 8 additions & 4 deletions core/src/model/Ad4mModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,10 @@ export class Ad4mModel {
} catch (e) {
console.warn(`Failed to resolve expression for ${propName}:`, e);
}
} else if (typeof value === 'string' && value.startsWith('literal://')) {
// Parse literal URL
} else if (propMeta.resolveLanguage === 'literal' && typeof value === 'string' && value.startsWith('literal://')) {
// Only parse literal URIs when resolveLanguage is explicitly 'literal'.
// Without this guard, properties pointing to baseExpressions of other models
// (which may be literal:// strings) would get unwrapped, breaking link URI validation.
try {
const parsed = Literal.fromUrl(value).get();
value = parsed.data !== undefined ? parsed.data : parsed;
Expand Down Expand Up @@ -1695,8 +1697,10 @@ WHERE ${whereConditions.join(' AND ')}
console.warn("Falling back to raw value");
convertedValue = target; // Fall back to raw value
}
} else if (typeof target === 'string' && target.startsWith('literal://')) {
// Fallback: If we somehow got a literal URL that wasn't parsed by SurrealDB, parse it now
} else if (propMeta.resolveLanguage === 'literal' && typeof target === 'string' && target.startsWith('literal://')) {
// Only parse literal URIs when resolveLanguage is explicitly set to 'literal'.
// Without this check, properties pointing to baseExpressions of other models
// (which may be literal:// strings) would get unwrapped, breaking link URI validation.
try {
const parsed = Literal.fromUrl(target).get();
if(parsed.data !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion docs-src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"typedoc-plugin-markdown": "^3.15.2",
"typescript": "^4.9.3"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@
"tmp": "^0.2.1",
"uuid": "*"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion executor/src/core/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'node:path';
import * as fs from 'node:fs';
import { Address, Expression } from '@coasys/ad4m';

export let ad4mExecutorVersion = "0.12.0-rc1-dev";
export let ad4mExecutorVersion = "0.12.0-rc1-dev.1";
export let agentLanguageAlias = "did";
export let languageLanguageAlias = "lang";
export let neighbourhoodLanguageAlias = "neighbourhood";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@
"safer-buffer@2.1.2": "patches/safer-buffer@2.1.2.patch"
}
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ad4m-client"
version = "0.12.0-rc1-dev"
version = "0.12.0-rc1-dev.1"
edition = "2021"
authors = ["Nicolas Luck <nicolas@coasys.org>"]
description = "Client library wrapping AD4M's GraphQL interface"
Expand Down
4 changes: 2 additions & 2 deletions rust-executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ad4m-executor"
version = "0.12.0-rc1-dev"
version = "0.12.0-rc1-dev.1"
edition = "2021"
authors = ["Nicolas Luck <nicolas.luck@coasys.org>"]
description = "Runtime implementation of AD4M as library - https://ad4m.dev"
Expand Down Expand Up @@ -105,7 +105,7 @@ sodoken = "=0.1.0"
scryer-prolog = { version = "0.10", git = "https://github.com/coasys/scryer-prolog", branch = "ad4m" }
# scryer-prolog = { path = "../../scryer-prolog", features = ["multi_thread"] }

ad4m-client = { path = "../rust-client", version="0.12.0-rc1-dev" }
ad4m-client = { path = "../rust-client", version="0.12.0-rc1-dev.1" }
reqwest = { version = "0.11.20", features = ["json", "native-tls"] }

# rusqlite = { version = "0.29.0", git = "https://github.com/coasys/rusqlite.git", rev = "12ec1330bd4b46411ab9895364da4a3e172d0fbb", features = ["bundled"] }
Expand Down
2 changes: 1 addition & 1 deletion rust-executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"@coasys/ad4m-executor": "link:../core"
},
"dependencies": {},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion rust-executor/src/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use lazy_static::lazy_static;

lazy_static! {
/// The current version of AD4M
pub static ref AD4M_VERSION: String = String::from("0.12.0-rc1-dev");
pub static ref AD4M_VERSION: String = String::from("0.12.0-rc1-dev.1");
}

/// Struct representing oldest supported version and indicator if state should be cleared if update is required
Expand Down
15 changes: 12 additions & 3 deletions rust-executor/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,23 @@ impl Link {
static URI_SCHEME_RE: OnceLock<Regex> = OnceLock::new();
let re = URI_SCHEME_RE.get_or_init(|| Regex::new(r"^[a-zA-Z][a-zA-Z0-9+\-._]*:").unwrap());

let link_desc = format!(
"source='{}', target='{}', predicate='{:?}'",
self.source, self.target, self.predicate
);

let check = |field: &str, value: &str| -> Result<(), AnyError> {
if value.is_empty() {
return Err(anyhow!("Link {} must not be empty", field));
return Err(anyhow!(
"Link {} must not be empty. Link: {}",
field,
link_desc
));
}
if !re.is_match(value) {
return Err(anyhow!(
"Link {} is not a valid URI (must start with a scheme like 'did:', 'expression://', etc.): '{}'",
field, value
"Link {} is not a valid URI (must start with a scheme like 'did:', 'expression://', etc.): '{}'. Link: {}",
field, value, link_desc
));
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion test-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@
"bugs": {
"url": "https://github.com/coasys/ad4m/issues"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion tests/js/bootstrapSeed.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@
"fluent-ffmpeg": "^2.1.3",
"uuid": "*"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@
"resolutions": {
"react-error-overlay": "6.0.9"
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}
2 changes: 1 addition & 1 deletion ui/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ad4m-launcher"
version = "0.12.0-rc1-dev"
version = "0.12.0-rc1-dev.1"
description = "Administration of ad4m services"
authors = ["Kaichao Sun"]
license = ""
Expand Down
2 changes: 1 addition & 1 deletion ui/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@
}
}
},
"version": "0.12.0-rc1-dev"
"version": "0.12.0-rc1-dev.1"
}